diff options
Diffstat (limited to 'plugins/gh/gh.plugin.zsh')
-rw-r--r-- | plugins/gh/gh.plugin.zsh | 5 |
1 files changed, 4 insertions, 1 deletions
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" |