diff options
author | David Knaack <davidkna@users.noreply.github.com> | 2022-12-28 21:00:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-28 21:00:49 +0100 |
commit | 5d4cb6ff8f6bd1915aa2c16162950b270f1759b1 (patch) | |
tree | 5f780a1633103dd67e9c876fee3411da8cd0c314 /docs/config/README.md | |
parent | f183a4e4c294f6bf7c4f5a604816682cf8864555 (diff) |
feat(env_var): Add support for env_var.VAR in format (#4497)
Co-Authored-By: Segev Finer <24731903+segevfiner@users.noreply.github.com>
Co-authored-by: Segev Finer <24731903+segevfiner@users.noreply.github.com>
Diffstat (limited to 'docs/config/README.md')
-rw-r--r-- | docs/config/README.md | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index 1a875bfaf..f8b27bfd1 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -1380,6 +1380,14 @@ The module will be shown only if any of the following conditions are met: ::: tip +The order in which env_var modules are shown can be individually set by including +`${env_var.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). +By default, the `env_var` module will simply show all env_var modules in the order they were defined. + +::: + +::: tip + Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character. @@ -1396,13 +1404,14 @@ default = 'unknown user' ### Options -| Option | Default | Description | -| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | -| `symbol` | `''` | The symbol used before displaying the variable value. | -| `variable` | | The environment variable to be displayed. | -| `default` | | The default value to be displayed when the selected variable is not defined. | -| `format` | `'with [$env_value]($style) '` | The format for the module. | -| `disabled` | `false` | Disables the `env_var` module. | +| Option | Default | Description | +| ------------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `symbol` | `""` | The symbol used before displaying the variable value. | +| `variable` | | The environment variable to be displayed. | +| `default` | | The default value to be displayed when the selected variable is not defined. | +| `format` | `"with [$env_value]($style) "` | The format for the module. | +| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. | +| `disabled` | `false` | Disables the `env_var` module. | ### Variables |