diff --git a/src/segments/helm.go b/src/segments/helm.go index 9df1e745..9fa4d830 100644 --- a/src/segments/helm.go +++ b/src/segments/helm.go @@ -19,7 +19,7 @@ func (h *Helm) Enabled() bool { } inChart := false - files := []string{"Chart.yml", "Chart.yaml"} + files := []string{"Chart.yml", "Chart.yaml", "helmfile.yaml", "helmfile.yml"} for _, file := range files { if _, err := h.env.HasParentFilePath(file); err == nil { inChart = true diff --git a/src/segments/helm_test.go b/src/segments/helm_test.go index 83e5d4a3..f7a299e2 100644 --- a/src/segments/helm_test.go +++ b/src/segments/helm_test.go @@ -57,6 +57,22 @@ func TestHelmSegment(t *testing.T) { DisplayMode: "files", ChartFile: "Chart.yaml", }, + { + Case: "DisplayMode always inside chart. Chart file helmfile.yaml", + HelmExists: true, + ExpectedEnabled: true, + ExpectedString: "Helm 3.12.3", + DisplayMode: "files", + ChartFile: "helmfile.yaml", + }, + { + Case: "DisplayMode always inside chart. Chart file helmfile.yml", + HelmExists: true, + ExpectedEnabled: true, + ExpectedString: "Helm 3.12.3", + DisplayMode: "files", + ChartFile: "helmfile.yml", + }, { Case: "DisplayMode always outside chart", HelmExists: true, diff --git a/website/docs/segments/helm.mdx b/website/docs/segments/helm.mdx index b232c151..58fc7e07 100644 --- a/website/docs/segments/helm.mdx +++ b/website/docs/segments/helm.mdx @@ -25,7 +25,7 @@ import Config from '@site/src/components/Config.js'; | Name | Type | Default | Description | | -------------- | :------: | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `display_mode` | `string` | `always` |