summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/config/README.md26
1 files changed, 25 insertions, 1 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index 2f4c3f379..714ee8e24 100644
--- a/docs/config/README.md
+++ b/docs/config/README.md
@@ -977,12 +977,25 @@ format = "via [ $version](cyan bold) "
## Environment Variable
-The `env_var` module displays the current value of a selected environment variable.
+The `env_var` module displays the current value of a selected environment variables.
The module will be shown only if any of the following conditions are met:
- The `variable` configuration option matches an existing environment variable
- The `variable` configuration option is not defined, but the `default` configuration option is
+
+::: 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.
+
+Example: following configuration will display value of USER environment variable
+```toml
+# ~/.config/starship.toml
+
+[env_var.USER]
+default = "unknown user"
+```
+
### Options
| Option | Default | Description |
@@ -1013,6 +1026,17 @@ variable = "SHELL"
default = "unknown shell"
```
+Displaying multiple environmental variables:
+```toml
+# ~/.config/starship.toml
+
+[env_var.SHELL]
+variable = "SHELL"
+default = "unknown shell"
+[env_var.USER]
+default = "unknown user"
+```
+
## Erlang
The `erlang` module shows the currently installed version of [Erlang/OTP](https://erlang.org/doc/).