Update based on @nwinkler's feedback

pull/1574/head
Travis Swicegood 2020-04-28 17:14:15 -05:00
parent 0f93acbaf3
commit 2cea40353c
1 changed files with 4 additions and 10 deletions

View File

@ -2,15 +2,9 @@
cite "about-completion" cite "about-completion"
about-completion "GitHub CLI completion" about-completion "GitHub CLI completion"
if command -v which gh >/dev/null 2>&1; then if _command_exists gh; then
if command -v which brew >/dev/null 2>&1; then if _command_exists brew; then
BREW_PREFIX=$(brew --prefix) echo "You don't need github-cli completion enabled if you have system completion enabled"
if [ -f "$BREW_PREFIX"/etc/bash_completion.d/gh.sh ]; then
. "$BREW_PREFIX"/etc/bash_completion.d/gh.sh
fi
else
eval "$(gh completion --shell=bash)"
fi fi
eval "$(gh completion --shell=bash)"
fi fi