This is a reproduction for fastapi/typer#965.
- Clone this repository
- Run
docker build . -t typer-repro:01
- Run
docker run -it typer-repro:01
- Run
typer ./main.py run --name [TAB]
where[TAB]
means "press the tab key" - Bug should be reproduced
typer ./main.py run --name [TAB]
should autocomplete to a list of names, where the list is:
"start-test-exmpl",
"start1234-other-exmpl",
"start1234-test-exmpl",
Tab completion results in:
typer ./main.py run --name start--exmpl
To view the version tab completion bug, follow the same steps above, but input:
typer ./main.py run --vers[TAB]
This will tab complete correctly to --version
. When you type something thereafter, and then tab complete again, the bug will be reproduced.
typer ./main.py run --version [TAB]
typer ./main.py run --version (eval):1: command not found: Awesome
(eval):1: command not found: Awesome
(eval):1: command not found: Awesome
typer ./main.py