From 681eab83f92a083cf77266787de29f1e79444867 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Tue, 24 Sep 2019 09:17:24 -0400 Subject: [PATCH] feat(comp): have zsh completion generation re-use bash code This allows that any addition to the bash completion logic be automatically added to the zsh logic. Signed-off-by: Marc Khouzam --- cmd/helm/completion.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 29919ab1e..ebe1cb02a 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -16,7 +16,6 @@ limitations under the License. package main import ( - "bytes" "io" "github.com/pkg/errors" @@ -211,9 +210,7 @@ __helm_convert_bash_to_zsh() { ` out.Write([]byte(zshInitialization)) - buf := new(bytes.Buffer) - cmd.Root().GenBashCompletion(buf) - out.Write(buf.Bytes()) + runCompletionBash(out, cmd) zshTail := ` BASH_COMPLETION_EOF