summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAndrew Pantuso <ajpantuso@gmail.com>2023-12-17 02:22:29 -0500
committerGitHub <noreply@github.com>2023-12-17 08:22:29 +0100
commite47bfbabb9b7d6af12a29db9413a6ec03fba174b (patch)
treeef6ca7ea19ae1e30fb23d66fb19fe09a8f668fa6 /docs
parent6d96df3c6828161bb9dc922fe45ef35a1ce33771 (diff)
feat(direnv): add new direnv module (#5157)
Diffstat (limited to 'docs')
-rw-r--r--docs/config/README.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index 25b52b0d9..046ad01d4 100644
--- a/docs/config/README.md
+++ b/docs/config/README.md
@@ -337,6 +337,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -1208,6 +1209,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | The style for the module. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `['.envrc']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variables
+
+| Variable | Example | Description |
+| -------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Mirrors the value of option `symbol`. |
+| style\* | `red bold` | Mirrors the value of option `style`. |
+
+*: This variable can only be used as a part of a style string
+
+### Example
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## Docker Context
The `docker_context` module shows the currently active