summaryrefslogtreecommitdiffstats
path: root/docs/config/README.md
diff options
context:
space:
mode:
authorVivek Kushwaha <yoursvivek@users.noreply.github.com>2023-07-14 14:29:02 +0530
committerGitHub <noreply@github.com>2023-07-14 10:59:02 +0200
commit3402f0e82aab907a77f0967abb99d4cde512c069 (patch)
tree6ea124de2c66ccbb3a6c89820d8f3acd48330b8b /docs/config/README.md
parentc5edb413dda475b8f4095f7fb9d0c84aea058a48 (diff)
feat(shlvl): add repeat_offset for repeated symbol (#5289)
Signed-off-by: Vivek Kushwaha <yoursvivek@users.noreply.github.com>
Diffstat (limited to 'docs/config/README.md')
-rw-r--r--docs/config/README.md33
1 files changed, 25 insertions, 8 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index 5050631c9..47dbfdff3 100644
--- a/docs/config/README.md
+++ b/docs/config/README.md
@@ -3772,14 +3772,15 @@ set to a number and meets or exceeds the specified threshold.
### Options
-| Option | Default | Description |
-| ----------- | ---------------------------- | ------------------------------------------------------------- |
-| `threshold` | `2` | Display threshold. |
-| `format` | `'[$symbol$shlvl]($style) '` | The format for the module. |
-| `symbol` | `'↕️ '` | The symbol used to represent the `SHLVL`. |
-| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
-| `style` | `'bold yellow'` | The style for the module. |
-| `disabled` | `true` | Disables the `shlvl` module. |
+| Option | Default | Description |
+| --------------- | ---------------------------- | ------------------------------------------------------------------- |
+| `threshold` | `2` | Display threshold. |
+| `format` | `'[$symbol$shlvl]($style) '` | The format for the module. |
+| `symbol` | `'↕️ '` | The symbol used to represent the `SHLVL`. |
+| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
+| `repeat_offset` | `0` | Decrements number of times `symbol` is repeated by the offset value |
+| `style` | `'bold yellow'` | The style for the module. |
+| `disabled` | `true` | Disables the `shlvl` module. |
### Variables
@@ -3802,6 +3803,22 @@ format = '$shlvl level(s) down'
threshold = 3
```
+Using `repeat` and `repeat_offset` along with `character` module, one can get
+prompt like `❯❯❯` where last character is colored appropriately for return
+status code and preceeding characters are provided by `shlvl`.
+
+```toml
+# ~/.config/starship.toml
+
+[shlvl]
+disabled = false
+format = '[$symbol$shlvl]($style)'
+repeat = true
+symbol = '❯'
+repeat_offset = 1
+threshold = 0
+```
+
## Singularity
The `singularity` module shows the current [Singularity](https://sylabs.io/singularity/) image, if inside a container