1
0

zsh: zwc things
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Konstantin Demin 2024-02-20 09:51:55 +03:00
parent a54be4863a
commit 0289d90fb9
Signed by: krd
GPG Key ID: 1F33CB0BA4731BC6
2 changed files with 10 additions and 2 deletions

View File

@ -83,6 +83,7 @@ __z_comp_external() {
return 3
fi
fi
zcompile -zUR "$f" || return 4
autoload -Uz "_$c"
return 0
@ -110,8 +111,9 @@ z-comp-invalidate() {
[ -n "$1" ] || return 1
f="${ZSHU[d_cache]}/completion/_$1"
rm -f "$f.zwc"
[ -f "$f" ] || return 2
rm -f "$f" || return 3
rm -f "$f"
}
## reload or new session are required to regenerate completions

View File

@ -14,7 +14,13 @@ dotfiles-git() { (
z-zwc-gen() {
local i
for i ( "${ZSHU[d_conf]}"/**/*.zsh(N.r) ) ; do
zcompile -U "$i"
zcompile -UR "$i"
done
for i ( "${ZSHU[d_cache]}/completion"/*(N.r) ) ; do
case "$i" in
*.zwc ) continue ;;
esac
zcompile -zUR "$i"
done
}