Simplify zsh completion
Completion file shouldn't be sourced. It should provide only completion code (source of _command) for command. It's task for package manager or user to put under $fpath.
This commit is contained in:
parent
7b2e60968b
commit
f89647bd19
@ -1,7 +1,5 @@
|
|||||||
#compdef $PROG
|
#compdef $PROG
|
||||||
|
|
||||||
_cli_zsh_autocomplete() {
|
|
||||||
|
|
||||||
local -a opts
|
local -a opts
|
||||||
local cur
|
local cur
|
||||||
cur=${words[-1]}
|
cur=${words[-1]}
|
||||||
@ -16,8 +14,3 @@ _cli_zsh_autocomplete() {
|
|||||||
else
|
else
|
||||||
_files
|
_files
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
compdef _cli_zsh_autocomplete $PROG
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user