fix: load completion files atomically (#14000)

Fixes #13964
 
Co-authored-by: Marc Cornellà <marc@mcornella.com>
This commit is contained in:
Carlo Sala
2026-08-22 17:24:24 +02:00
committed by GitHub
co-authored by Marc Cornellà
parent d42209f2af
commit 830a5bcfd2
47 changed files with 248 additions and 56 deletions
+5 -1
View File
@@ -14,4 +14,8 @@ if [[ ! -f "$ZSH_CACHE_DIR/completions/_doctl" ]]; then
_comps[doctl]=_doctl
fi
doctl completion zsh >| "$ZSH_CACHE_DIR/completions/_doctl" &|
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_doctl"
zf_mv -f -- =( doctl completion zsh ) "$TMPPREFIX"
} &|