Add script and update ksc

This commit is contained in:
Rob Watson 2022-04-17 21:28:35 +02:00
parent a50eb88b88
commit 164881d1ec
2 changed files with 11 additions and 1 deletions

9
script/ksc Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
context=$(kubectl config get-contexts -o name | fzf)
if [ $? -ne 0 ]; then
exit 0
fi
kubectl config use-context "$context"

3
zshrc
View File

@ -79,7 +79,8 @@ alias gta="go test ./..."
alias h="helm"
alias ji="jira -b"
alias k="kubectl"
alias ksc='kubectl config use-context $(kubectl config get-contexts -o name | fzf)'
alias kcc="kubectl config current-context"
alias kp="kubectl get pods -o wide"
alias k9="kill -9"
alias ll="exa -l --group-directories-first --git"
alias ls="exa --color=auto"