mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
parent
47976a876d
commit
90f3789057
|
@ -90,7 +90,7 @@ func (k *Kubectl) Enabled() bool {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
parseKubeConfig := k.props.GetBool(ParseKubeConfig, false)
|
parseKubeConfig := k.props.GetBool(ParseKubeConfig, true)
|
||||||
|
|
||||||
if parseKubeConfig {
|
if parseKubeConfig {
|
||||||
return k.doParseKubeConfig()
|
return k.doParseKubeConfig()
|
||||||
|
|
|
@ -128,7 +128,9 @@ func (l *language) Enabled() bool {
|
||||||
if len(l.displayMode) == 0 {
|
if len(l.displayMode) == 0 {
|
||||||
l.displayMode = l.props.GetString(DisplayMode, DisplayModeFiles)
|
l.displayMode = l.props.GetString(DisplayMode, DisplayModeFiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
l.loadLanguageContext()
|
l.loadLanguageContext()
|
||||||
|
|
||||||
switch l.displayMode {
|
switch l.displayMode {
|
||||||
case DisplayModeAlways:
|
case DisplayModeAlways:
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
|
@ -2100,7 +2100,7 @@
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"title": "Parse kubeconfig",
|
"title": "Parse kubeconfig",
|
||||||
"description": "Parse kubeconfig files instead of calling out to kubectl to improve performance.",
|
"description": "Parse kubeconfig files instead of calling out to kubectl to improve performance.",
|
||||||
"default": false
|
"default": true
|
||||||
},
|
},
|
||||||
"context_aliases": {
|
"context_aliases": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -30,12 +30,12 @@ import Config from "@site/src/components/Config.js";
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default | Description |
|
||||||
| ------------------ | :-------: | :-----: | ------------------------------------------------------------------------------- |
|
| ------------------ | :-------: | :-----: | ------------------------------------------------------------------------------- |
|
||||||
| `display_error` | `boolean` | `false` | show the error context when failing to retrieve the kubectl information |
|
| `display_error` | `boolean` | `false` | show the error context when failing to retrieve the kubectl information |
|
||||||
| `parse_kubeconfig` | `boolean` | `false` | parse kubeconfig files instead of calling out to kubectl to improve performance |
|
| `parse_kubeconfig` | `boolean` | `true` | parse kubeconfig files instead of calling out to kubectl to improve performance |
|
||||||
| `context_aliases` | `object` | | custom context namespace |
|
| `context_aliases` | `object` | | custom context namespace |
|
||||||
| `cache_timeout` | `int` | `0` | in minutes - how long is the context cached |
|
| `cache_timeout` | `int` | `0` | in minutes - how long is the context cached |
|
||||||
|
|
||||||
## Template ([info][templates])
|
## Template ([info][templates])
|
||||||
|
|
||||||
|
@ -64,6 +64,7 @@ render an empty current namespace using the word "default", you can use somethin
|
||||||
```
|
```
|
||||||
{{.Context}} :: {{if .Namespace}}{{.Namespace}}{{else}}default{{end}}
|
{{.Context}} :: {{if .Namespace}}{{.Namespace}}{{else}}default{{end}}
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
[templates]: /docs/configuration/templates
|
[templates]: /docs/configuration/templates
|
||||||
|
|
Loading…
Reference in a new issue