mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(k8s): Add detect env vars option (#4488)
* feat(k8s): Add detect env vars option Have added the option to trigger the k8s module based on what env vars are set, this has been done in a backwards compatible way so if nothing is changed from the defaults the module will still behave the same way as before. This is similar to what I did in #4486 for the python module and if goes well I'd like to rollout to other modules. * Update src/modules/kubernetes.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update src/modules/kubernetes.rs --------- Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
@@ -2601,8 +2601,9 @@ This module is disabled by default.
|
||||
To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
When the module is enabled it will always be active, unless any of
|
||||
`detect_extensions`, `detect_files` or `detect_folders` have been set in which
|
||||
case the module will only be active in directories that match those conditions.
|
||||
`detect_env_vars`, `detect_extensions`, `detect_files` or `detect_folders` have
|
||||
been set in which case the module will only be active in directories that match
|
||||
those conditions or one of the environmatal variable has been set.
|
||||
|
||||
:::
|
||||
|
||||
@@ -2625,6 +2626,7 @@ and `user_alias` options instead.
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user