Update based on @nwinkler's feedback
parent
ac3957393e
commit
582ea5c260
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue