Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add completion for ZSH ( reference #57). #59

Merged
merged 3 commits into from
Jul 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extras/lunchy-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
8 changes: 8 additions & 0 deletions extras/lunchy-completion.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
###
# completion written by Raphaël Emourgeon
# on github : osaris
#

autoload bashcompinit
bashcompinit
source $(dirname $0)/lunchy-completion.bash
7 changes: 7 additions & 0 deletions lunchy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down