mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-12-04 14:19:04 +01:00
fix(gh): preserve valid completion cache on failure (#14131)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This commit is contained in:
1 parent
6527e23542
commit
bb9193fa45
2 files changed
+6
-1
No files matched your search
@@ -14,5 +14,8 @@ fi
|
||||
zmodload -F zsh/files b:zf_mv
|
||||
() {
|
||||
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._gh"
|
||||
zf_mv -f -- =( gh completion --shell zsh ) "$ZSH_CACHE_DIR/completions/_gh"
|
||||
() {
|
||||
gh completion --shell zsh >| "$1" && [[ -s "$1" ]] \
|
||||
&& zf_mv -f -- "$1" "$ZSH_CACHE_DIR/completions/_gh"
|
||||
} =(:) || return
|
||||
} &|
|
||||
Reference in new issue
Block a user