Complete the pacapt completion
* the completion function was not formulated properly
This commit is contained in:
parent
7e33cb16f3
commit
f8cda1867b
13
src/_pacapt
13
src/_pacapt
|
@ -1,12 +1,6 @@
|
|||
#compdef pacapt
|
||||
|
||||
local zsh_pacapt_path="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
_pacapt_action() {
|
||||
_arguments -s : \
|
||||
"$_pacapt_opts_commands[@]"
|
||||
}
|
||||
|
||||
_pacapt(){
|
||||
# ----- APT
|
||||
if which apt > /dev/null; then
|
||||
zsh_pacapt_init=true
|
||||
|
@ -61,8 +55,9 @@ _pacapt_zsh_comp() {
|
|||
}
|
||||
|
||||
if "$zsh_pacapt_init" = true; then
|
||||
compdef _pacapt_zsh_comp pacapt
|
||||
_pacapt_zsh_comp $@
|
||||
else
|
||||
compdef _gnu_generic pacapt
|
||||
_gnu_generic $@
|
||||
fi
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue