completion: Lint github-cli completion and use completion_exists
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=bash
|
||||
cite "about-completion"
|
||||
about-completion "GitHub CLI completion"
|
||||
|
||||
if _binary_exists gh; then
|
||||
complete -p gh &> /dev/null || return
|
||||
eval "$(gh completion --shell=bash)"
|
||||
# If gh already completed, stop
|
||||
_completion_exists gh && return
|
||||
eval "$(gh completion --shell=bash)"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user