Skip to content

Add shell completions by shtab #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2022
Merged

Add shell completions by shtab #121

merged 1 commit into from
Sep 29, 2022

Conversation

Freed-Wu
Copy link
Contributor

vimdoc --print-completion bash | sudo tee /usr/share/bash-completion/completions/vimdoc
vimdoc --print-completion tcsh | sudo tee /etc/profile.d/vimdoc.completion.csh
vimdoc --print-completion zsh | sudo tee /usr/share/zsh/site-functions/_vimdoc
❯ vimdoc -<TAB>
option
--help               show this help message and exit
-h                   show this help message and exit
--print-completion   print shell completion script
--version            show program's version number and exit
❯ vimdoc <TAB>
plugin
scripts/  tests/    vimdoc/
    extras_require={'completion': ['shtab']},

vimdoc --print-completion bash | sudo tee /usr/share/bash-completion/completions/vimdoc
vimdoc --print-completion tcsh | sudo tee /etc/profile.d/vimdoc.completion.csh
vimdoc --print-completion zsh | sudo tee /usr/share/zsh/site-functions/_vimdoc
@dbarnett dbarnett merged commit 823e3bb into google:master Sep 29, 2022
@dbarnett
Copy link
Contributor

@Freed-Wu do you know if it gives self-contained usage details for how to set up the completions that you can access from vimdoc --help or something? Otherwise we might want to add a note to README or something.

@Freed-Wu
Copy link
Contributor Author

how to set up the completions

The setup method can be seen from https://docs.iterative.ai/shtab/use/. Maybe a note is useful.

dbarnett added a commit that referenced this pull request Oct 31, 2022
Changes since 0.7.0:
* Avoid creating junk "plugin[flags]" tag (#117)
* Add shell completions by shtab (#121)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants