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
parent d42209f2af
commit 830a5bcfd2
47 changed files with 248 additions and 56 deletions

View File

@@ -39,4 +39,8 @@ if [[ ! -f "$ZSH_CACHE_DIR/completions/_poetry" ]]; then
_comps[poetry]=_poetry
fi
poetry completions zsh >| "$ZSH_CACHE_DIR/completions/_poetry" &|
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_poetry"
zf_mv -f -- =( poetry completions zsh ) "$TMPPREFIX"
} &|