From 459dcd7f728b38ec44c72d79192ee93d6964d53d Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Mon, 14 Sep 2020 07:36:41 -0400 Subject: [PATCH] fix(comp): Disable file comp for output formats It does not make sense to suggest files to the user as output formats. Signed-off-by: Marc Khouzam --- cmd/helm/flags.go | 2 +- cmd/helm/testdata/output/output-comp.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/helm/flags.go b/cmd/helm/flags.go index 544fb7608..d1329c279 100644 --- a/cmd/helm/flags.go +++ b/cmd/helm/flags.go @@ -69,7 +69,7 @@ func bindOutputFlag(cmd *cobra.Command, varRef *output.Format) { formatNames = append(formatNames, format) } } - return formatNames, cobra.ShellCompDirectiveDefault + return formatNames, cobra.ShellCompDirectiveNoFileComp }) if err != nil { diff --git a/cmd/helm/testdata/output/output-comp.txt b/cmd/helm/testdata/output/output-comp.txt index be574756b..e7799a56b 100644 --- a/cmd/helm/testdata/output/output-comp.txt +++ b/cmd/helm/testdata/output/output-comp.txt @@ -1,5 +1,5 @@ table json yaml -:0 -Completion ended with directive: ShellCompDirectiveDefault +:4 +Completion ended with directive: ShellCompDirectiveNoFileComp