Completion with kubectl alias
jemag opened this issue · comments
I am fairly new to fish, so please excuse me if there is a straightforward way to do this that I am unaware of.
I currently have an alias for kubectl using "k". This was done with:
[k.fish]
function k
kubectl $argv
end
Is there a way to make the kubectl completion work with this "k" alias?
Works with alias k="kubectl"
in config.fish.
I thought it was equivalent to the function given above and would therefore work too.
I use abbr kc 'kubectl'
and it should handle wrapping the completions. Otherwise, IIRC, there is a --wraps
argument that can be passed to the function definition. So like function k --wraps kubectl
. Let me know if those don't work! Thanks!
That works! Thanks for the tips, I'm still slowly learning fish
Happy to help! I’m going to go ahead and close this, but please don’t hesitate to let me know if you have any other issues :)