Add helm shell completion

main
Buddy Sandidge 4 years ago
parent ff0a131e55
commit 8f19a7016b

@ -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

@ -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"

@ -0,0 +1,4 @@
# vim: ft=sh
if command -v helm > /dev/null 2>&1; then
eval "$(helm completion fish)"
fi

@ -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

@ -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}"

Loading…
Cancel
Save