completion: Lint github-cli completion and use completion_exists
parent
2b66100c47
commit
adc77bb622
|
|
@ -64,6 +64,7 @@ completion/available/conda.completion.bash
|
|||
completion/available/consul.completion.bash
|
||||
completion/available/docker.completion.bash
|
||||
completion/available/gcloud.completion.bash
|
||||
completion/available/github-cli.completion.bash
|
||||
completion/available/helm.completion.bash
|
||||
completion/available/knife.completion.bash
|
||||
completion/available/packer.completion.bash
|
||||
|
|
|
|||
|
|
@ -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
|
||||
# If gh already completed, stop
|
||||
_completion_exists gh && return
|
||||
eval "$(gh completion --shell=bash)"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue