summaryrefslogtreecommitdiffstats
path: root/docs/zh-CN
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.dev>2022-03-01 17:05:57 -0500
committerGitHub <noreply@github.com>2022-03-01 23:05:57 +0100
commitaabc786dab868d8330c463220c8c70c3a817a825 (patch)
treedd9c92213fa273dc763dbd205448ea1b657efa82 /docs/zh-CN
parent0f3c8ca194ca7e78fe0d394ef0e3e9ac082d9d82 (diff)
docs(i18n): new Crowdin updates (#3586)
* New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Chinese Simplified) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Indonesian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Turkish) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (Chinese Simplified) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Indonesian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Chinese Simplified) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Indonesian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish))
Diffstat (limited to 'docs/zh-CN')
-rw-r--r--docs/zh-CN/config/README.md420
-rw-r--r--docs/zh-CN/guide/README.md42
-rw-r--r--docs/zh-CN/installing/README.md1
3 files changed, 247 insertions, 216 deletions
diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md
index 434846b37..f94812a46 100644
--- a/docs/zh-CN/config/README.md
+++ b/docs/zh-CN/config/README.md
@@ -261,7 +261,9 @@ format = "$all$directory$character"
## AWS
-`aws` 组件显示当前 AWS 主机所在区域与配置信息。 各组件基于 `AWS_REGION`,`AWS_DEFAULT_REGION` 和 `AWS_PROFILE` 环境变量与 `~/.aws/config` 文件。 This module also shows an expiration timer when using temporary credentials.
+The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. 各组件基于 `AWS_REGION`,`AWS_DEFAULT_REGION` 和 `AWS_PROFILE` 环境变量与 `~/.aws/config` 文件。 This module also shows an expiration timer when using temporary credentials.
+
+The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice.
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var.
@@ -360,7 +362,7 @@ 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%.
### 配置项
@@ -388,7 +390,7 @@ discharging_symbol = "💀 "
### Battery 组件的显示
-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]]
@@ -400,7 +402,7 @@ 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 | 默认值 | 描述 |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
@@ -426,9 +428,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 (`❯`/`✖`)
@@ -556,15 +558,15 @@ 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.
### 配置项
@@ -604,7 +606,7 @@ 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`.
:::
@@ -787,30 +789,31 @@ 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 仓库根目录下。 |
-| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | 组件格式化模板。 |
-| `style` | `"bold cyan"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `directory` 组件。 |
-| `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: "…/" |
-| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. |
-| `home_symbol` | `"~"` | The symbol indicating home directory. |
-| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |
+| Option | 默认值 | 描述 |
+| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
+| `truncation_length` | `3` | 当前目录路径被截断后最多保留的父目录数量。 |
+| `truncate_to_repo` | `true` | 是否只截断到您当前处于的 git 仓库根目录下。 |
+| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | 组件格式化模板。 |
+| `style` | `"bold cyan"` | 此组件的样式。 |
+| `disabled` | `false` | 禁用 `directory` 组件。 |
+| `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: "…/" |
+| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
+| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
+| `home_symbol` | `"~"` | The symbol indicating home directory. |
+| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
<details>
-<summary>此组件有几个高级配置选项来控制当前目录路径的显示方式。</summary>
+<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
| Advanced Option | 默认值 | 描述 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -839,6 +842,21 @@ format = "via [🦕 $version](green bold) "
*: This variable can only be used as a part of a style string
+<details>
+<summary>The git repos have additional variables.</summary>
+
+Let us consider the path `/path/to/home/git_repo/src/lib`
+
+| 字段 | 示例 | 描述 |
+| ------------------ | --------------------- | --------------------------------------- |
+| before_root_path | `"/path/to/home/"` | The path before git root directory path |
+| repo_root | `"git_repo"` | The git root directory name |
+| path | `"/src/lib"` | The remaining path |
+| style | `"black bold dimmed"` | `style`对应值 |
+| repo_root_style | `"underline white"` | Style for git root directory name |
+
+</details>
+
### 示例
```toml
@@ -887,7 +905,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:
@@ -902,7 +920,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.
@@ -912,13 +930,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
@@ -1025,7 +1043,7 @@ 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`
@@ -1045,13 +1063,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
@@ -1159,13 +1177,14 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
### 配置项
-| Option | 默认值 | 描述 |
-| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------- |
-| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | 组件格式化模板。 |
-| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. |
-| `region_aliases` | | Table of region aliases to display in addition to the GCP name. |
-| `style` | `"bold blue"` | 此组件的样式。 |
-| `disabled` | `false` | Disables the `gcloud` module. |
+| Option | 默认值 | 描述 |
+| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- |
+| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | 组件格式化模板。 |
+| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. |
+| `region_aliases` | | Table of region aliases to display in addition to the GCP name. |
+| `project_aliases` | | Table of project aliases to display in addition to the GCP name. |
+| `style` | `"bold blue"` | 此组件的样式。 |
+| `disabled` | `false` | Disables the `gcloud` module. |
### Variables
@@ -1214,22 +1233,33 @@ us-central1 = "uc1"
asia-northeast1 = "an1"
```
+#### Display account and aliased project
+
+```toml
+# ~/.config/starship.toml
+
+[gcloud]
+format = 'on [$symbol$account(@$domain)(\($project\))]($style) '
+[gcloud.project_aliases]
+very-long-project-name = "vlpn"
+```
+
## 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
@@ -1262,13 +1292,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
@@ -1291,7 +1321,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.
### 配置项
@@ -1306,7 +1336,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` | 禁用 `git_state` 模块 |
+| `disabled` | `false` | Disables the `git_state` module. |
### Variables
@@ -1335,7 +1365,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
::: tip
-此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1372,14 +1402,14 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
## Git Status
-`git_status`组件通过相应的符号显示您当前目录中 git 仓库的状态。
+The `git_status` module shows symbols representing the state of the repo in your current directory.
### 配置项
| Option | 默认值 | 描述 |
| ------------------- | ----------------------------------------------- | ----------------------------------- |
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
-| `conflicted` | `"="` | 这个分支有合并冲突。 |
+| `conflicted` | `"="` | This branch has merge conflicts. |
| `ahead` | `"⇡"` | The format of `ahead` |
| `behind` | `"⇣"` | The format of `behind` |
| `diverged` | `"⇕"` | The format of `diverged` |
@@ -1392,7 +1422,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
| `deleted` | `"✘"` | The format of `deleted` |
| `style` | `"bold red"` | 此组件的样式。 |
| `ignore_submodules` | `false` | Ignore changes to submodules. |
-| `disabled` | `false` | 禁用 `git_status` 组件。 |
+| `disabled` | `false` | Disables the `git_status` module. |
### Variables
@@ -1422,9 +1452,9 @@ The following variables can be used in `diverged`:
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
-| 字段 | 描述 |
-| ------- | --------- |
-| `count` | 显示相应的文件数量 |
+| 字段 | 描述 |
+| ------- | ------------------------ |
+| `count` | Show the number of files |
### 示例
@@ -1480,7 +1510,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
| `detect_files` | `["go.mod", "go.sum", "glide.yaml", "Gopkg.yml", "Gopkg.lock", ".go-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["Godeps"]` | Which folders should trigger this module. |
| `style` | `"bold cyan"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `golang` 组件。 |
+| `disabled` | `false` | Disables the `golang` module. |
### Variables
@@ -1542,17 +1572,17 @@ format = "via [⎈ $version](bold white) "
## Hostname
-`hostname` 组件显示系统主机名。
+The `hostname` module shows the system hostname.
### 配置项
-| Option | 默认值 | 描述 |
-| ---------- | --------------------------- | ------------------------------------------------------------------ |
-| `ssh_only` | `true` | 仅在连接到 SSH 会话时显示主机名。 |
-| `trim_at` | `"."` | 当主机名过长被截断时,会截断成第一次匹配该字符串之前的主机名。 `"."` 会让主机名截断到第一个点处。 `""` 会禁用任何截断。 |
-| `format` | `"[$hostname]($style) in "` | 组件格式化模板。 |
-| `style` | `"bold dimmed green"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `hostname` 组件。 |
+| Option | 默认值 | 描述 |
+| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
+| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
+| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
+| `format` | `"[$hostname]($style) in "` | 组件格式化模板。 |
+| `style` | `"bold dimmed green"` | 此组件的样式。 |
+| `disabled` | `false` | Disables the `hostname` module. |
### Variables
@@ -1593,7 +1623,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `java` 组件。 |
+| `disabled` | `false` | Disables the `java` module. |
### Variables
@@ -1616,7 +1646,7 @@ symbol = "🌟 "
## Jobs
-`jobs` 组件显示当前正在运行的任务数量。 仅当有后台任务运行时,此组件才会显示。 The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
+The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is:
@@ -1640,13 +1670,13 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| Option | 默认值 | 描述 |
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
-| `threshold`* | `1` | 如果超过此字段的值,显示任务数量。 |
+| `threshold`* | `1` | Show number of jobs if exceeded. |
| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. |
| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. |
| `format` | `"[$symbol$number]($style) "` | 组件格式化模板。 |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `jobs` 组件。 |
+| `disabled` | `false` | Disables the `jobs` module. |
*: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead.
@@ -1711,39 +1741,6 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ "
```
-## localip
-
-The `localip` module shows the IPv4 address of the primary network interface.
-
-### 配置项
-
-| Option | 默认值 | 描述 |
-| ---------- | ------------------------- | ------------------------------------------------------ |
-| `ssh_only` | `true` | Only show IP address when connected to an SSH session. |
-| `format` | `"[$localipv4]($style) "` | 组件格式化模板。 |
-| `style` | `"bold yellow"` | 此组件的样式。 |