Add a completion function for zsh #95
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a file containing an autoloadable completion function for use with zsh so that zsh users can get hints on vmtouch usage with their tab key.
In the process, I noticed that because the
-loption implies-tand setso_touch, you get an error message for the-t/-ecombination when combining-lwith-e. The-l/-echeck was thus dead code. By rearranging it to check-t/-eafter-l/-e, error messages are better. I also added a similar line for-L/-e. There could be ways to refactor it so that instead of the error message being repeated you can use%cfor each option letter.For the option descriptions in the
usage()function, you've used imperative mood form for all but one option. The exception is-iwhich starts with the word "ignores". I have changed it for consistency, both inusage()and when copying it for the zsh completion.I've also added to the
Makefileto install the completion.