mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 07:20:40 +01:00
kubectl: add wrappers for colorized output in JSON and YAML (#9316)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
This commit is contained in:
@@ -150,3 +150,19 @@ alias kepvc='kubectl edit pvc'
|
||||
alias kdpvc='kubectl describe pvc'
|
||||
alias kdelpvc='kubectl delete pvc'
|
||||
|
||||
# Colored JSON output
|
||||
kj() {
|
||||
kubectl "$@" -o json | jq
|
||||
}
|
||||
compdef kj=kubectl
|
||||
|
||||
kjx() {
|
||||
kubectl "$@" -o json | fx
|
||||
}
|
||||
compdef kjx=kubectl
|
||||
|
||||
# Colored YAML output
|
||||
ky() {
|
||||
kubectl "$@" -o yaml | yh
|
||||
}
|
||||
compdef ky=kubectl
|
||||
|
||||
Reference in New Issue
Block a user