1
0
Fork 0
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:
Harrison Kiang 2023-05-22 12:01:32 -05:00 committed by GitHub
parent ce445772ce
commit 14f66bc624
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,17 +83,9 @@ alias kgseca='kubectl get secret --all-namespaces'
alias kdsec='kubectl describe secret'
alias kdelsec='kubectl delete secret'
alias kdecsec='
_kdecsec() {
if [ $(jq --version) != "jq-1.6" ]; then
echo "kdecsec requires jq-1.6 to use the base64d format";
unset -f _kdecsec
return 1
fi
kubectl get secret "$@" -o json | jq ".data | map_values(. | @base64d )";
unset -f _kdecsec
return 0
};
_kdecsec'
kdecsec_go_template='{{range $k,$v := .data}}{{"### "}}{{$k}}{{"\n"}}{{$v|base64decode}}{{"\n\n"}}{{end}}'
alias kdecsec="kubectl get secret -o go-template='$kdecsec_go_template'"
unset kdecsec_go_template
# Deployment management.
alias kgd='kubectl get deployment'