1
0

completion: allow manual invalidation

This commit is contained in:
Konstantin Demin 2021-10-01 10:15:45 +03:00
parent bc5e07f76e
commit 6ecf110b2c
Signed by: krd
GPG Key ID: 1F33CB0BA4731BC6

View File

@ -66,3 +66,11 @@ __z_comp_external() {
autoload -Uz "_$1" autoload -Uz "_$1"
return 0 return 0
} }
## reload or new session are required to regenerate compcache
z-comp-invalidate() {
[ -n "$1" ] || return 1
local f="${ZSHU[d_cache]}/completion/_$1"
[ -f "$f" ] || return 2
command rm -f "$f" || return 3
}