summaryrefslogtreecommitdiff
path: root/plugins/gh/gh.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gh/gh.plugin.zsh')
-rw-r--r--plugins/gh/gh.plugin.zsh3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/gh/gh.plugin.zsh b/plugins/gh/gh.plugin.zsh
index a346ccf65..3e4cdee5e 100644
--- a/plugins/gh/gh.plugin.zsh
+++ b/plugins/gh/gh.plugin.zsh
@@ -1,5 +1,8 @@
# Autocompletion for the GitHub CLI (gh).
if (( $+commands[gh] )); then
+ # remove old generated completion file
+ command rm -f "${0:A:h}/_gh"
+
ver="$(gh --version)"
ver_file="$ZSH_CACHE_DIR/gh_version"
comp_file="$ZSH_CACHE_DIR/completions/_gh"