First Check
Commit to Help
Example Code
Not working:
myparam: str = typer.Argument(
"",
shell_complete=my_autocomplete,
)
Working:
myparam: str = typer.Option(
"",
shell_complete=my_autocomplete,
),
Description
I'm trying to enable shell complete on an Argument but it does not work. On the opposite with Options everything is working as expected
I think that the same problem was already in the previous versions of typer (so that it is NOT introduced by typer 0.4.0 & click 8... but i'm not totally sure about that)
Based on tests on click, shell_complete on arguments should work: https://github.com/pallets/click/blob/48cb86d85fc1abfcf1478ee660e42aaa5382fd64/examples/completion/completion.py#L25
in typer I can't find tests with arguments, I only found this with option https://github.com/tiangolo/typer/blob/a1520dcda685220a9a796288f5eaaebd00d68845/tests/assets/compat_click7_8.py#L20
Operating System
Linux
Operating System Details
Ubuntu 20.04
Typer Version
0.4.0
Python Version
Python 3.9.5
Additional Context
click 8.0.1
First Check
Commit to Help
Example Code
Description
I'm trying to enable shell complete on an Argument but it does not work. On the opposite with Options everything is working as expected
I think that the same problem was already in the previous versions of typer (so that it is NOT introduced by typer 0.4.0 & click 8... but i'm not totally sure about that)
Based on tests on click, shell_complete on arguments should work: https://github.com/pallets/click/blob/48cb86d85fc1abfcf1478ee660e42aaa5382fd64/examples/completion/completion.py#L25
in typer I can't find tests with arguments, I only found this with option https://github.com/tiangolo/typer/blob/a1520dcda685220a9a796288f5eaaebd00d68845/tests/assets/compat_click7_8.py#L20
Operating System
Linux
Operating System Details
Ubuntu 20.04
Typer Version
0.4.0
Python Version
Python 3.9.5
Additional Context
click 8.0.1