From d2269180b074263f4a0d3df3f9de15a1abae8110 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 15 Sep 2021 18:41:44 +0200 Subject: fix(core): move plugin-generated completion files to `$ZSH_CACHE_DIR/completions` Fixes #10183 --- plugins/gh/gh.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins/gh/gh.plugin.zsh') diff --git a/plugins/gh/gh.plugin.zsh b/plugins/gh/gh.plugin.zsh index c3d87848d..a346ccf65 100644 --- a/plugins/gh/gh.plugin.zsh +++ b/plugins/gh/gh.plugin.zsh @@ -2,7 +2,10 @@ if (( $+commands[gh] )); then ver="$(gh --version)" ver_file="$ZSH_CACHE_DIR/gh_version" - comp_file="$ZSH/plugins/gh/_gh" + comp_file="$ZSH_CACHE_DIR/completions/_gh" + + mkdir -p "${comp_file:h}" + (( ${fpath[(Ie)${comp_file:h}]} )) || fpath=("${comp_file:h}" $fpath) if [[ ! -f "$comp_file" || ! -f "$ver_file" || "$ver" != "$(< "$ver_file")" ]]; then gh completion --shell zsh >| "$comp_file" -- cgit v1.2.3-70-g09d2