Compare commits

...

3 Commits

Author SHA1 Message Date
dabruh cd60ff5c22 Respect the KREW_ROOT variable 2024-02-12 09:20:45 +01:00
dabruh e34b12a5eb Add Minikube alias and completion 2024-02-12 09:20:45 +01:00
dabruh b49aa0be3d Add GitHub CLI completion 2024-02-12 09:20:45 +01:00
3 changed files with 9 additions and 4 deletions

View File

@ -6,4 +6,5 @@ alias \
f='flux' \
h='helm' \
k='kubectl' \
m='minikube' \
v='velero'

View File

@ -2,8 +2,10 @@
# Auto-complete section
autoload bashcompinit && bashcompinit
command -v kubectl >/dev/null && . <(kubectl completion zsh) && complete -F __start_kubectl k
command -v velero >/dev/null && . <(velero completion zsh) && complete -F __start_velero v
command -v helm >/dev/null && . <(helm completion zsh) && complete -F _helm h
command -v flux >/dev/null && . <(flux completion zsh) && complete -F _flux f
command -v gh >/dev/null && . <(gh completion -s zsh) && complete -F _gh
command -v helm >/dev/null && . <(helm completion zsh) && complete -F _helm h
command -v kubectl >/dev/null && . <(kubectl completion zsh) && complete -F __start_kubectl k
command -v kubectl-ctx >/dev/null && complete -W "$(kubectl-ctx)" kubectl-ctx
command -v minikube >/dev/null && . <(minikube completion zsh) && complete -F __minikube_convert_bash_to_zsh m
command -v velero >/dev/null && . <(velero completion zsh) && complete -F __start_velero v

View File

@ -14,6 +14,8 @@ script_dir="$(
opt_dir=/opt/dotfiles
python_venv=$opt_dir/pyenv
[ -z "$KREW_ROOT" ] && export KREW_ROOT="${XDG_DATA_HOME:-$HOME/.local/share}/krew"
#
# Argument parsing and help
#
@ -205,7 +207,7 @@ function setup_krew() {
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz"
tar zxvf "${KREW}.tar.gz"
./"${KREW}" install krew
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
export PATH="$KREW_ROOT/bin:$PATH"
set +e
}