From c19e79600a925fbb42f1aacafe33191e0966c22c Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Sun, 13 Dec 2020 18:44:34 -0800 Subject: [PATCH] Move kubectl init --- .../.config/bash/bashrc.d/hellotech-bash-completion.sh | 2 -- hellotech/.config/profile/profile.d/hellotech.sh | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 hellotech/.config/profile/profile.d/hellotech.sh diff --git a/hellotech/.config/bash/bashrc.d/hellotech-bash-completion.sh b/hellotech/.config/bash/bashrc.d/hellotech-bash-completion.sh index 41a2e16..e04ede1 100644 --- a/hellotech/.config/bash/bashrc.d/hellotech-bash-completion.sh +++ b/hellotech/.config/bash/bashrc.d/hellotech-bash-completion.sh @@ -4,5 +4,3 @@ if [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then . "$(brew --prefix)/share/bash-completion/bash_completion" fi - -source <(kubectl completion bash) diff --git a/hellotech/.config/profile/profile.d/hellotech.sh b/hellotech/.config/profile/profile.d/hellotech.sh new file mode 100644 index 0000000..b930d52 --- /dev/null +++ b/hellotech/.config/profile/profile.d/hellotech.sh @@ -0,0 +1,10 @@ +#ft=sh +#shellcheck disable=1090,2039 + +if [ "${BASH_VERSION}" != "" ] && [ "$(ps -p $$ -ocomm=)" != sh ]; then + source <(kubectl completion bash) +fi + +if [ "${ZSH_VERSION}" != "" ]; then + source <(kubectl completion zsh) +fi