Complete the pacapt completion

* the completion function was not formulated properly
This commit is contained in:
Vojtech Letal 2015-04-03 14:33:03 +02:00
parent 7e33cb16f3
commit f8cda1867b
1 changed files with 60 additions and 65 deletions

View File

@ -1,12 +1,6 @@
#compdef pacapt #compdef pacapt
local zsh_pacapt_path="$(cd "$(dirname "$0")" && pwd)" _pacapt(){
_pacapt_action() {
_arguments -s : \
"$_pacapt_opts_commands[@]"
}
# ----- APT # ----- APT
if which apt > /dev/null; then if which apt > /dev/null; then
zsh_pacapt_init=true zsh_pacapt_init=true
@ -61,8 +55,9 @@ _pacapt_zsh_comp() {
} }
if "$zsh_pacapt_init" = true; then if "$zsh_pacapt_init" = true; then
compdef _pacapt_zsh_comp pacapt _pacapt_zsh_comp $@
else else
compdef _gnu_generic pacapt _gnu_generic $@
fi fi
}