helm: helm completion fails in zsh (prezto) with "bad math expression: operand expected"
I noticed helm completion in zsh is not working. One part of the problem is that _helm is not executable per default. Second when I type helm and hit tab I get:
helm _helm_root_command:12: bad math expression: operand expected at `"del"'
I found that removing the doublequotes in _helm at every aliashash key value fixes it. (/usr/local/Cellar/kubernetes-helm/2.12.0/share/zsh/site-functions/_helm)
not working:
aliashash["del"]="delete"
fixed:
aliashash[del]="delete"
I am using prezto and I installed helm with homebrew.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 61
- Comments: 18 (9 by maintainers)
Commits related to this issue
- Fixes #5046, zsh completion Signed-off-by: Peter Stalman <sarkedev@gmail.com> — committed to Sarke/helm by Sarke 6 years ago
- Fixes #5046, zsh completion (#5072) Signed-off-by: Peter Stalman <sarkedev@gmail.com> — committed to helm/helm by Sarke 5 years ago
- add customize helm plugin Fix https://github.com/helm/helm/issues/5046 — committed to thuandt/dotfiles by deleted user 5 years ago
- Fix #5046 compatible with MacOS Signed-off-by: Marc Khouzam <marc.khouzam@ville.montreal.qc.ca> — committed to VilledeMontreal/helm by marckhouzam 5 years ago
- Fixes #5046, zsh completion (#5072) Signed-off-by: Peter Stalman <sarkedev@gmail.com> (cherry picked from commit 4c1edcf0492f7e6a315dbeced3c008e96a40bc47) — committed to adamreese/helm by Sarke 5 years ago
- Fixes #5046, zsh completion (#5072) Signed-off-by: Bartel Sielski <bsielski@nalys-group.com> (cherry picked from commit 4c1edcf0492f7e6a315dbeced3c008e96a40bc47) — committed to adamreese/helm by Sarke 5 years ago
- Fixes #5046, zsh completion (#5072) Signed-off-by: Peter Stalman <sarkedev@gmail.com> (cherry picked from commit 4c1edcf0492f7e6a315dbeced3c008e96a40bc47) — committed to adamreese/helm by Sarke 5 years ago
- Fixes #5046, zsh completion (#5072) Signed-off-by: Peter Stalman <sarkedev@gmail.com> (cherry picked from commit 4c1edcf0492f7e6a315dbeced3c008e96a40bc47) — committed to adamreese/helm by Sarke 5 years ago
- Fix #5046 compatible with MacOS (#5406) Signed-off-by: Marc Khouzam <marc.khouzam@ville.montreal.qc.ca> (cherry picked from commit c94c00915f29fba5e816c277ff617babb3790cb1) — committed to adamreese/helm by marckhouzam 5 years ago
- Fix #5046 compatible with MacOS (#5406) Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com> (cherry picked from commit c94c00915f29fba5e816c277ff617babb3790cb1) — committed to adamreese/helm by marckhouzam 5 years ago
- Fixes #5046, zsh completion (#5072) Signed-off-by: Peter Stalman <sarkedev@gmail.com> Signed-off-by: Kevin Labesse <kevin@labesse.me> — committed to eraac/helm by Sarke 5 years ago
- Fix #5046 compatible with MacOS (#5406) (cherry picked from commit c94c00915f29fba5e816c277ff617babb3790cb1) Signed-off-by: Marc Khouzam <marc.khouzam@ville.montreal.qc.ca> — committed to helm/helm by marckhouzam 5 years ago
- (helm): Proper fix for #5046 PR #5072 followed by #5406 tweaked the handling of the associative array 'aliashash' when in zsh. However, upon further investigation the root of the problem was the 'al... — committed to VilledeMontreal/helm by marckhouzam 5 years ago
quick local fix in .zshrc…
hope it will fix in the next release. Current rc does not fix it
Still not fixed yet.
Thanks to @arogarth and @koenpunt
I fixed this by changing file
~/.oh-my-zsh/plugins/helm/helm.plugin.zshto:Having the same issue with helm v2.12.2:
Running ZSH under OSX:
When installed through Homebrew you can use the following to fix autocompletion:
Don’t forget to reload your shell; this can be done by opening a new window, or by running
exec $SHELLfixed via #5406, hopefully for real this time! 😄
Hey there, I was wondering when this change might make it in? Happy New Year.
Or use the canary releases: https://docs.helm.sh/using_helm/#from-canary-builds
@NZhuravlev this fix made it in after v2.12.3 shipped. You’ll unfortunately have to wait for the next release or build from source.
v2.12.3 - still have the same issue.
helm _helm_root_command:12: bad math expression: operand expected at `“del”’ macOS 10.14.2 (18C54) zsh 5.3 (x86_64-apple-darwin18.0) Client: &version.Version{SemVer:“v2.12.3”, GitCommit:“eecf22f77df5f65c823aacd2dbd30ae6c65f186e”, GitTreeState:“clean”}
@bacongobbler having the same issue with 2.13.0-rc.1: