diff --git a/extras/lunchy-completion.bash b/extras/lunchy-completion.bash index 340ec3a..afe0d24 100644 --- a/extras/lunchy-completion.bash +++ b/extras/lunchy-completion.bash @@ -10,7 +10,7 @@ function _lunchy { case "$cur_pos" in 1) COMPREPLY=($(compgen -W 'ls list start stop restart status install uninstall show edit' -- $cur)) ;; - *) COMPREPLY=($(compgen -W '$(lunchy list)' -- $cur)) + *) COMPREPLY=($(compgen -W "$(lunchy list)" -- $cur)) ;; esac } diff --git a/extras/lunchy-completion.zsh b/extras/lunchy-completion.zsh new file mode 100644 index 0000000..cb6d18d --- /dev/null +++ b/extras/lunchy-completion.zsh @@ -0,0 +1,8 @@ +### +# completion written by Raphaƫl Emourgeon +# on github : osaris +# + +autoload bashcompinit +bashcompinit +source $(dirname $0)/lunchy-completion.bash diff --git a/lunchy.gemspec b/lunchy.gemspec index f68b26d..280f598 100644 --- a/lunchy.gemspec +++ b/lunchy.gemspec @@ -14,6 +14,13 @@ to your .bash_profile, .bashrc or .profile . $LUNCHY_DIR/lunchy-completion.bash fi +or add the following to your .zshrc for ZSH + + LUNCHY_DIR=$(dirname `gem which lunchy`)/../extras + if [ -f $LUNCHY_DIR/lunchy-completion.zsh ]; then + . $LUNCHY_DIR/lunchy-completion.zsh + fi + ------- EOS