From a4a69dbcd27f6dd33c66bcd0cfb5f5fb145928d0 Mon Sep 17 00:00:00 2001 From: Harrison Kiang Date: Wed, 4 Mar 2020 23:15:20 -0600 Subject: [PATCH] styleguide --- plugins/kubectl/kubectl.plugin.zsh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh index 4f3904cec..7841c0e4d 100644 --- a/plugins/kubectl/kubectl.plugin.zsh +++ b/plugins/kubectl/kubectl.plugin.zsh @@ -55,7 +55,17 @@ alias kgswide='kgs -o wide' alias kes='kubectl edit svc' alias kds='kubectl describe svc' alias kdels='kubectl delete svc' -alias kdecs='_check_jq(){ if [ $(jq --version) != "jq-1.6" ]; then echo "kdecs requires jq-1.6 to use the base64d format"; fi; unset -f _check_jq}; _check_jq; _kdecs(){kubectl get secret "$@" -o json | jq ".data | map_values(. | @base64d )"; unset -f _kdecs}; _kdecs' +alias kdecs=' +_kdecs() { + if [ $(jq --version) != "jq-1.6" ]; then + echo "kdecs requires jq-1.6 to use the base64d format"; + return 1 + fi + kubectl get secret "$@" -o json | jq ".data | map_values(. | @base64d )"; + unset -f _kdecs + return 0 +}; +_kdecs' # Ingress management alias kgi='kubectl get ingress'