mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
feat(shlvl): add repeat_offset for repeated symbol (#5289)
Signed-off-by: Vivek Kushwaha <yoursvivek@users.noreply.github.com>
This commit is contained in:
+25
-8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user