Skip to content

Add simple zsh completion script #28

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

Merged
merged 1 commit into from Jul 27, 2017
Merged

Add simple zsh completion script #28

merged 1 commit into from Jul 27, 2017

Conversation

ghost
Copy link

@ghost ghost commented Jul 25, 2017

No description provided.

@posva
Copy link
Owner

posva commented Jul 25, 2017

Oh, cool, thanks!

How do I test it?

@ghost
Copy link
Author

ghost commented Jul 25, 2017

  1. Install zsh.
  2. Create a .zshenv file in your $HOME directory containing this:
typeset -U fpath

fpath=(
  ~/path/to/completion
  $fpath
)
  1. Open your terminal and run:
$ zsh
$ autoload -Uz compinit
$ compinit
  1. Enter $ catimg - and press TAB (you should see this):
-c  -- convert colors to a restricted palette
-h  -- display a help message
-l  -- specify the amount of loops that catimg should repeat a GIF
-r  -- force the resolution of the image
-w  -- specify the width of the displayed image

Note:
In zsh you can also complete the option value (press TAB after -r and you will get 1 or 2).
Let me know whether to give some default values to -w or -l.

@posva
Copy link
Owner

posva commented Jul 27, 2017

Super cool! Thanks a lot. It looks nice as it is 🙂
I still have to see how to add them when installing with brew

@posva posva merged commit f87dc7e into posva:master Jul 27, 2017
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