diff options
Diffstat (limited to 'plugins/gh/gh.plugin.zsh')
-rw-r--r-- | plugins/gh/gh.plugin.zsh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/gh/gh.plugin.zsh b/plugins/gh/gh.plugin.zsh index 3e4cdee5e..3092bfa4a 100644 --- a/plugins/gh/gh.plugin.zsh +++ b/plugins/gh/gh.plugin.zsh @@ -1,5 +1,10 @@ # Autocompletion for the GitHub CLI (gh). if (( $+commands[gh] )); then + # Handle $0 according to the standard: + # # https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html + 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" + 0="${${(M)0:#/*}:-$PWD/$0}" + # remove old generated completion file command rm -f "${0:A:h}/_gh" |