mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-26 03:24:04 -08:00
feat(helm): add helmfile support
This commit is contained in:
parent
9058a9778e
commit
11606ead7a
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -25,7 +25,7 @@ import Config from '@site/src/components/Config.js';
|
|||
|
||||
| Name | Type | Default | Description |
|
||||
| -------------- | :------: | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `display_mode` | `string` | `always` | <ul><li>`always`: the segment is always displayed</li><li>`files`: the segment is only displayed when a `Chart.yaml` (or `Chart.yml`) file is present </li></ul> |
|
||||
| `display_mode` | `string` | `always` | <ul><li>`always`: the segment is always displayed</li><li>`files`: the segment is only displayed when a chart source file `Chart.yaml` (or `Chart.yml`) or helmfile `helmfile.yaml` (or `helmfile.yml`) is present </li></ul> |
|
||||
|
||||
## Template ([info][templates])
|
||||
|
||||
|
|
Loading…
Reference in a new issue