evanlucas / fish-kubectl-completions

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

Switching cluster & namespace: breaks autocomplete #24

Open jannickj opened 4 years ago

jannickj commented 4 years ago

Setting namespace works :) and setting cluster works :), but using both break the autocomplete :( i.e: kubectl -n [namespace] ✔️ kubectl --cluster [cluster] ✔️ kubectl -n [namespace] --cluster [cluster]

Is this feasible to fix? I looked at the code there seems to be a lot happening so I don't know if it can be fixed with a simple tweak.

evanlucas commented 4 years ago

hm this seems to be working for me. I would recommend you pass context before namespace though, that way you can get the namespace to autocomplete. (The namespaces available will depend on the current context). What version of kubectl are you using? And what version of Kubernetes?