Skip to content

Helm fetch renamed to helm pull in Helm 3 #7357

Closed

Description

Activity

  1. thernstig commented on Sep 28, 2020

    @thernstig
    ContributorAuthor

    I suppose the best idea would have been if some hero stepped in and added completions to the Helm project itself, see https://helm.sh/docs/helm/helm_completion/. There only exists completions for bash and zsh there, and I am sure we all agree that's not the way we fish users want it 😄

  2. exploide commented on Sep 28, 2020

    @exploide
    Contributor

    I don't use helm by myself but a search on the project reveals a recently merged PR that adds support for fish completions: helm/helm#8664

    This makes sense since helm seems to use the Go framework cobra for generating completions which recently got support for fish. So this should mostly work automatic.

    Can you try generating completions with helm completion fish with a reasonably up-to-date helm? Maybe the documentation is just outdated.

    If it works, I guess it would be a good further step to update the helm.fish completion shipped by fish to automatically generate and source the completions with the command above.

  3. thernstig commented on Sep 29, 2020

    @thernstig
    ContributorAuthor

    I tried on the latest Helm version 3.3.4, with no luck. I suspect it will make it into 3.4.0 which is the next feature release.

    I added a comment to helm/helm#8664, so let's see what they say.

    I assume that once it is released, this issue should also stay open to implement the suggestion @exploide has to automatically source that command?

  4. faho commented on Oct 3, 2020

    @faho
    Member

    I assume that once it is released, this issue should also stay open to implement the suggestion @exploide has to automatically source that command?

    Probably not. These things typically spit out very complete but awkward completions, specifically with bad or nonexistent descriptions.

    They're also often quite slow.

    It's often better to run the thing and use it as a guide to write good completions.

  5. added this to the fish-future milestone on Oct 3, 2020
  6. marckhouzam commented on Nov 3, 2020

    @marckhouzam

    Helm 3.4 is now available with full Fish shell completion: https://helm.sh/docs/helm/helm_completion_fish/

    I assume that once it is released, this issue should also stay open to implement the suggestion @exploide has to automatically source that command?

    Probably not. These things typically spit out very complete but awkward completions, specifically with bad or nonexistent descriptions.

    In this case, each completion is accompanied by a proper description.

    They're also often quite slow.

    This could be the case. I'd love your opinion on the performance.

    It's often better to run the thing and use it as a guide to write good completions.

    Helm provides some dynamic completions where it figures out what the completions should be, based on the server it is currently connected to. You can still achieve this if you wrote your own completions, but you would need to call helm to obtain those dynamic completions.

    I'd appreciate any feedback on the quality of Helm's Fish shell completions, to improve whatever can be improved.

  7. marckhouzam commented on Nov 3, 2020

    @marckhouzam

    As a side note, kubectl has a PR (kubernetes/kubernetes#92989) to support Fish shell completion (requested in #5516). It is based on the same solution Helm uses, which is provided by the Cobra project: https://github.com/spf13/cobra/blob/master/shell_completions.md#fish-completions

  8. thernstig commented on Nov 5, 2020

    @thernstig
    ContributorAuthor

    @marckhouzam I have tested it, and it works great with the new completions. A question though. Do I need to re-run this helm completion fish > ~/.config/fish/completions/helm.fish on a regular basis to get the latest completions? That would be quite cumbersome. Imagine having a lot of projects requiring this, it'd become unmanageable or each user would have to automate this themselves. Is there any "fish way" to handle this generically without requiring me to do this?

  9. marckhouzam commented on Nov 5, 2020

    @marckhouzam

    @marckhouzam I have tested it, and it works great with the new completions.

    Thanks for trying it out @thernstig!

    A question though. Do I need to re-run this helm completion fish > ~/.config/fish/completions/helm.fish on a regular basis to get the latest completions? [..] Is there any "fish way" to handle this generically without requiring me to do this?

    I'm no fish expert so others can probably answer better. I'll give you my take on this though.

    As long as you stay on the same helm version, you only need to generate the completion script once. But when you install a new helm version, you would need to re-generate it. Some package managers do this for you. For example, on Mac, Homebrew installs the bash and zsh completion scripts for helm whenever it installs or updates helm. I will follow-up with them to try to include fish now that helm supports it (if it isn't done already).

    Another option is to source the completion script whenever you start a new shell. Adding helm completion fish | source to your fish initialization file should allow automating this. However this makes shell startup slower, so some people don't like doing that.

  10. marckhouzam commented on Nov 5, 2020

    @marckhouzam

    Oh and another problem with sourcing the completion script with helm 3.4 is that it will not remove fish's existing helm completions, so you would get invalid old ones left lying around. With helm 3.5 I have fixed that.

  11. exploide commented on Nov 5, 2020

    @exploide
    Contributor

    I guess you can put helm completion fish | source in your ~/.config/fish/completions/helm.fish.

    At least pipenv is doing something similar. See pipenv --completion 2>/dev/null | source in https://github.com/fish-shell/fish-shell/blob/master/share/completions/pipenv.fish

    It would be interesting to see how this performs since it would be executed whenever you use helm in a new shell instance.
    Maybe it is good enough to please the objections mentioned by faho?

  12. exploide commented on Feb 16, 2022

    @exploide
    Contributor

    I think this one can be closed since the referencing PR above is merged.

  13. modified the milestones: fish-future, fish 3.4.0 on Feb 16, 2022
  14. thernstig commented on Feb 17, 2022

    @thernstig
    ContributorAuthor

    @marckhouzam considering fish will in the next release call helm completion fish | source itself, see https://github.com/fish-shell/fish-shell/pull/8724/files, should https://helm.sh/docs/helm/helm_completion_fish/ be updated to not show helm completion fish > ~/.config/fish/completions/helm.fish?

  15. locked as resolved and limited conversation to collaborators on Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions