Using shtab 1.3.0, the autocomplete output generated from python files with an explicit .py extension and/or with a '-' in the file name will create invalid code.
For example, using zsh and my_example.py will generate invalid code.
The code generated looks like this.
_shtab_my_example.py_options_=(
"(- :)"{-h,--help}"[show this help message and exit]"
"--input-file[Path to file]:input_file:"
"--max-records[Max Records to process]:max_records:"
"--alpha[Level of alpha filtering to apply]:alpha:"
"--print-completion[print shell completion script]:print_completion:(bash zsh)"
)
Using shtab 1.3.0, the autocomplete output generated from python files with an explicit
.py
extension and/or with a '-' in the file name will create invalid code.For example, using zsh and
my_example.py
will generate invalid code.The code generated looks like this.
Using
my-example.py
will generate similar issues.Specifically, the error look similar to this: