summaryrefslogtreecommitdiffstats
path: root/docs/zh-TW
diff options
context:
space:
mode:
Diffstat (limited to 'docs/zh-TW')
-rw-r--r--docs/zh-TW/README.md8
-rw-r--r--docs/zh-TW/advanced-config/README.md9
-rw-r--r--docs/zh-TW/config/README.md542
-rw-r--r--docs/zh-TW/faq/README.md4
-rw-r--r--docs/zh-TW/guide/README.md2
-rw-r--r--docs/zh-TW/installing/README.md2
6 files changed, 330 insertions, 237 deletions
diff --git a/docs/zh-TW/README.md b/docs/zh-TW/README.md
index 0935a6112..e06b87f66 100644
--- a/docs/zh-TW/README.md
+++ b/docs/zh-TW/README.md
@@ -28,7 +28,11 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
</video>
</div>
-### 快速安裝
+### 先決要求
+
+- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
+
+### Quick Install
1. 安裝 **starship** 執行檔:
@@ -38,7 +42,7 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
使用 Shell 安裝:
```sh
- curl -fsSL https://starship.rs/install.sh | bash
+ sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
diff --git a/docs/zh-TW/advanced-config/README.md b/docs/zh-TW/advanced-config/README.md
index 5f9a83abf..f341d074e 100644
--- a/docs/zh-TW/advanced-config/README.md
+++ b/docs/zh-TW/advanced-config/README.md
@@ -21,7 +21,7 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
-- 為了要在一個指令前執行一個自定義的函式,你可以使用 [`DEBUG` trap 機制](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/)。 然而,你**必須**在初始化 Starship *之前* 對 DEBUG 訊號設下trap! Starship 可以保留 DEBUG trap 的數值,但是如果該 trap 在 starship 啟動後被被覆寫,某些功能會損壞。
+- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). 然而,你**必須**在初始化 Starship *之前* 對 DEBUG 訊號設下trap! Starship 可以保留 DEBUG trap 的數值,但是如果該 trap 在 starship 啟動後被被覆寫,某些功能會損壞。
```bash
function blastoff(){
@@ -33,7 +33,7 @@ eval $(starship init bash)
## 改變視窗標題
-有些 shell 的提示字元會幫你自動變更視窗標題(例如:為了反映出你目前的工作資料夾)。 Fish 甚至預設就會這樣做。 Starship 沒有幫你這樣做,但是可以用直覺的方式加入這個功能到 `bash` 或 `zsh` 之中。
+Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish 甚至預設就會這樣做。 Starship 沒有幫你這樣做,但是可以用直覺的方式加入這個功能到 `bash` 或 `zsh` 之中。
首先,定義一個改變視窗標題的函式(在 bash 與 zsh 之中都一樣):
@@ -75,14 +75,15 @@ starship_precmd_user_func="set_win_title"
- `bold`
- `underline`
- `dimmed`
+ - `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
-其中 `<color>` 是指定顏色用的(下面解釋)。 `fg:<color>` 與 `<color>` 目前做一樣的事情,不過未來可能會改變。 單詞在字串中的順序不重要。
+其中 `<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 order of words in the string does not matter.
-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` 與其他符號一起使用的情形視為是一種錯誤。
+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` 與其他符號一起使用的情形視為是一種錯誤。
一個顏色指定符號可以是下列其中之一:
diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md
index 32ad0ea51..fbd6f00aa 100644
--- a/docs/zh-TW/config/README.md
+++ b/docs/zh-TW/config/README.md
@@ -142,11 +142,12 @@ format = '''
### 選項
-| Option | 預設 | 說明 |
-| -------------- | ---------------------------- | ----------------------------------------------------- |
-| `format` | [連結](#default-prompt-format) | Configure the format of the prompt. |
-| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
-| `add_newline` | `true` | Inserts blank line between shell prompts. |
+| Option | 預設 | 說明 |
+| ----------------- | ---------------------------- | ------------------------------------------------------------ |
+| `format` | [連結](#default-prompt-format) | Configure the format of the prompt. |
+| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
+| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
+| `add_newline` | `true` | Inserts blank line between shell prompts. |
### 範例
@@ -190,6 +191,7 @@ $docker_context\
$package\
$cmake\
$dart\
+$deno\
$dotnet\
$elixir\
$elm\
@@ -206,6 +208,7 @@ $perl\
$php\
$purescript\
$python\
+$red\
$ruby\
$rust\
$scala\
@@ -241,6 +244,8 @@ $character"""
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
+When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var.
+
### 選項
| Option | 預設 | 說明 |
@@ -305,7 +310,7 @@ symbol = "🅰 "
## 電池
-`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%.
### 選項
@@ -333,7 +338,7 @@ discharging_symbol = "💀 "
### 電池顯示
-`display` 設定是用來定義甚麼時候電池指示會顯示出來 (threshold),以及它長甚麼樣子 (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]]
@@ -341,35 +346,40 @@ threshold = 10
style = "bold red"
```
+The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
+
#### 選項
-`display` 選項是一個下列表格的陣列。
+The `display` option is an array of the following table.
-| Option | 說明 |
-| ----------- | ----------- |
-| `threshold` | 顯示選項的上界。 |
-| `style` | 顯示選項使用時的風格。 |
+| Option | 預設 | 說明 |
+| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
+| `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. |
#### 範例
```toml
-[[battery.display]] # 0% 到 10% 電量之間時,使用 "bold red" 風格
+[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
threshold = 10
style = "bold red"
-[[battery.display]] # 10% 到 30% 電量之間時,使用 "bold yellow" 風格
+[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
threshold = 30
style = "bold yellow"
+discharging_symbol = 💦
-# 當電量超過 30% 時,電量指示就不會顯示出來
+# when capacity is over 30%, the battery indicator will not be displayed
```
## 字元
-`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 (`❯`/`✖`)
@@ -456,15 +466,15 @@ The `cmake` module shows the currently installed version of CMake. By default th
## 指令持續時間
-`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 trap
+::: warning Do not hook the DEBUG trap in Bash
-如果你在 `bash` 中使用 Starship,不要在執行 `eval $(starship init $0)` 之後設置 `DEBUG` trap,不然這個模組**會**壞掉。
+If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
:::
-想使用類似 preexec 功能的 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.
### 選項
@@ -505,7 +515,7 @@ format = "underwent [$duration](bold yellow)"
## Conda
-如果有設定 `$CONDA_DEFAULT_ENV` 時,`conda` 模組顯示現在 conda 的環境。
+The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
::: tip
@@ -545,7 +555,7 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
-`crystal` 模組顯示現在所安裝的Crystal版本 By default the module will be shown if any of the following conditions are met:
+The `crystal` module shows the currently installed version of Crystal. By default the module will be shown if any of the following conditions are met:
- 現在資料夾中含有一個 `shard.yml` 檔案
- 現在資料夾中含有一個`.cr`檔案
@@ -620,35 +630,69 @@ The `dart` module shows the currently installed version of Dart. By default the
format = "via [🔰 $version](bold red) "
```
+## Deno
+
+The `deno` module shows you your currently installed version of Deno. By default the module will be shown if any of the following conditions are met:
+- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
+
+### 選項
+
+| Option | 預設 | 說明 |
+| ------------------- | -------------------------------------------- | ----------------------------------------------- |
+| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
+| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `style` | `"green bold"` | 這個模組的風格。 |
+| `disabled` | `false` | Disables the `deno` module. |
+
+### Variables
+
+| 變數 | 範例 | 說明 |
+| --------- | -------- | ------------------------------------ |
+| version | `v1.8.3` | The version of `deno` |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+### 範例
+
+```toml
+# ~/.config/starship.toml
+
+[deno]
+format = "via [🦕 $version](green bold) "
+```
+
## 資料夾
-`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 風格的 pwd 選項,將不會隱藏被裁減的資料夾,而是會根據你在選項中設定的數字看到每一層資料夾的縮寫。
+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` 是儲存庫的根目錄,而且該選項被設定為 `1`。 你會看到 `~/D/N/nixpkgs/pkgs`,而在這個設定之前則是 `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) "` | The format for the module. |
-| `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: "…/" |
-| `home_symbol` | `"~"` | The symbol indicating home directory. |
+| Option | 預設 | 說明 |
+| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- |
+| `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) "` | The format for the module. |
+| `style` | `"bold cyan"` | 這個模組的風格。 |
+| `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: "…/" |
+| `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 的 pwd 路徑邏輯時使用的字元數量。 |
+| `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.
@@ -720,7 +764,7 @@ format = "via [🐋 $context](blue bold)"
## Dotnet
-`dotnet` 模組顯示現在資料夾使用的 .NET Core SDK 的版本。 如果這個資料夾已經選定一個 SDK,則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。
+The `dotnet` module shows the relevant version of the .NET Core SDK 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:
@@ -736,22 +780,22 @@ 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.
### 選項
-| Option | 預設 | 說明 |
-| ------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
-| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. |
-| `symbol` | `".NET "` | 在顯示 dotnet 版本之前用的符號。 |
-| `heuristic` | `true` | 使用更快速的版本偵測法來保持 starship 的速度。 |
-| `detect_extensions` | `["sln", "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` 模組。 |
+| Option | 預設 | 說明 |
+| ------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
+| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. |
+| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
+| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
+| `detect_extensions` | `["sln", "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` | Disables the `dotnet` module. |
### Variables
@@ -779,7 +823,7 @@ heuristic = false
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 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.
### 選項
@@ -817,8 +861,8 @@ symbol = "🔮 "
The `elm` module shows the currently installed version of Elm. 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
@@ -856,20 +900,20 @@ format = "via [ $version](cyan bold) "
## 環境變數
-`env_var`模組顯示一個選擇的環境變數的現在數值。 這個模組只在下列條件其中之一達到時顯示:
+The `env_var` module displays the current value of a selected environment variable. 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
### 選項
-| Option | 預設 | 說明 |
-| ---------- | ------------------------------ | -------------------------- |
-| `symbol` | | 顯示在變數數值之前的符號。 |
-| `variable` | | 要顯示的環境變數。 |
-| `default` | | 在選擇的變數值沒有定義時,顯示的預設值。 |
-| `format` | `"with [$env_value]($style) "` | The format for the module. |
-| `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) "` | The format for the module. |
+| `disabled` | `false` | Disables the `env_var` module. |
### Variables
@@ -895,8 +939,8 @@ default = "unknown shell"
The `erlang` module shows the currently installed version of Erlang/OTP. 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.
### 選項
@@ -929,7 +973,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
format = "via [e $version](bold red) "
```
-## Gcloud
+## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
@@ -989,22 +1033,22 @@ us-central1 = "uc1"
asia-northeast1 = "an1"
```
-## Git 分支
+## Git Branch
-`git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
+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) "` | The format for the module. 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) "` | The format for the module. 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
@@ -1066,7 +1110,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.
### 選項
@@ -1081,7 +1125,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)\) '` | The format for the module. |
-| `disabled` | `false` | 停用 `git_state` 模組。 |
+| `disabled` | `false` | Disables the `git_state` module. |
### Variables
@@ -1106,14 +1150,14 @@ cherry_pick = "[🍒 PICKING](bold red)"
## Git Status
-`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
+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` |
@@ -1124,7 +1168,7 @@ cherry_pick = "[🍒 PICKING](bold red)"
| `renamed` | `"»"` | The format of `renamed` |
| `deleted` | `"✘"` | The format of `deleted` |
| `style` | `"bold red"` | 這個模組的風格。 |
-| `disabled` | `false` | 停用 `git_status` 模組。 |
+| `disabled` | `false` | Disables the `git_status` module. |
### Variables
@@ -1189,16 +1233,16 @@ behind = "⇣${count}"
## Golang
-`golang` 模組顯示現在安裝的 Golang 版本。 By default the module will be shown if any of the following conditions are met:
+The `golang` module shows the currently installed version of Golang. By default the module will be shown if any of the following conditions are met:
-- 現在資料夾中含有一個 `go.mod` 檔案
-- 現在資料夾中含有一個 `go.sum` 檔案
-- 現在資料夾中含有一個 `glide.yaml` 檔案
-- 現在資料夾中含有一個 `Gopkg.yml` 檔案
-- 現在資料夾中含有一個 `Gopkg.lock` 檔案
+- The current directory contains a `go.mod` file
+- The current directory contains a `go.sum` file
+- The current directory contains a `glide.yaml` file
+- The current directory contains a `Gopkg.yml` file
+- The current directory contains a `Gopkg.lock` file
- The current directory contains a `.go-version` file
-- 現在資料夾中含有一個 `Godeps` 資料夾
-- 現在資料夾中含有一個檔案具有 `.go` 副檔名
+- The current directory contains a `Godeps` directory
+- The current directory contains a file with the `.go` extension
### 選項
@@ -1210,7 +1254,7 @@ behind = "⇣${count}"
| `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
@@ -1235,7 +1279,7 @@ format = "via [🏎💨 $version](bold cyan) "
The `helm` module shows the currently installed version of Helm. By default the module will be shown if any of the following conditions are met:
-- 現在資料夾中包含一個 `helmfile.yaml` 檔案
+- The current directory contains a `helmfile.yaml` file
- The current directory contains a `Chart.yaml` file
### 選項
@@ -1271,17 +1315,17 @@ format = "via [⎈ $version](bold white) "
## 主機名稱
-`hostname` 模組顯示系統的主機名稱。
+The `hostname` module shows the system hostname.
### 選項
-| Option | 預設 | 說明 |
-| ---------- | --------------------------- | ---------------------------------------------------------- |
-| `ssh_only` | `true` | 只在連接到一個 SSH session 時顯示主機名稱。 |
-| `trim_at` | `"."` | 擷取出主機名稱的斷點,以第一個符合的為準。 `"."` 會讓它停在第一個點的符號。 `""` 會停用任何的截斷功能。 |
-| `format` | `"[$hostname]($style) in "` | The format for the module. |
-| `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 "` | The format for the module. |
+| `style` | `"bold dimmed green"` | 這個模組的風格。 |
+| `disabled` | `false` | Disables the `hostname` module. |
### Variables
@@ -1306,22 +1350,23 @@ disabled = false
## Java
-`java` 模組顯示現在安裝的 Java 版本。 By default the module will be shown if any of the following conditions are met:
+The `java` module shows the currently installed version of 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 file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### 選項
-| Option | 預設 | 說明 |
-| ------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
-| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
-| `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"` | 這個模組的風格。