From b10c6bc6e02bbd6058d1468023b99d8372a37ee7 Mon Sep 17 00:00:00 2001 From: Antonin Date: Wed, 17 Jul 2024 13:07:00 +0200 Subject: [PATCH] helm: Add support for values files (#2428) * helm: Add support for values files * fix order --------- Co-authored-by: rsteube --- completers/helm_completer/cmd/install.go | 1 + completers/helm_completer/cmd/lint.go | 1 + completers/helm_completer/cmd/template.go | 1 + completers/helm_completer/cmd/upgrade.go | 1 + 4 files changed, 4 insertions(+) diff --git a/completers/helm_completer/cmd/install.go b/completers/helm_completer/cmd/install.go index abd98c6703..ae226de952 100644 --- a/completers/helm_completer/cmd/install.go +++ b/completers/helm_completer/cmd/install.go @@ -72,6 +72,7 @@ func init() { } }) }), + "values": carapace.ActionFiles(".yaml", ".yml"), "version": carapace.ActionCallback(func(c carapace.Context) carapace.Action { if len(c.Args) > 1 { if splitted := strings.Split(c.Args[1], "/"); len(splitted) == 2 { diff --git a/completers/helm_completer/cmd/lint.go b/completers/helm_completer/cmd/lint.go index c76842238b..23de2a97cc 100644 --- a/completers/helm_completer/cmd/lint.go +++ b/completers/helm_completer/cmd/lint.go @@ -33,6 +33,7 @@ func init() { } }) }), + "values": carapace.ActionFiles(".yaml", ".yml"), }) carapace.Gen(lintCmd).PositionalCompletion( diff --git a/completers/helm_completer/cmd/template.go b/completers/helm_completer/cmd/template.go index 12a823d46f..0b4719fe58 100644 --- a/completers/helm_completer/cmd/template.go +++ b/completers/helm_completer/cmd/template.go @@ -76,6 +76,7 @@ func init() { } }) }), + "values": carapace.ActionFiles(".yaml", ".yml"), }) // TODO positional completion diff --git a/completers/helm_completer/cmd/upgrade.go b/completers/helm_completer/cmd/upgrade.go index f4b8db43b1..0151deb727 100644 --- a/completers/helm_completer/cmd/upgrade.go +++ b/completers/helm_completer/cmd/upgrade.go @@ -76,6 +76,7 @@ func init() { } }) }), + "values": carapace.ActionFiles(".yaml", ".yml"), "version": carapace.ActionCallback(func(c carapace.Context) carapace.Action { if len(c.Args) > 1 { if splitted := strings.Split(c.Args[1], "/"); len(splitted) == 2 {