1
0

add dumb completion routine

This commit is contained in:
Konstantin Demin 2022-05-18 11:13:35 +03:00
parent 48a90c3981
commit 4a2b874478
Signed by: krd
GPG Key ID: 1F33CB0BA4731BC6

View File

@ -67,6 +67,17 @@ __z_comp_external() {
return 0 return 0
} }
__z_comp_system() {
(( ${+commands[$1]} )) || return 1
(( ${+_comps[$1]} )) && return 2
for d ( $fpath ) ; do
[ -s "$d/_$1" ] || continue
autoload -Uz "_$1"
return 0
done ; unset d
return 3
}
## reload or new session are required to regenerate compcache ## reload or new session are required to regenerate compcache
z-comp-invalidate() { z-comp-invalidate() {
[ -n "$1" ] || return 1 [ -n "$1" ] || return 1