summaryrefslogtreecommitdiffstats
path: root/docs/zh-CN
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.dev>2021-12-21 00:05:59 +0300
committerGitHub <noreply@github.com>2021-12-20 16:05:59 -0500
commit5de3f18bcef92cabb2d7a4552abcff295422f26c (patch)
treead30252ae3257835ba64e9721b7b8fb32aa23015 /docs/zh-CN
parent006fbf0dd5b28f2d2f4f69a82c9a5a9a5344ac26 (diff)
docs(i18n): new Crowdin updates (#3218)
Diffstat (limited to 'docs/zh-CN')
-rw-r--r--docs/zh-CN/advanced-config/README.md30
-rw-r--r--docs/zh-CN/config/README.md399
-rw-r--r--docs/zh-CN/faq/README.md12
-rw-r--r--docs/zh-CN/guide/README.md4
-rw-r--r--docs/zh-CN/presets/README.md6
5 files changed, 264 insertions, 187 deletions
diff --git a/docs/zh-CN/advanced-config/README.md b/docs/zh-CN/advanced-config/README.md
index 08ee734c9..6350c0de0 100644
--- a/docs/zh-CN/advanced-config/README.md
+++ b/docs/zh-CN/advanced-config/README.md
@@ -43,11 +43,11 @@ function Invoke-Starship-PreCommand {
}
```
-## Change Window Title
+## 更改窗口标题
-Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
+一些 shell 会自动更改您的窗口标题(比如改成您的工作目录)。 Fish 甚至默认会执行此功能。 Starship 没有实现此功能,但将这个功能添加到 `bash` 或 `zsh` 是相当简单的。
-First, define a window title change function (identical in bash and zsh):
+首先,定义窗口标题更改函数(在 bash 和 zsh 中相同):
```bash
function set_win_title(){
@@ -55,23 +55,23 @@ function set_win_title(){
}
```
-You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
+您可以使用变量来定制标题(常用的有 `$USER`,`$HOSTNAME` 和 `$PWD`)。
-In `bash`, set this function to be the precmd starship function:
+在 `bash` 中,设置此函数为 starship 预执行函数:
```bash
starship_precmd_user_func="set_win_title"
```
-In `zsh`, add this to the `precmd_functions` array:
+在 `zsh`中,将此函数添加到 `reservmd_functions` 列表:
```bash
precmd_functions+=(set_win_title)
```
-If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
+如果您对产生的效果感到满意,请将以上代码添加到您的 shell 配置文件(`~/.bashrc` 或 `~/zsrhc`)中以使其永久化。
-For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
+例如,如果您想要在终端标签标题中显示当前目录, 将以下代码添加到您的 `~/.ashrc` 或 `~/.zshrc`:
```bash
function set_win_title(){
@@ -91,9 +91,9 @@ function Invoke-Starship-PreCommand {
Invoke-Expression (&starship init powershell)
```
-## Enable Right Prompt
+## 启用右侧提示
-Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
+一些 Shell 支持右侧提示, 它与输入区渲染在同一行。 Starship 可以设置右侧提示的内容,使用 `right_format` 选项。 Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
@@ -120,7 +120,7 @@ Produces a prompt like the following:
## 样式设定
-Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
+样式字符串是用空格分隔的单词列表。 其中单词不是大小写敏感的(例如 `bold` 和 `BoLd` 被视为同一字符串)。 每个单词可以是以下之一:
- `bold`
- `italic`
@@ -132,14 +132,14 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- `<color>`
- `none`
-where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
+`<color>` 是颜色说明符(下面解释)。 `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. 字符串中的单词顺序不影响显示结果。
-The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
+The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. 未来可能会将 `none` 与其它标识符一起使用视为一种错误。
-A color specifier can be one of the following:
+颜色说明符可以是以下内容之一:
- 标准终端颜色之一:`black`,`red`,`green`,`blue`,`yellow`,`purple`,`cyan`,`white`。 您可以使用可选前缀 `bright-` 来获取明亮版本的颜色(例如,`bright-white`)。
- 一个 `#` 后跟一个六位十六进制数。 这将指定一个 [十六进制 RGB 颜色代码](https://www.w3schools.com/colors/colors_hexadecimal.asp)。
- 0-255 之间的数字。 这将指定一个 [8 位 ANSI 颜色码](https://i.stack.imgur.com/KTSQa.png)。
-If multiple colors are specified for foreground/background, the last one in the string will take priority.
+如果为文本/背景指定了多个颜色,字符串中最后指定的颜色将具有最高优先级。
diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md
index 1919248a5..a42cba707 100644
--- a/docs/zh-CN/config/README.md
+++ b/docs/zh-CN/config/README.md
@@ -61,7 +61,7 @@ Format strings are the format that a module prints all its variables with. Most
#### 字段
-A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`.
+A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`.
For example:
@@ -106,18 +106,11 @@ For example:
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`.
-#### Escapable characters
+#### Special characters
-The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`).
+The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`.
-- \$
-- \\
-- [
-- ]
-- (
-- )
-
-Note that `toml` has [its own escape syntax](https://github.com/toml-lang/toml#user-content-string). It is recommended to use a literal string (`''`) in your config. If you want to use a basic string (`""`), pay attention to escape the backslash `\`.
+Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`).
For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent:
@@ -231,9 +224,11 @@ $memory_usage\
$aws\
$gcloud\
$openstack\
+$azure\
$env_var\
$crystal\
$custom\
+$sudo\
$cmd_duration\
$line_break\
$jobs\
@@ -325,22 +320,47 @@ style = "bold blue"
symbol = "🅰 "
```
+## Azure
+
+The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file.
+
+### 配置项
+
+| 字段 | 默认值 | 描述 |
+| ---------- | ---------------------------------------- | ------------------------------------------ |
+| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. |
+| `symbol` | `"ﴃ "` | The symbol used in the format. |
+| `style` | `"blue bold"` | The style used in the format. |
+| `disabled` | `true` | Disables the `azure` module. |
+
+### 示例
+
+```toml
+# ~/.config/starship.toml
+
+[azure]
+disabled = false
+format = "on [$symbol($subscription)]($style) "
+symbol = "ﴃ "
+style = "blue bold"
+```
+
## Battery
-`battery` 组件显示电池充电情况和当前充电状态。 这个组件只会在当前电量低于 10% 时显示。
+The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
### 配置项
-| Option | 默认值 | 描述 |
-| -------------------- | --------------------------------- | ---------------- |
-| `full_symbol` | `" "` | 显示于电池充满时。 |
-| `charging_symbol` | `" "` | 显示于正在充电时。 |
-| `discharging_symbol` | `" "` | 显示于电池放电时。 |
-| `unknown_symbol` | `" "` | 显示于电池状态未知时 |
-| `empty_symbol` | `" "` | 显示于电池状态为空时 |
-| `format` | `"[$symbol$percentage]($style) "` | 组件格式化模板。 |
-| `display` | [见下文](#battery-display) | 电量显示阈值和样式。 |
-| `disabled` | `false` | 禁用 `battery` 组件。 |
+| Option | 默认值 | 描述 |
+| -------------------- | --------------------------------- | --------------------------------------------------- |
+| `full_symbol` | `" "` | The symbol shown when the battery is full. |
+| `charging_symbol` | `" "` | The symbol shown when the battery is charging. |
+| `discharging_symbol` | `" "` | The symbol shown when the battery is discharging. |
+| `unknown_symbol` | `" "` | The symbol shown when the battery state is unknown. |
+| `empty_symbol` | `" "` | The symbol shown when the battery state is empty. |
+| `format` | `"[$symbol$percentage]($style) "` | 组件格式化模板。 |
+| `display` | [见下文](#battery-display) | Display threshold and style for the module. |
+| `disabled` | `false` | Disables the `battery` module. |
### 示例
@@ -353,9 +373,9 @@ charging_symbol = "⚡️ "
discharging_symbol = "💀 "
```
-### Battery 组件的显示
+### Battery Display
-The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果 `display` 没有设置, 默认设置如下:
+The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. 默认设置如下:
```toml
[[battery.display]]
@@ -367,12 +387,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
#### 配置项
-`display` 字段的子字段如下:
+The `display` option is an array of the following table.
| Option | 默认值 | 描述 |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
-| `threshold` | `10` | 当前显示设置的电量上限(见示例) |
-| `style` | `bold red` | 若组件被显示,则使用此样式 |
+| `threshold` | `10` | The upper bound for the display option. |
+| `style` | `bold red` | The style used if the display option is in use. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
@@ -394,9 +414,9 @@ discharging_symbol = "💦"
## Character
-`character` 组件用于在您输入终端的文本旁显示一个字符(通常是一个箭头)。
+The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
-这个字符可以告诉您最后一个命令是否执行成功。 It can do this in two ways:
+The character will tell you whether the last command was successful or not. It can do this in two ways:
- changing color (`red`/`green`)
- changing shape (`❯`/`✖`)
@@ -423,7 +443,7 @@ By default it only changes color. If you also want to change its shape take a lo
| `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. |
| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. |
| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. |
-| `disabled` | `false` | 禁用 `character` 组件。 |
+| `disabled` | `false` | Disables the `character` module. |
### Variables
@@ -524,27 +544,27 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
## Command Duration
-`cmd_duration` 组件显示上一个命令执行的时间。 此组件只在命令执行时间长于两秒时显示,或者当其 `min_time` 字段被设置时,按此值为执行时间的显示下限。
+The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
-::: warning 不要在 Bash 里捕获 DEBUG 信号
+::: warning Do not hook the DEBUG trap in Bash
-如果您正在 `bash` 上使用 Starship,在运行 `eval $(starship)` 后,不要捕获 `DEBUG` 信号,否则此组件**将会**坏掉。
+If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
:::
-需要在自动每一条命令前执行某些操作的 Bash 用户可以使用 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只需要在执行 `eval $(starship init $0)` 前简单地定义 `preexec_functions` 和 `precmd_functions` 两个列表,就可以照常运行了。
+Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
### 配置项
-| Option | 默认值 | 描述 |
-| -------------------- | ----------------------------- | ----------------------------------------------------- |
-| `min_time` | `2_000` | 显示此组件所需的最短执行时长(单位:毫秒)。 |
-| `show_milliseconds` | `false` | 除了秒数外在执行时长中额外显示毫秒。 |
-| `format` | `"took [$duration]($style) "` | 组件格式化模板。 |
-| `style` | `"bold yellow"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `cmd_duration` 组件。 |
-| `show_notifications` | `false` | Show desktop notifications when command completes. |
-| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
+| Option | 默认值 | 描述 |
+| -------------------- | ----------------------------- | ---------------------------------------------------------- |
+| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
+| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
+| `format` | `"took [$duration]($style) "` | 组件格式化模板。 |
+| `style` | `"bold yellow"` | 此组件的样式。 |
+| `disabled` | `false` | Disables the `cmd_duration` module. |
+| `show_notifications` | `false` | Show desktop notifications when command completes. |
+| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
::: tip
@@ -577,20 +597,20 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e
::: tip
-此组件没有禁用 conda 自带的提示符修改,您可能需要执行 `conda config --set changeps1 False`。
+This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
:::
### 配置项
-| Option | 默认值 | 描述 |
-| ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
-| `truncation_length` | `1` | 如果这个 conda 环境是通过 `conda create -p [path]` 创建的,环境路径的目录深度应该被截断到此数量。 `0` 表示不用截断。 另请参阅 [`directory`](#directory) 组件。 |
-| `symbol` | `"🅒 "` | 在环境名之前显示的符号。 |
-| `style` | `"bold green"` | 此组件的样式。 |
-| `format` | `"via [$symbol$environment]($style) "` | 组件格式化模板。 |
-| `ignore_base` | `true` | Ignores `base` environment when activated. |
-| `disabled` | `false` | 禁用 `conda` 组件。 |
+| Option | 默认值 | 描述 |
+| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. |
+| `symbol` | `"🅒 "` | The symbol used before the environment name. |
+| `style` | `"bold green"` | 此组件的样式。 |
+| `format` | `"via [$symbol$environment]($style) "` | 组件格式化模板。 |
+| `ignore_base` | `true` | Ignores `base` environment when activated. |
+| `disabled` | `false` | Disables the `conda` module. |
### Variables
@@ -615,7 +635,7 @@ format = "[$symbol$environment](dimmed green) "
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met:
-- 当前目录包含 `shard.yml` 文件
+- The current directory contains a `shard.yml` file
- The current directory contains a `.cr` file
### 配置项
@@ -656,7 +676,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
- The current directory contains a file with `.dart` extension
- The current directory contains a `.dart_tool` directory
-- 当前目录包含 `pubspec.yaml`,`pubspec.yml` 或 `pubspec.lock` 文件
+- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file
### 配置项
@@ -727,21 +747,21 @@ format = "via [🦕 $version](green bold) "
## Directory
-`directory` 组件显示当前目录的路径,显示的路径会截断到三个父目录以内。 如果您处于一个 git 仓库中,显示的路径则最多会截断到该仓库的根目录。
+The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
-当使用 fish 风格的当前目录显示样式时,您会看到基于您的设置的每个上级目录的短名称,而不是隐藏被截断的上级目录。
+When using the fish style pwd 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`。
+For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
### 配置项
| Option | 默认值 | 描述 |
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------- |
-| `truncation_length` | `3` | 当前目录路径被截断后最多保留的父目录数量。 |
-| `truncate_to_repo` | `true` | 是否只截断到您当前处于的 git 仓库根目录下。 |
+| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
+| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | 组件格式化模板。 |
| `style` | `"bold cyan"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `directory` 组件。 |
+| `disabled` | `false` | Disables the `directory` module. |
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
@@ -749,12 +769,12 @@ format = "via [🦕 $version](green bold) "
| `home_symbol` | `"~"` | The symbol indicating home directory. |
<details>
-<summary>此组件有几个高级配置选项来控制当前目录路径的显示方式。</summary>
+<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
| Advanced Option | 默认值 | 描述 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `substitutions` | | A table of substitutions to be made to the path. |
-| `fish_style_pwd_dir_length` | `0` | 使用 fish shell 当前目录路径逻辑时每个省略目录名使用的字符数。 |
+| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD.
@@ -826,7 +846,7 @@ format = "via [🐋 $context](blue bold)"
## Dotnet
-The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 如果当前目录已被绑定了一个版本的 SDK,则显示被帮定的版本。 否则此组件将显示最新安装的 SDK 版本。
+The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
By default this module will only be shown in your prompt when one or more of the following files are present in the current directory:
@@ -841,7 +861,7 @@ By default this module will only be shown in your prompt when one or more of the
You'll also need the .NET Core SDK installed in order to use it correctly.
-在内部,此组件使用自己的版本检测机制。 一般来说此组件是直接执行 `dotnet --version` 的两倍快,但当你的 .NET 项目使用了不常见的目录布局时此组件可能显示一个错误的版本。 如果相比于速度您更需要正确的版本号,您可以在组件设置中设置 `heuristic = false` 来禁用该机制。
+Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
@@ -851,13 +871,13 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | 组件格式化模板。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `".NET "` | 这个字段的内容会显示在当前 .NET 版本之前。 |
-| `heuristic` | `true` | 使用更快的版本探测机制以保证 starship 的运行速度。 |
+| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
+| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `dotnet` 组件。 |
+| `disabled` | `false` | Disables the `dotnet` module. |
### Variables
@@ -885,7 +905,7 @@ heuristic = false
The `elixir` module shows the currently installed version of [Elixir](https://elixir-lang.org/) and [Erlang/OTP](https://erlang.org/doc/). By default the module will be shown if any of the following conditions are met:
-- 当前目录包含 `mix.exs` 文件.
+- The current directory contains a `mix.exs` file.
### 配置项
@@ -924,8 +944,8 @@ symbol = "🔮 "
The `elm` module shows the currently installed version of [Elm](https://elm-lang.org/). By default the module will be shown if any of the following conditions are met:
-- 当前目录包含 `elm.json` 文件
-- 当前目录包含 `elm-package.json` 文件
+- The current directory contains a `elm.json` file
+- The current directory contains a `elm-package.json` file
- The current directory contains a `.elm-version` file
- The current directory contains a `elm-stuff` folder
- The current directory contains a `*.elm` files
@@ -964,10 +984,10 @@ format = "via [ $version](cyan bold) "
## Environment Variable
-The `env_var` module displays the current value of a selected environment variables. 此组件只有满足以下条件之一时才会被显示:
+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:
-- 设置的 `variable` 是一个已存在的环境变量
-- 未定义 `variable`,但定义了 `default`
+- 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.
@@ -983,13 +1003,13 @@ default = "unknown user"
### 配置项
-| Option | 默认值 | 描述 |
-| ---------- | ------------------------------ | ------------------- |
-| `symbol` | `""` | 这个字段的内容会显示在环境变量值之前。 |
-| `variable` | | 要显示的环境变量。 |
-| `default` | | 所选变量未定义时显示的默认值。 |
-| `format` | `"with [$env_value]($style) "` | 组件格式化模板。 |
-| `disabled` | `false` | 禁用 `env_var` 组件。 |
+| Option | 默认值 | 描述 |
+| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
+| `symbol` | `""` | The symbol used before displaying the variable value. |
+| `variable` | | The environment variable to be displayed. |
+| `default` | | The default value to be displayed when the selected variable is not defined. |
+| `format` | `"with [$env_value]($style) "` | 组件格式化模板。 |
+| `disabled` | `false` | Disables the `env_var` module. |
### Variables
@@ -1026,8 +1046,8 @@ default = "unknown user"
The `erlang` module shows the currently installed version of [Erlang/OTP](https://erlang.org/doc/). By default the module will be shown if any of the following conditions are met:
-- 当前目录包含 `rebar.config` 文件.
-- 当前目录包含 `erlang.mk` 文件.
+- The current directory contains a `rebar.config` file.
+- The current directory contains a `erlang.mk` file.
### 配置项
@@ -1154,20 +1174,20 @@ asia-northeast1 = "an1"
## Git Branch
-`git_branch` 组件显示当前目录的 git 仓库的活动分支。
+The `git_branch` module shows the active branch of the repo in your current directory.
### 配置项
-| Option | 默认值 | 描述 |
-| -------------------- | -------------------------------- | ------------------------------------------------------------------------------------ |
-| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
-| `format` | `"on [$symbol$branch]($style) "` | 组件格式化模板。 Use `"$branch"` to refer to the current branch name. |
-| `symbol` | `" "` | A format string representing the symbol of git branch. |
-| `style` | `"bold purple"` | 此组件的样式。 |
-| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. |
-| `truncation_symbol` | `"…"` | 此字段的内容用来表示分支名称被截断。 You can use `""` for no symbol. |
-| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. |
-| `disabled` | `false` | 禁用 `git_branch` 组件。 |
+| Option | 默认值 | 描述 |
+| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
+| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
+| `format` | `"on [$symbol$branch]($style) "` | 组件格式化模板。 Use `"$branch"` to refer to the current branch name. |
+| `symbol` | `" "` | A format string representing the symbol of git branch. |
+| `style` | `"bold purple"` | 此组件的样式。 |
+| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. |
+| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. |
+| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. |
+| `disabled` | `false` | Disables the `git_branch` module. |
### Variables
@@ -1200,13 +1220,13 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
| Option | 默认值 | 描述 |
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
-| `commit_hash_length` | `7` | 显示的 git 提交哈希值的长度。 |
+| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `"[\\($hash$tag\\)]($style) "` | 组件格式化模板。 |
| `style` | `"bold green"` | 此组件的样式。 |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
-| `disabled` | `false` | 禁用 `git_commit` 组件。 |
+| `disabled` | `false` | Disables the `git_commit` module. |
### Variables
@@ -1229,7 +1249,7 @@ tag_symbol = "🔖 "
## Git State
-`git_state` 组件会显示当前目录在哪个 git 仓库中,以及正在进行的操作,例如:_REBASING_,_BISECTING_ 等。 进度信息(例如 REBASING 3/10)如果存在则也会被显示。
+The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
### 配置项
@@ -1244,7 +1264,7 @@ tag_symbol = "🔖 "
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
| `style` | `"bold yellow"` | 此组件的样式。 |
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | 组件格式化模板。 |
-| `disabled` | `false` | 禁用 `gi