mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
very large update
This commit is contained in:
parent
597092aa83
commit
ef398bf673
22 changed files with 2982 additions and 79 deletions
30
kubernetes-util.sh
Normal file
30
kubernetes-util.sh
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# to avoid slow shells, we do it manually
|
||||
function kubectl() {
|
||||
if ! type __start_kubectl >/dev/null 2>&1; then
|
||||
source <(command kubectl completion zsh)
|
||||
fi
|
||||
|
||||
command kubectl "$@"
|
||||
}
|
||||
|
||||
function kube-ctx-show() {
|
||||
echo "`kubectl ctx -c` • `kubectl ns -c`"
|
||||
}
|
||||
|
||||
alias show-kube-ctx="kube-ctx-show"
|
||||
alias kc-current-ctx="kube-ctx-show"
|
||||
|
||||
function kube-list-local-contexts() {
|
||||
grep '^- name: ' ~/.kube/config | awk '{print $3}'
|
||||
}
|
||||
|
||||
alias kc-list-local-contexts="kube-list-local-contexts"
|
||||
|
||||
alias kc-list-prod-contexts="kube-list-prod-contexts"
|
||||
|
||||
alias kc="kubectl"
|
||||
alias k="kubectl"
|
||||
alias mk="minikube"
|
||||
alias kube-list-contexts="kubectl config get-contexts"
|
||||
|
||||
alias kc-site="kubectl-site"
|
||||
Loading…
Add table
Add a link
Reference in a new issue