No completion for pipx, which is using argcomplete
pipx uses argcomplete.
On Linux (Debian 11), I install pipx, xonsh and xontrib-argcomplete with
python3 -m pip install pipx
python3 -m pipx ensurepath
In a new terminal, I can setup argcomplete for Bash and I get autocompletion for Bash. Then,
pipx install xonsh
xonsh
xpip install xontrib-argcomplete
echo 'xontrib load argcomplete' >> ~/.xonshrc
In a new terminal, I don't get autocompletion for pipx in xonsh.
Hey @paugier ! Nice catch!
As described in xontrib-argcomplete readme it's need to have PYTHON_ARGCOMPLETE_OK in the first lines of $(which pipx) file.
After adding it I see the completion immediately:
But how we can solve this. There is no way to understand that tool is using argcomplete.
I suggest to skip _python_argcomplete_scan_head in case tool name is in __xonsh__.env.get("XONTRIB_ARGCOMPLETE_TOOLS", []) and you can do $XONTRIB_ARGCOMPLETE_TOOLS=['pipx'] in your .xonshrc.
It will be cool if you can prepare PR for this. I can review and make release fast. Thanks!