mirror of https://github.com/helm/helm
This is a bug I ran into when working on Helm completion. I was surprised that it didn't happen when I was using kubectl, so I investigated and found a PR that fixed this bug in kubectl: https://github.com/kubernetes/kubernetes/pull/48553 I duplicated the code in this commit which: Removes __helm_declare, which is safe to do since `declare -F` is already replaced to `whence -w` by __helm_convert_bash_to_zsh(). The problem was that calling "declare" from inside a function scopes the declaration to that function only. So "declare" should not be called through __helm_declare() but instead directly. To reproduce: 1- setup helm completion in zsh 2- helm --kubeconfig=$HOME/.kube/config statu<TAB> you will get the error: __helm_handle_flag:27: bad math expression: operand expected at end of string Co-authored-by: Kazuki Suda <kazuki.suda@gmail.com> Signed-off-by: Marc Khouzam <marc.khouzam@ville.montreal.qc.ca>pull/6389/head
parent
d285097f58
commit
251a4235a6
Loading…
Reference in new issue