-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
# Alias für kubectl | ||
alias k=kubectl | ||
complete -F __start_kubectl k | ||
|
||
alias kx='f() { [ \"\$1\" ] && kubectl config use-context \$1 || kubectl config current-context ; } ; f' | ||
alias kn='f() { [ \"\$1\" ] && kubectl config set-context --current --namespace \$1 || kubectl config view --minify | grep namespace | cut -d\" \" -f6 ; } ; f' | ||
# Autokomplettierung für kubectl | ||
autoload -U +X compinit && compinit | ||
autoload -U +X bashcompinit && bashcompinit | ||
source <(kubectl completion zsh) | ||
compdef k=kubectl | ||
|
||
# Alias für das Wechseln des Kontexts | ||
alias kx='f() { [ "$1" ] && kubectl config use-context $1 || kubectl config current-context ; } ; f' | ||
|
||
# Alias für das Setzen des Namespaces | ||
alias kn='f() { [ "$1" ] && kubectl config set-context --current --namespace $1 || kubectl config view --minify | grep namespace | cut -d" " -f2 ; } ; f' |