-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: add bash completion for plugin mode of kubectl ctx and kubectl ns #380
feature: add bash completion for plugin mode of kubectl ctx and kubectl ns #380
Conversation
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 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 |
…tl ns if added to PATH and name `kubectl_complete-ns` and `kubectl_complete-ctx` these two script provide completion for ns and ctx cli in kubectl plugin mode
81898c3
to
8fb3a1a
Compare
3970029
to
c101628
Compare
34ea187
to
c347913
Compare
66fd875
to
26fcbbc
Compare
796ec13
to
cf37719
Compare
@RouxAntoine thanks for all these good commits. Do you mind sending the unrelated chores/fixes separately so I can merge them right away? |
Hello @ahmetb sorry for notification, I miss that this PR was still open. Yes I can split it. There is a part you are more interrested to pick ? Maybe I can extract
|
And for information I have made this work to start implementing support for multiple kubeconfig file. For the moment I have a first basic implementation which do not totally work, and today I start a more structured implementation by isolating the interface exposed by the |
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