Possible Error In Tester::#UN3

I’m stuck on Stage #UN3.

I’ve tried to test manually, and the redirections work as expected,

Here are my logs:

$ ls -1 nonexistent >> baz.md
ls: nonexistent: No such file or directory
$ ls
README.md		app			codecrafters.yml	tests.py		your_program.sh
__pycache__		baz.md			pyproject.toml
$ 

This shows that the file was created even when the command failed and that’s the expected behavior.

But in the tests, the testers passes one value and expects another, which feels like a simple typo

Am I missing something here? Here is a link to my Github Repository
https://github.com/brianobot/codecrafters-shell-python.

Hey @brianobot, the issue stems from this line. Removing it should fix the problem:

That line is needed for binding the Tab key got autocompletion on macOS, the line above works for most other Oses

Reference to docs: readline — GNU readline interface — Python 3.14.0 documentation

There are two possible approaches here:

  • Conditionally apply the fix: Detect the operating system and only include that line for macOS.
  • Install GNU Readline on macOS to replace the editline library.

Wow! Thank you very much
this actually worked

1 Like