mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
docs(i18n): new Crowdin updates (#4877)
This commit is contained in:
+151
-149
@@ -1088,7 +1088,7 @@ format = 'via [🦕 $version](green bold) '
|
||||
'src/com/long/java/path' = 'mypath'
|
||||
```
|
||||
|
||||
`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
|
||||
`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
|
||||
|
||||
</details>
|
||||
|
||||
@@ -1330,14 +1330,14 @@ default = 'unknown user'
|
||||
|
||||
### 配置项
|
||||
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | 这个字段的内容会显示在环境变量值之前。 |
|
||||
| `variable` | | 要显示的环境变量。 |
|
||||
| `default` | | 所选变量未定义时显示的默认值。 |
|
||||
| `format` | `"with [$env_value]($style) "` | 组件格式化模板。 |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | 禁用 `env_var` 组件。 |
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | 这个字段的内容会显示在环境变量值之前。 |
|
||||
| `variable` | | 要显示的环境变量。 |
|
||||
| `default` | | 所选变量未定义时显示的默认值。 |
|
||||
| `format` | `"with [$env_value]($style) "` | 组件格式化模板。 |
|
||||
| `描述` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | 禁用 `env_var` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1483,14 +1483,14 @@ The `fossil_branch` module shows the name of the active branch of the check-out
|
||||
|
||||
### 配置项
|
||||
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$branch]($style) '` | 组件格式化模板。 Use `'$branch'` to refer to the current branch name. |
|
||||
| `symbol` | `' '` | The symbol used before the branch name of the check-out in your current directory. |
|
||||
| `style` | `'bold purple'` | 此组件的样式。 |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates a Fossil branch name to `N` graphemes |
|
||||
| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. You can use `''` for no symbol. |
|
||||
| `disabled` | `true` | Disables the `fossil_branch` module. |
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$branch]($style) '` | 组件格式化模板。 Use `'$branch'` to refer to the current branch name. |
|
||||
| `symbol` | `' '` | The symbol used before the branch name of the check-out in your current directory. |
|
||||
| `style` | `'bold purple'` | 此组件的样式。 |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates a Fossil branch name to `N` graphemes |
|
||||
| `truncation_symbol` | `'…'` | 此字段的内容用来表示分支名称被截断。 You can use `''` for no symbol. |
|
||||
| `disabled` | `true` | Disables the `fossil_branch` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1588,21 +1588,21 @@ very-long-project-name = 'vlpn'
|
||||
|
||||
## Git Branch
|
||||
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
`git_branch` 组件显示当前目录的 git 仓库的活动分支。
|
||||
|
||||
### 配置项
|
||||
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| -------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
|
||||
| `format` | `'on [$symbol$branch(:$remote_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. |
|
||||
| `ignore_branches` | `[]` | A list of names to avoid displaying. Useful for 'master' or 'main'. |
|
||||
| `disabled` | `false` | Disables the `git_branch` module. |
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| -------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------ |
|
||||
| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
|
||||
| `format` | `'on [$symbol$branch(:$remote_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. |
|
||||
| `ignore_branches` | `[]` | A list of names to avoid displaying. Useful for 'master' or 'main'. |
|
||||
| `disabled` | `false` | 禁用 `git_branch` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1636,14 +1636,14 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `commit_hash_length` | `7` | 显示的 git 提交哈希值的长度。 |
|
||||
| `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_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
|
||||
| `tag_symbol` | `' 🏷 '` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| `disabled` | `false` | 禁用 `git_commit` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1667,7 +1667,7 @@ tag_symbol = '🔖 '
|
||||
|
||||
## Git State
|
||||
|
||||
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.
|
||||
`git_state` 组件会显示当前目录在哪个 git 仓库中,以及正在进行的操作,例如:_REBASING_,_BISECTING_ 等。 进度信息(例如 REBASING 3/10)如果存在则也会被显示。
|
||||
|
||||
### 配置项
|
||||
|
||||
@@ -1682,7 +1682,7 @@ The `git_state` module will show in directories which are part of a git reposito
|
||||
| `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` | Disables the `git_state` module. |
|
||||
| `disabled` | `false` | 禁用 `git_state` 模块 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1711,7 +1711,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
|
||||
:::
|
||||
|
||||
@@ -1748,7 +1748,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
## Git Status
|
||||
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
`git_status`组件通过相应的符号显示您当前目录中 git 仓库的状态。
|
||||
|
||||
::: tip
|
||||
|
||||
@@ -1761,7 +1761,7 @@ The Git Status module is very slow in Windows directories (for example under `/m
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | This branch has merge conflicts. |
|
||||
| `conflicted` | `'='` | 这个分支有合并冲突。 |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
@@ -1774,7 +1774,7 @@ The Git Status module is very slow in Windows directories (for example under `/m
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `style` | `'bold red'` | 此组件的样式。 |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `disabled` | `false` | 禁用 `git_status` 组件。 |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
|
||||
### Variables
|
||||
@@ -1805,9 +1805,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` | Show the number of files |
|
||||
| 字段 | 描述 |
|
||||
| ------- | --------- |
|
||||
| `count` | 显示相应的文件数量 |
|
||||
|
||||
### 示例
|
||||
|
||||
@@ -1873,7 +1873,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
|
||||
| `detect_files` | `['go.mod', 'go.sum', 'go.work', '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` | Disables the `golang` module. |
|
||||
| `disabled` | `false` | 禁用 `golang` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1980,7 +1980,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `detect_files` | `['stack.yaml', 'cabal.project']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold purple'` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `haskell` module. |
|
||||
| `disabled` | `false` | 禁用 `haskell` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -2075,18 +2075,18 @@ format = 'via [⎈ $version](bold white) '
|
||||
|
||||
## Hostname
|
||||
|
||||
The `hostname` module shows the system hostname.
|
||||
`hostname` 组件显示系统主机名。
|
||||
|
||||
### 配置项
|
||||
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
|
||||
| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to 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` | `'[$ssh_symbol$hostname]($style) in '` | 组件格式化模板。 |
|
||||
| `style` | `'bold dimmed green'` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `hostname` module. |
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------ | -------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| `ssh_only` | `true` | 仅在连接到 SSH 会话时显示主机名。 |
|
||||
| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
|
||||
| `trim_at` | `'.'` | 当主机名过长被截断时,会截断成第一次匹配该字符串之前的主机名。 `'.'` will stop after the first dot. `''` will disable any truncation |
|
||||
| `format` | `'[$ssh_symbol$hostname]($style) in '` | 组件格式化模板。 |
|
||||
| `style` | `'bold dimmed green'` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `hostname` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -2114,21 +2114,21 @@ disabled = false
|
||||
|
||||
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
|
||||
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, `build.boot`, or `.sdkmanrc` file
|
||||
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
|
||||
|
||||
### 配置项
|
||||
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}(${version} )]($style)'` | 组件格式化模板。 |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `style` | `'red dimmed'` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}(${version} )]($style)'` | 组件格式化模板。 |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `style` | `'red dimmed'` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `java` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -2151,7 +2151,7 @@ symbol = '🌟 '
|
||||
|
||||
## Jobs
|
||||
|
||||
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.
|
||||
`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 default functionality is:
|
||||
|
||||
@@ -2175,13 +2175,13 @@ The `threshold` option is deprecated, but if you want to use it, the module will
|
||||
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
|
||||
| `threshold`* | `1` | Show number of jobs if exceeded. |
|
||||
| `threshold`* | `1` | 如果超过此字段的值,显示任务数量。 |
|
||||
| `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` | Disables the `jobs` module. |
|
||||
| `disabled` | `false` | 禁用 `jobs` 组件。 |
|
||||
|
||||
*: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead.
|
||||
|
||||
@@ -2299,7 +2299,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
|
||||
When the module is enabled it will always be active, unless any of `detect_extensions`, `detect_files` or `detect_folders` have been set in which case the module will only be active in directories that match those conditions.
|
||||
|
||||
@@ -2343,7 +2343,7 @@ disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
'dev.local.cluster.k8s' = 'dev'
|
||||
'.*/openshift-cluster/.*' = 'openshift'
|
||||
'gke_.*_(?P<var_cluster>[\\w-]+)' = 'gke-$var_cluster'
|
||||
'gke_.*_(?P<var_cluster>[\w-]+)' = 'gke-$var_cluster'
|
||||
[kubernetes.user_aliases]
|
||||
'dev.local.cluster.k8s' = 'dev'
|
||||
'root/.*' = 'root'
|
||||
@@ -2372,23 +2372,23 @@ Long and automatically generated cluster names can be identified and shortened u
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
'.*/openshift-cluster/.*' = 'openshift'
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
'.*/(?P<var_cluster>[\\w-]+)/.*' = '$var_cluster'
|
||||
'.*/(?P<var_cluster>[\w-]+)/.*' = '$var_cluster'
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
'gke_.*_(?P<var_cluster>[\\w-]+)' = 'gke-$var_cluster'
|
||||
'gke_.*_(?P<var_cluster>[\w-]+)' = 'gke-$var_cluster'
|
||||
```
|
||||
|
||||
## Line Break
|
||||
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
`line_break` 组件将提示分隔为两行。
|
||||
|
||||
### 配置项
|
||||
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ---------- | ------- | ------------------------------------------------------------------ |
|
||||
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ---------- | ------- | --------------------------- |
|
||||
| `disabled` | `false` | 禁用 `line_break` 组件,使提示成为单行。 |
|
||||
|
||||
### 示例
|
||||
|
||||
@@ -2475,25 +2475,25 @@ format = 'via [🌕 $version](bold blue) '
|
||||
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
`memory_usage` 组件显示当前系统内存和交换区使用情况。
|
||||
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
默认情况下,如果系统交换区使用不为 0,则会显示交换区使用情况。
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
|
||||
:::
|
||||
|
||||
### 配置项
|
||||
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | 组件格式化模板。 |
|
||||
| `symbol` | `'🐏'` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `'bold dimmed white'` | 此组件的样式。 |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ----------- | ----------------------------------------------- | ---------------------- |
|
||||
| `threshold` | `75` | 隐藏内存使用情况,除非它超过这个百分比。 |
|
||||
| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | 组件格式化模板。 |
|
||||
| `symbol` | `'🐏'` | 这个字段的内容会显示在当前内存使用情况之前。 |
|
||||
| `style` | `'bold dimmed white'` | 此组件的样式。 |
|
||||
| `disabled` | `true` | 禁用 `memory_usage` 模块 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -2565,14 +2565,14 @@ The `hg_branch` module shows the active branch and topic of the repo in your cur
|
||||
|
||||
### 配置项
|
||||
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------- |
|
||||
| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
|
||||
| `style` | `'bold purple'` | 此组件的样式。 |
|
||||
| `format` | `'on [$symbol$branch(:$topic)]($style) '` | 组件格式化模板。 |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates the hg branch / topic name to `N` graphemes |
|
||||
| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. |
|
||||
| `disabled` | `true` | Disables the `hg_branch` module. |
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------------- | ----------------------------------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `' '` | 该字段的内容显示于当前仓库的 hg 书签或活动分支名之前。 |
|
||||
| `style` | `'bold purple'` | 此组件的样式。 |
|
||||
| `format` | `'on [$symbol$branch(:$topic)]($style) '` | 组件格式化模板。 |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates the hg branch / topic name to `N` graphemes |
|
||||
| `truncation_symbol` | `'…'` | 此字段的内容用来表示分支名称被截断。 |
|
||||
| `disabled` | `true` | 禁用 `hg_branch` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -2640,7 +2640,7 @@ symbol = '🎣 '
|
||||
|
||||
## Nix-shell
|
||||
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment.
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. 当处于一个 nix-shell 环境中时,此组件会被显示。
|
||||
|
||||
### 配置项
|
||||
|
||||
@@ -2650,16 +2650,16 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
|
||||
| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. |
|
||||
| `style` | `'bold blue'` | 此组件的样式。 |
|
||||
| `impure_msg` | `'impure'` | A format string shown when the shell is impure. |
|
||||
| `pure_msg` | `'pure'` | A format string shown when the shell is pure. |
|
||||
| `pure_msg` | `'纯色'` | A format string shown when the shell is pure. |
|
||||
| `unknown_msg` | `''` | A format string shown when it is unknown if the shell is pure/impure. |
|
||||
| `disabled` | `false` | Disables the `nix_shell` module. |
|
||||
| `disabled` | `false` | 禁用 `nix_shell` 组件。 |
|
||||
| `heuristic` | `false` | Attempts to detect new `nix shell`-style shells with a heuristic. |
|
||||
|
||||
### Variables
|
||||
|
||||
| 字段 | 示例 | 描述 |
|
||||
| --------- | ------- | -------------------------- |
|
||||
| state | `pure` | The state of the nix-shell |
|
||||
| state | `纯色` | The state of the nix-shell |
|
||||
| name | `lorri` | The name of the nix-shell |
|
||||
| symbol | | `symbol`对应值 |
|
||||
| style\* | | `style`对应值 |
|
||||
@@ -2701,7 +2701,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
|
||||
| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['node_modules']` | Which folders should trigger this module. |
|
||||
| `style` | `'bold green'` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `disabled` | `false` | 禁用 `nodejs` 组件。 |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
|
||||
|
||||
### Variables
|
||||
@@ -2853,7 +2853,7 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
|
||||
:::
|
||||
|
||||
@@ -2895,6 +2895,8 @@ Mint = "🌿 "
|
||||
NetBSD = "🚩 "
|
||||
NixOS = "❄️ "
|
||||
OpenBSD = "🐡 "
|
||||
OpenCloudOS = "☁️ "
|
||||
openEuler = "🦉 "
|
||||
openSUSE = "🦎 "
|
||||
OracleLinux = "🦴 "
|
||||
Pop = "🍭 "
|
||||
@@ -2940,7 +2942,7 @@ Arch = "Arch is the best! "
|
||||
|
||||
## Package Version
|
||||
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
|
||||
当前目录是软件包的代码仓库时,将显示 `package` 组件,并显示软件包当前版本。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
@@ -2967,11 +2969,11 @@ The `package` module is shown when the current directory is the repository for a
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `'is [$symbol$version]($style) '` | 组件格式化模板。 |
|
||||
| `symbol` | `'📦 '` | The symbol used before displaying the version the package. |
|
||||
| `symbol` | `'📦 '` | 这个字段的内容会显示在当前软件包版本之前。 |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `'bold 208'` | 此组件的样式。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| `disabled` | `false` | 禁用 `package` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -3046,12 +3048,12 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. |
|
||||
| `symbol` | `'🐘 '` | 这个字段的内容会显示在当前 PHP 版本之前。 |
|
||||
| `detect_extensions` | `['php']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'147 bold'` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `php` module. |
|
||||
| `disabled` | `false` | 禁用 `php` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -3084,7 +3086,7 @@ The `pijul_channel` module shows the active channel of the repo in your current
|
||||
| `style` | `'bold purple'` | 此组件的样式。 |
|
||||
| `format` | `'on [$symbol$channel]($style) '` | 组件格式化模板。 |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates the pijul channel name to `N` graphemes |
|
||||
| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. |
|
||||
| `truncation_symbol` | `'…'` | 此字段的内容用来表示分支名称被截断。 |
|
||||
| `disabled` | `true` | Disables the `pijul` module. |
|
||||
|
||||
## Pulumi
|
||||
@@ -3188,7 +3190,7 @@ format = 'via [$symbol$version](bold white)'
|
||||
|
||||
The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated.
|
||||
|
||||
If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`.
|
||||
如果`pyenv_version_name`被设置为`true`, 本组件将会展示pyenv版本名。 否则则显示通过`python --version`获得的版本号
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
@@ -3208,15 +3210,15 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | 组件格式化模板。 |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
|
||||
| `symbol` | `'🐍 '` | 用于表示Python的格式化字符串。 |
|
||||
| `style` | `'yellow bold'` | 此组件的样式。 |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `['py']` | Which extensions should trigger this module |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
| `disabled` | `false` | 禁用 `python` 组件。 |
|
||||
|
||||
::: tip
|
||||
|
||||
@@ -3230,11 +3232,11 @@ The default values and order for `python_binary` was chosen to first identify th
|
||||
|
||||
| 字段 | 示例 | 描述 |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| version | `'v3.8.1'` | `python`版本 |
|
||||
| symbol | `'🐍 '` | `symbol`对应值 |
|
||||
| style | `'yellow bold'` | `style`对应值 |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| virtualenv | `'venv'` | 当前`virtualenv`名称 |
|
||||
|
||||
### 示例
|
||||
|
||||
@@ -3355,7 +3357,7 @@ format = 'via [🦪 $version]($style) '
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 此组件将在符合以下任意条件时显示:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
@@ -3393,7 +3395,7 @@ symbol = '🔴 '
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 此组件将在符合以下任意条件时显示:
|
||||
|
||||
- 当前目录包含 `Gemfile` 文件
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@@ -3414,7 +3416,7 @@ Starship gets the current Ruby version by running `ruby -v`.
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. |
|
||||
| `style` | `'bold red'` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
| `disabled` | `false` | 禁用 `ruby` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -3437,7 +3439,7 @@ symbol = '🔺 '
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 此组件将在符合以下任意条件时显示:
|
||||
|
||||
- 当前目录包含 `Cargo.toml` 文件
|
||||
- 当前目录包含一个使用 `.rs` 扩展名的文件
|
||||
@@ -3453,7 +3455,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
|
||||
| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold red'` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
| `disabled` | `false` | 禁用 `rust` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -3522,7 +3524,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
|
||||
:::
|
||||
|
||||
@@ -3550,7 +3552,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| --------- | --- | ---------------------------------------------------------- |
|
||||
| indicator | | Mirrors the value of `indicator` for currently used shell. |
|
||||
| style\* | | Mirrors the value of option `style`. |
|
||||
| style\* | | `style`对应值. |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -3674,7 +3676,7 @@ The `status` module displays the exit code of the previous command. If $success_
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
|
||||
:::
|
||||
|
||||
@@ -3700,18 +3702,18 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Variables
|
||||
|
||||
| 字段 | 示例 | 描述 |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| hex_status | `0x7F` | The exit code of the last command in hex |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | `symbol`对应值 |
|
||||
| style\* | | `style`对应值 |
|
||||
| 字段 | 示例 | 描述 |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------ |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| hex_status | `0x7F` | The exit code of the last command in hex |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs' exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | `symbol`对应值 |
|
||||
| style\* | | `style`对应值 |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -3735,7 +3737,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
|
||||
:::
|
||||
|
||||
@@ -3780,7 +3782,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 此组件将在符合以下任意条件时显示:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@@ -3843,7 +3845,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.terraform']` | Which folders should trigger this module. |
|
||||
| `style` | `'bold 105'` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `terraform` module. |
|
||||
| `disabled` | `false` | 禁用 `terraform` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -3878,25 +3880,25 @@ format = '[🏎💨 $workspace]($style) '
|
||||
|
||||
## Time
|
||||
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
`time` 组件显示当前的 **本地** 时间。 `format` 字段值会提供给 [`chrono`](https://crates.io/crates/chrono) crate 用来控制时间显示方式。 请参阅 [chrono strftime 文档](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) 以了解可用格式选项。
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
|
||||
:::
|
||||
|
||||
### 配置项
|
||||
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'at [$time]($style) '` | The format string for the module. |
|
||||
| `use_12hr` | `false` | Enables 12 hour formatting |
|
||||
| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
|
||||
| `style` | `'bold yellow'` | The style for the module time |
|
||||
| `utc_time_offset` | `'local'` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
|
||||
| `disabled` | `true` | Disables the `time` module. |
|
||||
| `time_range` | `'-'` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'at [$time]($style) '` | The format string for the module. |
|
||||
| `use_12hr` | `false` | 启用 12 小时格式 |
|
||||
| `time_format` | 见下文解释 | 用来格式化时间显示的 [chrono 格式字符串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) |
|
||||
| `style` | `'bold yellow'` | 显示时间的样式。 |
|
||||
| `utc_time_offset` | `'local'` | 设置所用 UTC 偏移量。 Range from -24 < x < 24. 允许使用浮点数来得到 30/45 分钟的时区偏移。 |
|
||||
| `disabled` | `true` | 禁用 `time` 组件。 |
|
||||
| `time_range` | `'-'` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
|
||||
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it defaults to `'%T'`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
|
||||
@@ -3924,7 +3926,7 @@ time_range = '10:00:00-14:00:00'
|
||||
|
||||
## Username
|
||||
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
`username` 组件显示当前活跃的用户名。 此组件将在符合以下任意条件时显示:
|
||||
|
||||
- The current user is root/admin
|
||||
- 当前用户与登录用户不相同
|
||||
@@ -3942,10 +3944,10 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
|
||||
| 选项 | 默认值 | 描述 |
|
||||
| ------------- | ----------------------- | ------------------------------------------- |
|
||||
| `style_root` | `'bold red'` | The style used when the user is root/admin. |
|
||||
| `style_user` | `'bold yellow'` | The style used for non-root users. |
|
||||
| `style_user` | `'bold yellow'` | 非 root 用户使用的样式。 |
|
||||
| `format` | `'[$user]($style) in '` | 组件格式化模板。 |
|
||||
| `show_always` | `false` | Always shows the `username` module. |
|
||||
| `disabled` | `false` | Disables the `username` module. |
|
||||
| `show_always` | `false` | 总是显示 `username` 组件。 |
|
||||
| `disabled` | `false` | 禁用 `username` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -4075,7 +4077,7 @@ format = '[🆅 $repo](bold blue) '
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
|
||||
By default the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 此组件将在符合以下任意条件时显示:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
@@ -4156,7 +4158,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
|
||||
| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. |
|
||||
| `描述` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. |
|
||||
| `detect_files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `detect_extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
|
||||
Reference in New Issue
Block a user