#lc6 Failing, not able to replicate the error locally

I’m stuck on Stage #lc6

Latest Code: Gautam-Shell/app/main.py at main · Gautam1608/Gautam-Shell · GitHub

Code Submit output:

[tester::#LC6] Running tests for Stage #LC6 (Filename Completion - Directory completion)
[tester::#LC6] [working_dir] - cow/
[tester::#LC6] [working_dir]   - fox/ (empty)
[tester::#LC6] Running ./your_program.sh
[tester::#LC6] ✓ Received prompt ($ )
[tester::#LC6] Typed "du" followed by a <SPACE>
[tester::#LC6] ✓ Prompt line matches "$ du "
[tester::#LC6] Pressed "<TAB>" (expecting autocomplete to "du cow/")
[tester::#LC6] ✓ Prompt line matches "$ du cow/"
[tester::#LC6] Pressed "<TAB>" (expecting autocomplete to "du cow/fox/")
[your-program] $ du cow/cow/
[tester::#LC6] ^ Line does not match expected value.
[tester::#LC6] Expected: "$ du cow/fox/"
[tester::#LC6] Received: "$ du cow/cow/"
[tester::#LC6] Test failed

Tried the same locally and its working fine. Am not able to figure out why its auto completes to cow/cow/

Thanks

Hey @Gautam1608, the bug occurs because readline by default treats / as a word delimiter. You’ll need to override that behavior by calling readline.set_completer_delims() with a string that excludes /, for example:

readline.set_completer_delims(' \t\n')

And then adjust the options here:

Yup this worked, Its a bit confusing as it seems to be dependent on which shell I am using to run python itself.

I know you have provided the link to bash in the challenge but I thought git bash would be similar to bash, apparently not.

Removed the prefix, I usually see it added in other shells but not in bash I guess.

Either way, thanks for the solution.