summaryrefslogtreecommitdiffstats
path: root/docs/zh-CN/config/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/zh-CN/config/README.md')
-rw-r--r--docs/zh-CN/config/README.md33
1 files changed, 24 insertions, 9 deletions
diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md
index 0927b2214..9807ad5dd 100644
--- a/docs/zh-CN/config/README.md
+++ b/docs/zh-CN/config/README.md
@@ -1060,7 +1060,7 @@ format = 'via [🦕 $version](green bold) '
`directory` 组件显示当前目录的路径,显示的路径会截断到三个父目录以内。 如果您处于一个 git 仓库中,显示的路径则最多会截断到该仓库的根目录。
-当使用 fish 风格的当前目录显示样式时,您会看到基于您的设置的每个上级目录的短名称,而不是隐藏被截断的上级目录。
+When using the `fish_style_pwd_dir_length` option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
例如,对于 `~/Dev/Nix/nixpkgs/pkgs`,其中 `nixpkgs` 是 git 仓库根目录,fish 风格相关选项设置为 `1`。 您将会看到 `~/D/N/nixpkgs/pkgs`,而在设置 fish 风格之前,当前路径将显示成 `nixpkgs/pkgs`。
@@ -3607,14 +3607,15 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
### 配置项
-| 选项 | 默认值 | 描述 |
-| ----------- | ---------------------------- | ------------------------------------------------------------- |
-| `threshold` | `2` | Display threshold. |
-| `format` | `'[$symbol$shlvl]($style) '` | 组件格式化模板。 |
-| `符号` | `'↕️ '` | The symbol used to represent the `SHLVL`. |
-| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
-| `style` | `'bold yellow'` | 此组件的样式。 |
-| `disabled` | `true` | Disables the `shlvl` module. |
+| 选项 | 默认值 | 描述 |
+| --------------- | ---------------------------- | ------------------------------------------------------------------- |
+| `threshold` | `2` | Display threshold. |
+| `format` | `'[$symbol$shlvl]($style) '` | 组件格式化模板。 |
+| `符号` | `'↕️ '` | 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'` | 此组件的样式。 |
+| `disabled` | `true` | Disables the `shlvl` module. |
### 变量
@@ -3637,6 +3638,20 @@ 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 and `$SINGULARITY_NAME` is set.