mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
14 lines
364 B
Bash
14 lines
364 B
Bash
|
# Autocompletion for the GitHub CLI (gh).
|
||
|
|
||
|
if (( $+commands[gh] )); then
|
||
|
if [[ ! -r "$ZSH_CACHE_DIR/gh_version" \
|
||
|
|| "$(gh --version)" != "$(< "$ZSH_CACHE_DIR/gh_version")"
|
||
|
|| ! -f "$ZSH/plugins/gh/_gh" ]]; then
|
||
|
gh completion --shell zsh > $ZSH/plugins/gh/_gh
|
||
|
gh --version > $ZSH_CACHE_DIR/gh_version
|
||
|
fi
|
||
|
autoload -Uz _gh
|
||
|
_comps[gh]=_gh
|
||
|
fi
|
||
|
|