jaraco / keyring

MIT License
1.24k stars 152 forks source link

Add support for shell completion #611

Closed Freed-Wu closed 1 year ago

Freed-Wu commented 1 year ago

Fixes #608.

If you install keyring by pip install 'keyring[completion]', you can generate shell completions by:

keyring --print-completion bash | sudo tee /usr/share/bash-completion/compleitons/keyring
keyring --print-completion zsh | sudo tee /usr/share/zsh/site-functions/_keyring
keyring --print-completion tcsh | sudo tee /etc/profile.d/keyring.csh

Note: the path of /usr/share is only for GNU/Linux mostly. If you use other OSs, try:

If you install keyring by your package manager (apt, pacman, nix, homebrew, etc), these shell completions should have been packaged and you don't need generate them by yourself.

After install shell completions, you can enable shell completions by:

jaraco commented 1 year ago

Releasing as 23.13.