Does uv run support argcomplete?
I can't find in the documentation whether I can use argcomplete to get bash/zsh autocompletion when running uv run myscript.py.
This issue is two things:
- A documentation bug report
- A feature request, if uv doesn't have this already
Isn't argcomplete for argparse? Our argument parser isn't written in Python.
Please see https://docs.astral.sh/uv/getting-started/installation/#shell-autocompletion
I believe @carlpaten was asking whether uv plugs into the mechanics of argcomplete when typing uv run myscript.py <TAB>, not uv itself, right?
(That's at least what I was looking for when I discovered this issue.)
Same here.
Example situation with pytest: with python3-argcomplete installed in my Debian 12, and pytest installed in a normal venv, the shell transparently provides completion for pytest (not sure of the exact mechanism, I guess it involves finding $VENV/lib/python3.11/site-packages/_pytest/_argcomplete.py).
Now when using uv:
- when using
uv run, the completion does not seem to delegate command options to its completer - when using
.venvas a venv,argcompletedoes not know aboutpytest's completion, likely because of the differences with a real venv