mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-27 08:10:08 +00:00
remove jq dependency
see https://github.com/ohmyzsh/ohmyzsh/pull/8699#issuecomment-1293588083
This commit is contained in:
parent
ce445772ce
commit
14f66bc624
1 changed files with 3 additions and 11 deletions
|
@ -83,17 +83,9 @@ alias kgseca='kubectl get secret --all-namespaces'
|
||||||
alias kdsec='kubectl describe secret'
|
alias kdsec='kubectl describe secret'
|
||||||
alias kdelsec='kubectl delete secret'
|
alias kdelsec='kubectl delete secret'
|
||||||
alias kdecsec='
|
alias kdecsec='
|
||||||
_kdecsec() {
|
kdecsec_go_template='{{range $k,$v := .data}}{{"### "}}{{$k}}{{"\n"}}{{$v|base64decode}}{{"\n\n"}}{{end}}'
|
||||||
if [ $(jq --version) != "jq-1.6" ]; then
|
alias kdecsec="kubectl get secret -o go-template='$kdecsec_go_template'"
|
||||||
echo "kdecsec requires jq-1.6 to use the base64d format";
|
unset kdecsec_go_template
|
||||||
unset -f _kdecsec
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
kubectl get secret "$@" -o json | jq ".data | map_values(. | @base64d )";
|
|
||||||
unset -f _kdecsec
|
|
||||||
return 0
|
|
||||||
};
|
|
||||||
_kdecsec'
|
|
||||||
|
|
||||||
# Deployment management.
|
# Deployment management.
|
||||||
alias kgd='kubectl get deployment'
|
alias kgd='kubectl get deployment'
|
||||||
|
|
Loading…
Reference in a new issue