Skip to content
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

Add shell completions #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add shell completions #52

wants to merge 1 commit into from

Conversation

Freed-Wu
Copy link

@Freed-Wu Freed-Wu commented Oct 16, 2022

Rewrite of #45

gscholar --print-completion bash | sudo tee /usr/share/bash-completion/completions/gscholar
gscholar --print-completion zsh | sudo tee /usr/share/zsh/site-functions/_gscholar
gscholar --print-completion tcsh | sudo tee /etc/profile.d/gscholar.completion.csh
❯ gscholar -<TAB>
option
--all                show all bibtex results
-a                   show all bibtex results
--debug              show debugging output
-d                   show debugging output
-f                   Output format. Available formats are: bibtex, endnote, refman,wenxianwang [default: %(default)s]
--help               show this help message and exit
-h                   show this help message and exit
--outputformat       Output format. Available formats are: bibtex, endnote, refman,wenxianwang [default: %(default)s]
--print-completion   print shell completion script
--rename             rename file
-r                   rename file
-s                   Page number to start parsing PDF file at.
--startpage          Page number to start parsing PDF file at.
--version            show program's version number and exit

And fix bug about %(prog)s

gscholar --print-completion bash | sudo tee /usr/share/bash-completion/completions/gscholar
gscholar --print-completion zsh | sudo tee /usr/share/zsh/site-functions/_gscholar
gscholar --print-completion tcsh | sudo tee /etc/profile.d/gscholar.completion.csh

And fix bug about %(prog)s
@Freed-Wu
Copy link
Author

@venthur How about this PR?

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.

1 participant