fix(completion): --flag=val breaks zsh completion
fix(completion): --flag=val breaks zsh completion

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 <7503a71bc156cfc0db6c791efd79e4ef2a2ebf99@gmail.com>
Signed-off-by: Marc Khouzam <f4a9dd7a4da9e90228a1f1935992f35508714eb1@ville.montreal.qc.ca>

appscode/helm,appscode/helm