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

@@ -9,5 +9,9 @@ if [[ ! -f "$ZSH_CACHE_DIR/completions/_hasura" ]]; then
source "$ZSH_CACHE_DIR/completions/_hasura"
else
source "$ZSH_CACHE_DIR/completions/_hasura"
hasura completion zsh --file "$ZSH_CACHE_DIR/completions/_hasura" >/dev/null &|
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_hasura"
zf_mv -f -- =( hasura completion zsh ) "$TMPPREFIX"
} &|
fi