diff --git a/hellotech/.config/bash/bashrc.d/hellotech-bash-completion.sh b/hellotech/.config/bash/bashrc.d/hellotech-bash-completion.sh index e04ede1..57a0170 100644 --- a/hellotech/.config/bash/bashrc.d/hellotech-bash-completion.sh +++ b/hellotech/.config/bash/bashrc.d/hellotech-bash-completion.sh @@ -1,6 +1,14 @@ -#!/usr/bin/env bash -# shellcheck disable=1090 +# vi: ft=bash if [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then . "$(brew --prefix)/share/bash-completion/bash_completion" fi + +if command -v kubectl > /dev/null 2>&1; then + source <(kubectl completion bash) +fi + +if command -v helm > /dev/null 2>&1; then + source <(helm completion bash) +fi + diff --git a/hellotech/.config/bash/bashrc.d/hellotech.sh b/hellotech/.config/bash/bashrc.d/hellotech.sh index 7d6fd0d..be41d42 100644 --- a/hellotech/.config/bash/bashrc.d/hellotech.sh +++ b/hellotech/.config/bash/bashrc.d/hellotech.sh @@ -1,8 +1,5 @@ #!/usr/bin/env bash -#shellcheck disable=1090 -source <(kubectl completion bash) - alias orb="cd ~/code/circleci-ci-orb" alias core="cd ~/code/core" alias sync-service="cd ~/code/sync-service" diff --git a/hellotech/.config/fish/completions/hellotech.fish b/hellotech/.config/fish/completions/hellotech.fish new file mode 100644 index 0000000..971a9c0 --- /dev/null +++ b/hellotech/.config/fish/completions/hellotech.fish @@ -0,0 +1,4 @@ +# vim: ft=sh +if command -v helm > /dev/null 2>&1; then + eval "$(helm completion fish)" +fi diff --git a/hellotech/.config/zsh/zshrc.d/hellotech.zsh b/hellotech/.config/zsh/zshrc.d/hellotech.zsh index eb5aff7..c4eb639 100644 --- a/hellotech/.config/zsh/zshrc.d/hellotech.zsh +++ b/hellotech/.config/zsh/zshrc.d/hellotech.zsh @@ -1,5 +1,13 @@ -# shellcheck disable=SC2148 +# shellcheck disable=SC2148,SC1090 autoload -U +X compinit && compinit -# shellcheck disable=SC1090,SC2039 -source <(kubectl completion zsh) + +if command -v kubectl > /dev/null 2>&1; then + source <(kubectl completion zsh) +fi + +if command -v helm > /dev/null 2>&1 ; then + source <(helm completion zsh) +fi + +# vim: ft=bash diff --git a/hellotech/.local/bin/install-helm-home b/hellotech/.local/bin/install-helm-home index 28a03b1..bf6b961 100755 --- a/hellotech/.local/bin/install-helm-home +++ b/hellotech/.local/bin/install-helm-home @@ -8,13 +8,12 @@ VERSION=${VERSION:-3.6.0} DEST="${XDG_DATA_HOME}/apps/releases/${APP}" if [[ ! -d "${DEST}/${VERSION}" ]]; then - URL_TAR=https://get.helm.sh/helm-v${VERSION}-$(get_os)-$(get_arch).tar.gz - URL_SHA=https://get.helm.sh/helm-v${VERSION}-$(get_os)-$(get_arch).tar.gz.sha256 - DL_DIR="$(mktemp -d)" SHA_PATH=${DL_DIR}/helm.tar.gz.sha256 TAR_PATH=${DL_DIR}/helm.tar.gz + URL_SHA=https://get.helm.sh/helm-v${VERSION}-$(get_os)-$(get_arch).tar.gz.sha256 + URL_TAR=https://get.helm.sh/helm-v${VERSION}-$(get_os)-$(get_arch).tar.gz curl --silent --location --output "${SHA_PATH}" "${URL_SHA}" curl --silent --location --output "${TAR_PATH}" "${URL_TAR}"