summaryrefslogtreecommitdiffstats
path: root/docs/zh-CN/config/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/zh-CN/config/README.md')
-rw-r--r--docs/zh-CN/config/README.md67
1 files changed, 42 insertions, 25 deletions
diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md
index 8b8d09a81..fa8aa8f96 100644
--- a/docs/zh-CN/config/README.md
+++ b/docs/zh-CN/config/README.md
@@ -40,7 +40,7 @@ Here is the representation of the node module. In the following example, "symbol
"via " "⬢" "v10.4.1" ""
```
-### Style Strings
+### 样式设定
Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/).
@@ -63,6 +63,7 @@ This is the list of prompt-wide configuration options.
| -------------- | ----------------------------- | ------------------------------------------------------ |
| `add_newline` | `true` | Add a new line before the start of the prompt. |
| `prompt_order` | [link](#default-prompt-order) | Configure the order in which the prompt module occurs. |
+| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
### Example
@@ -73,6 +74,8 @@ This is the list of prompt-wide configuration options.
add_newline = false
# Overwrite a default_prompt_order and use custom prompt_order
prompt_order=["rust","line_break","package","line_break","character"]
+# Wait 10 milliseconds for starship to check files under the current directory.
+scan_timeout = 10
```
### Default Prompt Order
@@ -118,7 +121,7 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
| Variable | Default | Description |
| ---------- | --------------- | ---------------------------------------------------------- |
-| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
+| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `AWS` module. |
@@ -437,23 +440,37 @@ The `git_status` module shows symbols representing the state of the repo in your
### Options
-| Variable | Default | Description |
-| ----------------- | ------------ | ------------------------------------------------------- |
-| `conflicted` | `"="` | This branch has merge conflicts. |
-| `ahead` | `"⇡"` | This branch is ahead of the branch being tracked. |
-| `behind` | `"⇣"` | This branch is behind of the branch being tracked. |
-| `diverged` | `"⇕"` | This branch has diverged from the branch being tracked. |
-| `untracked` | `"?"` | There are untracked files in the working directory. |
-| `stashed` | `"$"` | A stash exists for the local repository. |
-| `modified` | `"!"` | There are file modifications in the working directory. |
-| `staged` | `"+"` | A new file has been added to the staging area. |
-| `renamed` | `"»"` | A renamed file has been added to the staging area. |
-| `deleted` | `"✘"` | A file's deletion has been added to the staging area. |
-| `show_sync_count` | `false` | Show ahead/behind count of the branch being tracked. |
-| `prefix` | `[` | Prefix to display immediately before git status. |
-| `suffix` | `]` | Suffix to display immediately after git status. |
-| `style` | `"bold red"` | The style for the module. |
-| `disabled` | `false` | Disables the `git_status` module. |
+| Variable | Default | Description |
+| ------------------ | -------------------------- | ------------------------------------------------------- |
+| `conflicted` | `"="` | This branch has merge conflicts. |
+| `conflicted_count` | [link](#git-status-counts) | Show and style the number of conflicts. |
+| `ahead` | `"⇡"` | This branch is ahead of the branch being tracked. |
+| `behind` | `"⇣"` | This branch is behind of the branch being tracked. |
+| `diverged` | `"⇕"` | This branch has diverged from the branch being tracked. |
+| `untracked` | `"?"` | There are untracked files in the working directory. |
+| `untracked_count` | [link](#git-status-counts) | Show and style the number of untracked files. |
+| `stashed` | `"$"` | A stash exists for the local repository. |
+| `modified` | `"!"` | There are file modifications in the working directory. |
+| `modified_count` | [link](#git-status-counts) | Show and style the number of modified files. |
+| `staged` | `"+"` | A new file has been added to the staging area. |
+| `staged_count` | [link](#git-status-counts) | Show and style the number of files staged files. |
+| `renamed` | `"»"` | A renamed file has been added to the staging area. |
+| `renamed_count` | [link](#git-status-counts) | Show and style the number of renamed files. |
+| `deleted` | `"✘"` | A file's deletion has been added to the staging area. |
+| `deleted_count` | [link](#git-status-counts) | Show and style the number of deleted files. |
+| `show_sync_count` | `false` | Show ahead/behind count of the branch being tracked. |
+| `prefix` | `[` | Prefix to display immediately before git status. |
+| `suffix` | `]` | Suffix to display immediately after git status. |
+| `style` | `"bold red"` | The style for the module. |
+| `disabled` | `false` | Disables the `git_status` module. |
+
+#### Git Status Counts
+
+| Variable | Default | Description |
+| --------- | ------- | ------------------------------------------------------ |
+| `enabled` | `false` | Show the number of files |
+| `style` | | Optionally style the count differently than the module |
+
### Example
@@ -468,7 +485,10 @@ diverged = "😵"
untracked = "🤷‍"
stashed = "📦"
modified = "📝"
-staged = "➕"
+staged.value = "++"
+staged.style = "green"
+staged_count.enabled = true
+staged_count.style = "green"
renamed = "👅"
deleted = "🗑"
```
@@ -553,11 +573,9 @@ symbol = "+ "
threshold = 4
```
-
## Kubernetes
-Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace
-astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
+Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
@@ -584,7 +602,6 @@ style = "dim green"
disabled = false
```
-
## Line Break
The `line_break` module separates the prompt into two lines.
@@ -842,7 +859,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Variable | Default | Description |
| ----------------- | ------------- | ------------------------------------------------------------------------------------------------------------------- |
-| `12hr` | `false` | Enables 12 hour formatting |
+| `use_12hr` | `false` | Enables 12 hour formatting |
| `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 |
| `disabled` | `true` | Disables the `time` module. |