Open RouxAntoine opened 1 year ago
Nice, but I'm trying to see if we can provide a straightforward way in krew manifests to let plugins configure how their binary is linked for completions.
For kubectx, since we're moving away from bash implementations to Go based implementations, completions might make sense to implement as a hidden subcommand. It might take me a while to get back to this.
kubectl completion for plugin call a binary named kubectl_complete-<pluginName>
so i think hidden command would not work. But yes maybe a go binary is better to benefit of classical application function.
I thought of another solution for link completion in krew with existing manifest but it doesn't work. This solution was to create link from $KREW_ROOT/store/kubectl_complete-<pluginName>
to $KREW_ROOT/bin/
but krew create only one link currently. Feel free to refuse this pull request i do this more for me than for particular contribution 🙂
if added to PATH and name
kubectl_complete-ns
andkubectl_complete-ctx
these two script provide completion for ns and ctx cli in kubectl plugin modeif this pull request is good to merge i could made another one on krew-index project to adapt the two manifest like this :
ps : maybe some change should be done to made this bash agnostic