Update based on @nwinkler's feedback

pull/1670/head
Travis Swicegood 2020-04-28 17:14:15 -05:00 committed by Noah Gorny
parent ac3957393e
commit 582ea5c260
1 changed files with 4 additions and 10 deletions

View File

@ -2,15 +2,9 @@
cite "about-completion"
about-completion "GitHub CLI completion"
if command -v which gh >/dev/null 2>&1; then
if command -v which brew >/dev/null 2>&1; then
BREW_PREFIX=$(brew --prefix)
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)"
if _command_exists gh; then
if _command_exists brew; then
echo "You don't need github-cli completion enabled if you have system completion enabled"
fi
eval "$(gh completion --shell=bash)"
fi