diff --git a/completion/available/github-cli.completion.bash b/completion/available/github-cli.completion.bash index 761824d9..b3d1c1db 100644 --- a/completion/available/github-cli.completion.bash +++ b/completion/available/github-cli.completion.bash @@ -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