I used argcomplete to make the project capable of generating its own completions.
AFAIK, the wheel format and pypi does not allow us to ship random assets that need to be put in a specific path. Due to that, generating appropriate completions scripts and putting them in specific places will fall on the shoulders of users.
How to use completions:
Since argcomplete suggested method is unordinary, I prefer the solution presented below:
# for fish shell
register-python-argcomplete --shell fish m > /tmp/foo
sudo mv /tmp/foo /usr/share/fish/vendor_functions.d/m.fish
# for bash shell
register-python-argcomplete --shell bash m > /tmp/foo
sudo mv /tmp/foo /usr/share/bash-completion/completions/m
# for zsh
register-python-argcomplete --shell zsh m > /tmp/foo
sudo mv /tmp/foo /usr/share/zsh/site-functions/_m
This is the convention used by all packages in the arch linux repositories.
I used argcomplete to make the project capable of generating its own completions.
AFAIK, the
wheel
format andpypi
does not allow us to ship random assets that need to be put in a specific path. Due to that, generating appropriate completions scripts and putting them in specific places will fall on the shoulders of users.How to use completions:
Since
argcomplete
suggested method is unordinary, I prefer the solution presented below:This is the convention used by all packages in the arch linux repositories.