Closed linozen closed 1 month ago
Ideally instrument it in a way that parameters in Python and completions can easily be kept in sync to prevent drift. One option is to generate them from the argparse definitions. Another approach can be to generate them from the helpfile or manpage as some external tools do. For Zsh at least it is worth considering a mechanism of installing completions.
Perhaps argcomplete?
https://github.com/fsfe/reuse-tool/pull/1076 should address this in a somewhat elegant manner IMHO.
FWIW, I wish Re-use also implemented argcomplete completion and allowed users to chose between speed and more automatic completion. For example, if it did implement argcomplete
, I would get tab completion on my system without any changes other than the code changes in re-use because I already have /etc/bash_completion.d/python-argcomplete
installed. It's pretty trivial.
@rpatterson Can you open a new issue for this? I am not intensely familiar with argcomplete (nor shtab, for that matter).
Can they be used in parallel?
Can you open a new issue for this?
Done, @carmenbianca, but I was really just sharing an opinion and alternate use case for posterity. It's not worth much of your time.
It would be really nice to have completion for all the popular shells such as: