-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add completions for helm #3829
Add completions for helm #3829
Conversation
helm - is a tool for managing Kubernetes charts. Charts are packages of pre-configured Kubernetes resources. See: https://github.com/kubernetes/helm
I only skimmed the code and it looks okay from a style and correctness standpoint. I did not review it from a "is this the way we want to do things" viewpoint. I'm going to leave that to @faho or someone else. |
After some feedback from the community it seems it is good to include the chart in the release description. This adds the chart information to the description. So to say this is `Release of CHART`.
- Utilize complete -f, -r and -x properly - Add some more context aware completions (chart versions, kubectl context and namespaces)
I read up a bit more on the completions and found out that some of the things I suggested could be solved by utilizing |
I'm not a massive fan of depending on awk for anything, but I can see that builtins are a bit painful here, so I'm gonna merge this. Thanks! |
I agree, but as you say, otherwise I would have to combine many different commands and it wouldn't be as clean, some of the things I guess could be replaced by a
What do you think? Perhaps it is worth it going built-in? Thanks for the feedback, will keep in mind for further PR:s. |
The being-developed string tokenize tool might help. |
* Add completions for helm helm - is a tool for managing Kubernetes charts. Charts are packages of pre-configured Kubernetes resources. See: https://github.com/kubernetes/helm * Improve helm release completions description After some feedback from the community it seems it is good to include the chart in the release description. This adds the chart information to the description. So to say this is `Release of CHART`. * Further improvements to helm completions - Utilize complete -f, -r and -x properly - Add some more context aware completions (chart versions, kubectl context and namespaces)
This adds completions for helm. I have worked quite a lot on completions
recently and I am starting to find a pattern that seems to work for most
things. I have extensive ones for kubectl that I am working on. Perhaps
we can incorporate some of these methods and share to make it easier for
people to create completions.
About the useful changes:
occurrences. Sometimes you want to use a global switch in front of the
first command, that does not work with the usual
..._using_command
. This also ensures that you are using subcommandswith options inbetween, but making sure they come in the correct
order.
command). To make sure you don't get the completions again after
having used them once. A common problem is when using just
__fish_seen_subcommand
is that you will get that same completioninfinite amount of times.
Please let me know what you think and if you have any feedback.
About helm:
helm - is a tool for managing Kubernetes charts. Charts are packages of
pre-configured Kubernetes resources.
See: https://github.com/kubernetes/helm