Commit Graph

2 Commits

Author SHA1 Message Date
Wu Zhenyu
c7c2f19dc0 Add complete for shell by shtab
you-get --print-completion bash | sudo tee /usr/share/bash-completion/completions/you-get
you-get --print-completion zsh | sudo tee /usr/share/zsh/site-functions/_you-get
you-get --print-completion tcsh|sudo tee /etc/profile.d/you-get.completion.csh
2022-08-28 14:09:00 +08:00
Zhiming Wang
3b4a576e6c
Add shell completion definitions for Bash, Fish and Zsh
Paths of completion definitions in this repo are inconsequential, and I
don't know a convention for that, so I just modelled it on git.git
https://github.com/git/git/tree/master/contrib/completion. What's
different here is that instead of using a uniform naming scheme for each
file (you-get-completion.<shellname>), I'm using the conventional name
for each shell, which means _you-get for Zsh, for instance. Users of
each shell should be able to pick out the completion definition for
their shell based on the filenames; in the worst case, they can still
tell from the comment at the top of each file.

Note that I'm no expert on Bash or Fish completion, so
you-get-completion.bash and you-get.fish may not be written in the
idiomatic way. (you-get-completion.bash is most certainly not idiomatic,
if there's an idiom at all.)

Closes #1178.
2016-05-28 18:50:50 -07:00