Merge pull request #1803 from NoahGorny/cleanup/gcloud-completions
cleanup/gcloud completionspull/1800/head
commit
94a9c639c7
|
|
@ -63,6 +63,7 @@ completion/available/cargo.completion.bash
|
|||
completion/available/conda.completion.bash
|
||||
completion/available/consul.completion.bash
|
||||
completion/available/docker.completion.bash
|
||||
completion/available/gcloud.completion.bash
|
||||
completion/available/knife.completion.bash
|
||||
completion/available/packer.completion.bash
|
||||
completion/available/pipx.completion.bash
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
#/usr/bin/env bash
|
||||
# Bash completion for Google Cloud SDK
|
||||
# shellcheck shell=bash
|
||||
cite "about-completion"
|
||||
about-completion "Google Cloud SDK completion"
|
||||
|
||||
if which gcloud >/dev/null 2>&1; then
|
||||
if _command_exists gcloud; then
|
||||
# get install path
|
||||
GOOGLE_SDK_ROOT=${GOOGLE_SDK_ROOT:-$(gcloud info --format="value(installation.sdk_root)")}
|
||||
for i in $(ls ${GOOGLE_SDK_ROOT}/*.bash.inc); do
|
||||
source $i
|
||||
|
||||
# source all the bash completion file that are available
|
||||
for i in "${GOOGLE_SDK_ROOT}"/*.bash.inc; do
|
||||
# shellcheck disable=SC1090
|
||||
source "$i"
|
||||
done
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue