mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-09-25 20:46:07 +02:00
fix: load completion files atomically (#14000)
Fixes #13964 Co-authored-by: Marc Cornellà <marc@mcornella.com>
This commit is contained in:
co-authored by
Marc Cornellà
parent
d42209f2af
commit
830a5bcfd2
@@ -43,5 +43,12 @@ fi
|
||||
|
||||
# uv and uvx are installed together (uvx is an alias to `uv tool run`)
|
||||
# Overwrites the file each time as completions might change with uv versions.
|
||||
uv generate-shell-completion zsh >| "$ZSH_CACHE_DIR/completions/_uv" &|
|
||||
uvx --generate-shell-completion zsh >| "$ZSH_CACHE_DIR/completions/_uvx" &|
|
||||
zmodload -F zsh/files b:zf_mv
|
||||
() {
|
||||
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_uv"
|
||||
zf_mv -f -- =( uv generate-shell-completion zsh ) "$TMPPREFIX"
|
||||
} &|
|
||||
() {
|
||||
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_uvx"
|
||||
zf_mv -f -- =( uvx --generate-shell-completion zsh ) "$TMPPREFIX"
|
||||
} &|
|
||||
|
||||
Reference in New Issue
Block a user