evanlucas / fish-kubectl-completions

kubectl completions for fish shell
MIT License
576 stars 42 forks source link

Support alias of `kubectl` #22

Closed KristianZH closed 4 years ago

KristianZH commented 5 years ago

Now a days a lot of users use k instead of kubectl. Unfortunatelly the auto-completion does not work with k notation.

evanlucas commented 5 years ago

Ah, that is actually a fish limitation as far as I understand. I use kc and it works if you define a function for it like so:

function kc --wraps kubectl -d 'kubectl shorthand'
  kubectl $argv
end
aca commented 4 years ago

Fish has 'abbr' which replaces alias. It's feature I love most. You might try it.

abbr --global k 'kubectl'
abbr --global ka 'kubectl apply'
abbr --global kd 'kubectl describe'
abbr --global kg 'kubectl get'