Add completions to kgy and add kga

This commit is contained in:
2025-08-03 17:48:36 +02:00
parent 2f9def5d90
commit 27836f53dd
2 changed files with 8 additions and 1 deletions
+3 -1
View File
@@ -26,7 +26,8 @@
ls = "exa";
lt = "exa --tree";
tree = "exa --tree";
cat = "bat -pp";
cat = "\bat -pp";
bat = "bat -p";
# git stuff
s = "git status";
@@ -55,6 +56,7 @@
kctx = "kubectl config use-context $(kubectl config get-contexts -o name | fzf --height=10)";
kns = "kubectl config set-context --current --namespace=$(kubectl get ns -o custom-columns=':metadata.name' --no-headers | fzf --height=10)";
kg = "k get";
kga = "kg $(k api-resources --verbs=list --namespaced -o name | paste -sd ,)";
# use custom function to decode secrets data instead of a simple alias for kgy
# kgy = "k get -o yaml";
kgw = "k get -w";
+5
View File
@@ -102,3 +102,8 @@ kgy() {
kubectl get -o yaml "$@" | yq
fi
}
_kgy() {
words="kubectl get -o yaml ${words[@]:1}"
_kubectl
}
compdef _kgy kgy