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

Generate ZSH completions base on trurl.md #379

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

Conversation

jacobmealey
Copy link
Contributor

This PR introduces a script generate_completions.sh which extracts the command line options from trurl.md and sorts them in to different buckets: standalone (things like --json, --accept-space), component options (things like --set, --iterate which take a component= directly after), random options (things like --qtrim, --url-file that take an option but we don't control what it is), and the components. The _trurl.zsh.in is a template that these different list of options are inserted into.

I also added a completions task to the Makefile, and updated the install to copy them to /usr/local/share/zsh/site-functions if the completion has been built.

completions/generate_completions.sh Outdated Show resolved Hide resolved
completions/generate_completions.sh Outdated Show resolved Hide resolved
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