mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 05:29:09 -07:00
28 lines
693 B
Bash
Executable File
28 lines
693 B
Bash
Executable File
#!/bin/zsh
|
|
|
|
GCL=${HOME}/tools/gcloud
|
|
|
|
if [ -d "${GCL}" ] ; then
|
|
# Add bin to path
|
|
export PATH="${PATH}:${GCL}/bin"
|
|
|
|
# Load completion
|
|
source "${GCL}/completion.zsh.inc"
|
|
elif [ -f /usr/share/google-cloud-sdk/completion.zsh.inc ] ; then
|
|
source /usr/share/google-cloud-sdk/completion.zsh.inc
|
|
elif [ -d /opt/homebrew/share/google-cloud-sdk/ ] ; then
|
|
source /opt/homebrew/share/google-cloud-sdk/completion.zsh.inc
|
|
source /opt/homebrew/share/google-cloud-sdk/path.zsh.inc
|
|
fi
|
|
|
|
|
|
which kubectl 2>/dev/null >&2 && \
|
|
function kubectl() {
|
|
if ! type __start_kubectl >/dev/null 2>&1; then
|
|
source <(command kubectl completion zsh)
|
|
fi
|
|
|
|
command kubectl "$@"
|
|
} || \
|
|
true
|