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 a zsh completion function #158

Merged
merged 1 commit into from
Oct 4, 2021
Merged

Conversation

okapia
Copy link
Contributor

@okapia okapia commented Sep 29, 2021

This adds a completion function for zsh to complement the existing one for bash.

I've also modified Makefile.am here to install it in $prefix/share/zsh/site-functions which is the canonical place for zsh completion functions. For the bash completion, there is further logic in configure.ac but it is perhaps using pkg-config to query where the bash-completions project wants the files installed. I don't think anything similar would be applicable other than perhaps to make the installation optional. It does need to be installed with a name starting with an underscore for zsh's compinit to find it.

@okapia okapia force-pushed the zsh-completion branch 2 times, most recently from b6e949f to 5990221 Compare September 29, 2021 21:26
@jpmens
Copy link
Owner

jpmens commented Oct 3, 2021

Thank you for your contribution. I think the file _jo ought to be named along the lines of the bash completion (jo.bash). Care to rename the file to jo.zsh, please?

@okapia
Copy link
Contributor Author

okapia commented Oct 3, 2021

Very well. I considered doing this before even but the necessary automake changes to rename it on installation seem rather ugly. Seems to need a hook to rename it after already installing. Note that it does need to be installed with a name like _jo otherwise it won't get picked up by zsh's compinit. I've tweaked the comment in the header of the actual completion file accordingly.

@jpmens jpmens merged commit 8f8bb34 into jpmens:master Oct 4, 2021
@jpmens
Copy link
Owner

jpmens commented Oct 4, 2021

Merged, @okapia, thank you!

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