summaryrefslogtreecommitdiffstats
path: root/docs/zh-TW/config/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/zh-TW/config/README.md')
-rw-r--r--docs/zh-TW/config/README.md400
1 files changed, 200 insertions, 200 deletions
diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md
index f418ddfc8..5bf9eaf72 100644
--- a/docs/zh-TW/config/README.md
+++ b/docs/zh-TW/config/README.md
@@ -1,12 +1,12 @@
# 設定
-To get started configuring starship, create the following file: `~/.config/starship.toml`.
+為了開始設定 Starship,請建立下右檔案: `~/.config/starship.toml`.
```sh
mkdir -p ~/.config && touch ~/.config/starship.toml
```
-All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
+所有關於 Starship 的設定都在這個 [TOML](https://github.com/toml-lang/toml) 檔案內:
```toml
# Don't print a new line at the start of the prompt
@@ -21,7 +21,7 @@ success_symbol = "[➜](bold green)" # The "success_symbol" segment is being
disabled = true
```
-You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable:
+你可以藉由修改 `STARSHIP_CONFIG`環境變數而改變預設的`starship.toml` 檔案位置
```sh
export STARSHIP_CONFIG=~/.starship
@@ -47,9 +47,9 @@ Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE
$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
```
-### Terminology
+### 術語
-**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project.
+**模組 (Module)**: 提示字元中的一個元件,基於你的作業系統提供的背景資訊來提供訊息。 舉例來說,如果你現在的資料夾是一個 NodeJS 專案,"nodejs" 模組會顯示出現在安裝在你的電腦上的 NodeJS 版本。
**Variable**: Smaller sub-components that contains information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS.
@@ -85,7 +85,7 @@ For example:
#### 風格字串
-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/).
+Starship 內大多數的模組允許你設定他們的顯示風格。 這要透過一個條目 (通常叫做 `style`),這個條目使用一個字串來進行設定。 這裡給幾個風格字串的例子,以及這些字串的功用。 對於完整語法的詳細說明,請參照 [進階設定指南](/advanced-config/)。
- `"fg:green bg:blue"` 在一個藍色背景上設定綠色文字
- `"bg:blue fg:bright-green"` 在一個藍色背景上設定亮綠色文字
@@ -94,7 +94,7 @@ Most modules in starship allow you to configure their display styles. This is do
- `"bold italic fg:purple"` 設定粗體、斜體且紫色的文字
- `""` 明確地關閉所有風格
-Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics.
+注意風格產出的樣子取決於你的終端機模擬器。 例如,有些終端機模擬器會提升顏色的亮度而不是讓文字變粗體,而且有些色彩主題對一般與加亮顏色使用的是相同色碼。 除此之外,為了要有斜體字,你的終端機一定要支援斜體。
#### Conditional Format Strings
@@ -138,7 +138,7 @@ format = '''
## 提示字元
-This is the list of prompt-wide configuration options.
+以下是針對提示字元內容的設定。
### 選項
@@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options.
| -------------- | ---------------------------- | ----------------------------------------------------- |
| `format` | [連結](#default-prompt-format) | Configure the format of the prompt. |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
-| `add_newline` | `true` | Add a new line before the start of the prompt. |
+| `add_newline` | `true` | 在提示字元前面加上換行字元。 |
### 範例
@@ -168,7 +168,7 @@ add_newline = false
### Default Prompt Format
-The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown:
+The default `format` is used to define the format of the prompt, if empty or no `format` is provided. 預設如下:
```toml
format = "$all"
@@ -228,9 +228,9 @@ $character"""
## AWS
-The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file.
+`aws` 模組顯示現在 AWS 的區域與概況。 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。
-When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
+從 `AWS_VAULT`讀取而使用 [aws-vault](https://github.com/99designs/aws-vault) 這個設定檔
### 選項
@@ -296,7 +296,7 @@ symbol = "🅰 "
## 電池
-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%.
+`battery` 模組顯示電池的電量以及現在的充電狀態。 這個模組只會在裝置的電量低於 10% 的時候看見。
### 選項
@@ -310,14 +310,14 @@ The `battery` module shows how charged the device's battery is and its current c
| `disabled` | `false` | 停用 `battery` 模組。 |
<details>
-<summary>There are also options for some uncommon battery states.</summary>
+<summary>也有些針對不常見的電池狀態設定的選項。</summary>
| 變數 | 說明 |
| ---------------- | -------------- |
| `unknown_symbol` | 當電池狀態不明時顯示的符號。 |
| `empty_symbol` | 當電池沒電時顯示的符號。 |
-Note: Battery indicator will be hidden if the status is `unknown` or `empty` unless you specify the option in the config.
+注意:電池指示會在電池狀態`不明`或`沒電`時隱藏起來,除非你在設定之中有特別指定選項。
</details>
@@ -332,9 +332,9 @@ charging_symbol = "⚡️"
discharging_symbol = "💀"
```
-### Battery Display
+### 電池顯示
-The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown:
+`display` 設定是用來定義甚麼時候電池指示會顯示出來 (threshold),以及它長甚麼樣子 (style)。 如果沒有提供 `display`。 預設如下:
```toml
[[battery.display]]
@@ -344,7 +344,7 @@ style = "bold red"
#### 選項
-The `display` option is an array of the following table.
+`display` 選項是一個下列表格的陣列。
| 變數 | 說明 |
| ----------- | ----------- |
@@ -354,23 +354,23 @@ The `display` option is an array of the following table.
#### 範例
```toml
-[[battery.display]] # "bold red" style when capacity is between 0% and 10%
+[[battery.display]] # 0% 到 10% 電量之間時,使用 "bold red" 風格
threshold = 10
style = "bold red"
-[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
+[[battery.display]] # 10% 到 30% 電量之間時,使用 "bold yellow" 風格
threshold = 30
style = "bold yellow"
-# when capacity is over 30%, the battery indicator will not be displayed
+# 當電量超過 30% 時,電量指示就不會顯示出來
```
## 字元
-The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
+`character` 模組在你的文字輸入處旁顯示一個字元 (通常是箭頭)。
-The character will tell you whether the last command was successful or not. It can do this in two ways:
+這個字元會告訴你最後的指令是成功還是失敗。 It can do this in two ways:
- changing color (`red`/`green`)
- changing shape (`❯`/`✖`)
@@ -451,15 +451,15 @@ The `cmake` module shows the currently installed version of CMake if:
## 指令持續時間
-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.
+`cmd_duration` 模組顯示最後一個指令執行所花費的時間。 這個模組只會在指令花費超過兩秒或是有設定 `min_time` 時,超過設定值時出現。
-::: warning Do not hook the DEBUG trap in Bash
+::: warning 不要在 Bash 中設置 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.
+如果你在 `bash` 中使用 Starship,不要在執行 `eval $(starship init $0)` 之後設置 `DEBUG` trap,不然這個模組**會**壞掉。
:::
-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.
+想使用類似 preexec 功能的 Bash 使用者可以 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只要在 `eval $(starship init $0)` 之前簡單地定義 `preexec_functions` 與 `precmd_functions` 兩個陣列,然後就可以照常進行。
### 選項
@@ -492,7 +492,7 @@ format = "underwent [$duration](bold yellow)"
## Conda
-The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
+如果有設定 `$CONDA_DEFAULT_ENV` 時,`conda` 模組顯示現在 conda 的環境。
::: tip
@@ -509,7 +509,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| `style` | `"bold green"` | 這個模組的風格。 |
| `format` | `"[$symbol$environment]($style) "` | The format for the module. |
| `ignore_base` | `true` | Ignores `base` environment when activated. |
-| `disabled` | `false` | Disables the `conda` module. |
+| `disabled` | `false` | 停用 `conda` 模組。 |
### Variables
@@ -532,7 +532,7 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
-The `crystal` module shows the currently installed version of Crystal. 這個模組在下列其中一個條件達成時顯示:
+`crystal` 模組顯示現在所安裝的Crystal版本 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中含有一個 `shard.yml` 檔案
- 現在資料夾中含有一個`.cr`檔案
@@ -601,34 +601,34 @@ The `dart` module shows the currently installed version of Dart. 這個模組在
format = "via [🔰 $version](bold red) "
```
-## Directory
+## 資料夾
-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.
+`directory` 模組顯示到現在資料夾的路徑,並裁減到前三層資料夾。 你的資料夾也會被裁減到你所在的 git 儲存庫的根目錄。
-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.
+如果正在使用 fish 風格的 pwd 選項,將不會隱藏被裁減的資料夾,而是會根據你在選項中設定的數字看到每一層資料夾的縮寫。
-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`.
+例如,給定一個右列的路徑 `~/Dev/Nix/nixpkgs/pkgs` 其中 `nixpkgs` 是儲存庫的根目錄,而且該選項被設定為 `1`。 你會看到 `~/D/N/nixpkgs/pkgs`,而在這個設定之前則是 `nixpkgs/pkgs`。
### 選項
-| 變數 | 預設 | 說明 |
-| ------------------------ | ----------------------------------------------- | -------------------------------------------------------------------------------- |
-| `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)[$lock_symbol]($lock_style) "` | The format for the module. |
-| `style` | `"bold cyan"` | 這個模組的風格。 |
-| `disabled` | `false` | Disables the `directory` module. |
-| `read_only_symbol` | `"🔒"` | The symbol indicating current directory is read only. |
-| `read_only_symbol_style` | `"red"` | The style for the read only symbol. |
+| 變數 | 預設 | 說明 |
+| ------------------- | -------------------------------------------------- | ----------------------------------------------------- |
+| `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. |
<details>
-<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
+<summary>這個模組有些進階設定選項可以控制顯示資料夾。</summary>
-| Advanced Option | 預設 | 說明 |
-| --------------------------- | ------ | ---------------------------------------------------------------------------------------- |
-| `substitutions` | | A table of substitutions to be made to the path. |
-| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
-| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. |
+| Advanced Option | 預設 | 說明 |
+| --------------------------- | ------ | ------------------------------------------------ |
+| `substitutions` | | A table of substitutions to be made to the path. |
+| `fish_style_pwd_dir_length` | `0` | 當使用 fish shell 的 pwd 路徑邏輯時使用的字元數量。 |
+| `use_logical_path` | `true` | 顯示 shell (`PWD`) 提供的邏輯路徑,而不是 OS 的路徑。 |
`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.
@@ -695,7 +695,7 @@ format = "via [🐋 $context](blue bold)"
## Dotnet
-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.
+`dotnet` 模組顯示現在資料夾使用的 .NET Core SDK 的版本。 如果這個資料夾已經選定一個 SDK,則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。
This module will only be shown in your prompt when one or more of the following files are present in the current directory:
@@ -711,19 +711,19 @@ This module will only be shown in your prompt when one or more of the following
You'll also need the .NET Core SDK installed in order to use it correctly.
-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.
+這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。
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` | `"v[$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. |
-| `style` | `"bold blue"` | 這個模組的風格。 |
-| `disabled` | `false` | Disables the `dotnet` module. |
+| Option | 預設 | 說明 |
+| ----------- | ---------------------------------------- | ---------------------------- |
+| `format` | `"v[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. |
+| `symbol` | `"•NET "` | 在顯示 dotnet 版本之前用的符號。 |
+| `heuristic` | `true` | 使用更快速的版本偵測法來保持 starship 的速度。 |
+| `style` | `"bold blue"` | 這個模組的風格。 |
+| `disabled` | `false` | 停用 `dotnet` 模組。 |
### Variables
@@ -751,7 +751,7 @@ heuristic = false
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 這個模組在下列其中一個條件達成時顯示:
-- The current directory contains a `mix.exs` file.
+- 現在資料夾中包含一個 `mix.exs` 檔案.
### 選項
@@ -786,8 +786,8 @@ symbol = "🔮 "
The `elm` module shows the currently installed version of Elm. 這個模組在下列其中一個條件達成時顯示:
-- The current directory contains a `elm.json` file
-- The current directory contains a `elm-package.json` file
+- 現在資料夾中包含一個 `elm.json` 檔案
+- 現在資料夾中包含一個 `elm-package.json` 檔案
- The current directory contains a `.elm-version` file
- The current directory contains a `elm-stuff` folder
- The current directory contains a `*.elm` files
@@ -820,22 +820,22 @@ The `elm` module shows the currently installed version of Elm. 這個模組在
format = "via [ $version](cyan bold) "
```
-## Environment Variable
+## 環境變數
-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:
+`env_var`模組顯示一個選擇的環境變數的現在數值。 這個模組只在下列條件其中之一達到時顯示:
-- The `variable` configuration option matches an existing environment variable
-- The `variable` configuration option is not defined, but the `default` configuration option is
+- `variable` 設定選項符合一個存在的環境變數。
+- 沒有設定 `variable` 選項,但是有設定 `default` 選項。
### 選項
-| 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. |
+| Option | 預設 | 說明 |
+| ---------- | ------------------------------ | -------------------------- |
+| `symbol` | | 顯示在變數數值之前的符號。 |
+| `variable` | | 要顯示的環境變數。 |
+| `default` | | 在選擇的變數值沒有定義時,顯示的預設值。 |
+| `format` | `"with [$env_value]($style) "` | The format for the module. |
+| `disabled` | `false` | 停用 `env_var` 模組。 |
### Variables
@@ -861,8 +861,8 @@ default = "unknown shell"
The `erlang` module shows the currently installed version of Erlang/OTP. 這個模組在下列其中一個條件達成時顯示:
-- The current directory contains a `rebar.config` file.
-- The current directory contains a `erlang.mk` file.
+- 現在資料夾中包含一個 `rebar.config` 檔案.
+- 現在資料夾中包含一個 `erlang.mk` 檔案.
### 選項
@@ -952,20 +952,20 @@ us-central1 = "uc1"
asia-northeast1 = "an1"
```
-## Git Branch
+## Git 分支
-The `git_branch` module shows the active branch of the repo in your current directory.
+`git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
### 選項
-| Option | 預設 | 說明 |
-| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
-| `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 X graphemes. |
-| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. |
-| `disabled` | `false` | Disables the `git_branch` module. |
+| Option | 預設 | 說明 |
+| ------------------- | -------------------------------- | ------------------------------------------------------------------------------- |
+| `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 X graphemes. |
+| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 You can use `""` for no symbol. |
+| `disabled` | `false` | 停用 `git_branch` 模組。 |
### Variables
@@ -1022,7 +1022,7 @@ commit_hash_length = 4
## 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),也會一併顯示出來。
### 選項
@@ -1037,7 +1037,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)\\) "` | The format for the module. |
-| `disabled` | `false` | Disables the `git_state` module. |
+| `disabled` | `false` | 停用 `git_state` 模組。 |
### Variables
@@ -1062,14 +1062,14 @@ cherry_pick = "[🍒 PICKING](bold red)"
## Git Status
-The `git_status` module shows symbols representing the state of the repo in your current directory.
+`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
### 選項
| Option | 預設 | 說明 |
| ------------ | --------------------------------------------- | ----------------------------------- |
| `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` |
@@ -1080,7 +1080,7 @@ The `git_status` module shows symbols representing the state of the repo in your
| `renamed` | `"»"` | The format of `renamed` |
| `deleted` | `"✘"` | The format of `deleted` |
| `style` | `"bold red"` | 這個模組的風格。 |
-| `disabled` | `false` | Disables the `git_status` module. |
+| `disabled` | `false` | 停用 `git_status` 模組。 |
### Variables
@@ -1133,6 +1133,7 @@ deleted = "🗑"
```
Show ahead/behind count of the branch being tracked
+
```toml
# ~/.config/starship.toml
@@ -1144,16 +1145,16 @@ behind = "⇣${count}"
## Golang
-The `golang` module shows the currently installed version of Golang. 這個模組在下列其中一個條件達成時顯示:
+`golang` 模組顯示現在安裝的 Golang 版本。 這個模組在下列其中一個條件達成時顯示:
-- 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
+- 現在資料夾中含有一個 `go.mod` 檔案
+- 現在資料夾中含有一個 `go.sum` 檔案
+- 現在資料夾中含有一個 `glide.yaml` 檔案
+- 現在資料夾中含有一個 `Gopkg.yml` 檔案
+- 現在資料夾中含有一個 `Gopkg.lock` 檔案
- The current directory contains a `.go-version` file
-- The current directory contains a `Godeps` directory
-- The current directory contains a file with the `.go` extension
+- 現在資料夾中含有一個 `Godeps` 資料夾
+- 現在資料夾中含有一個檔案具有 `.go` 副檔名
### 選項
@@ -1162,7 +1163,7 @@ The `golang` module shows the currently installed version of Golang. 這個模
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"🐹 "` | A format string representing the symbol of Go. |
| `style` | `"bold cyan"` | 這個模組的風格。 |
-| `disabled` | `false` | Disables the `golang` module. |
+| `disabled` | `false` | 停用 `golang` 模組。 |
### Variables
@@ -1187,7 +1188,7 @@ format = "via [🏎💨 $version](bold cyan) "
The `helm` module shows the currently installed version of Helm. 這個模組在下列其中一個條件達成時顯示:
-- The current directory contains a `helmfile.yaml` file
+- 現在資料夾中包含一個 `helmfile.yaml` 檔案
- The current directory contains a `Chart.yaml` file
### 選項
@@ -1218,19 +1219,19 @@ The `helm` module shows the currently installed version of Helm. 這個模組在
format = "via [⎈ $version](bold white) "
```
-## Hostname
+## 主機名稱
-The `hostname` module shows the system hostname.
+`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. |
+| Option | 預設 | 說明 |
+| ---------- | --------------------------- | ---------------------------------------------------------- |
+| `ssh_only` | `true` | 只在連接到一個 SSH session 時顯示主機名稱。 |
+| `trim_at` | `"."` | 擷取出主機名稱的斷點,以第一個符合的為準。 `"."` 會讓它停在第一個點的符號。 `""` 會停用任何的截斷功能。 |
+| `format` | `"[$hostname]($style) in "` | The format for the module. |
+| `style` | `"bold dimmed green"` | 這個模組的風格。 |
+| `disabled` | `false` | 停用 `hostname` 模組。 |
### Variables
@@ -1255,7 +1256,7 @@ disabled = false
## Java
-The `java` module shows the currently installed version of Java. 這個模組在下列其中一個條件達成時顯示:
+`java` 模組顯示現在安裝的 Java 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension
@@ -1267,7 +1268,7 @@ The `java` module shows the currently installed version of Java. 這個模組在
| `format` | `"via [${symbol}${version}]($style) "` | The format for the module. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | 這個模組的風格。 |
-| `disabled` | `false` | Disables the `java` module. |
+| `disabled` | `false` | 停用 `java` 模組。 |
### Variables
@@ -1288,19 +1289,19 @@ The `java` module shows the currently installed version of Java. 這個模組在
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 is more than 1 job, or more than the `threshold` config value, if it exists.
+`jobs` 模組顯示現在正在執行中的工作。 這個模組只會在有背景工作正在執行時顯示。 這個模組會在工作數量超過一個,或者有設定 `threshold` 時且數量超過設定值時,顯示工作的數量。
### 選項
| Option | 預設 | 說明 |
| ----------- | ----------------------------- | ------------------------------------------------ |
-| `threshold` | `1` | Show number of jobs if exceeded. |
+| `threshold` | `1` | 在超過指定值時顯示工作數量。 |
| `format` | `"[$symbol$number]($style) "` | The format for the module. |
| `symbol` | `"✦"` | A format string representing the number of jobs. |
| `style` | `"bold blue"` | 這個模組的風格。 |
-| `disabled` | `false` | Disables the `jobs` module. |
+| `disabled` | `false` | 停用 `jobs` 模組。 |
### Variables
@@ -1364,7 +1365,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
::: tip
-This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
+這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
:::
@@ -1402,15 +1403,15 @@ disabled = false
"dev.local.cluster.k8s" = "dev"
```
-## Line Break
+## 換行
-The `line_break` module separates the prompt into two lines.
+`line_break` 模組將提示字元分成兩行。
### 選項
-| Option | 預設 | 說明 |
-| ---------- | ------- | ------------------------------------------------------------------ |
-| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
+| Option | 預設 | 說明 |
+| ---------- | ------- | ----------------------------- |
+| `disabled` | `false` | 停用 `line_break` 模組,讓提示字元變成一行。 |
### 範例
@@ -1421,27 +1422,27 @@ The `line_break` module separates the prompt into two lines.
disabled = true
```
-## Memory Usage
+## 記憶體使用量
-The `memory_usage` module shows current system memory and swap usage.
+`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。
-By default the swap usage is displayed if the total system swap is non-zero.
+預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。
::: tip
-This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
+這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
:::
### 選項
-| Option | 預設 | 說明 |
-| ----------- | --------------------------------------------- | -------------------------------------------------------- |
-| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
-| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
-| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
-| `style` | `"bold dimmed white"` | 這個模組的風格。 |
-| `disabled` | `true` | Disables the `memory_usage` module. |
+| Option | 預設 | 說明 |
+| ----------- | --------------------------------------------- | -------------------------- |
+| `threshold` | `75` | 將記憶體使用量隱藏,除非使用量超過指定值。 |
+| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
+| `symbol` | `"🐏"` | 顯示在記憶體使用量之前的符號。 |
+| `style` | `"bold dimmed white"` | 這個模組的風格。 |
+| `disabled` | `true` | 停用 `memory_usage` 模組。 |
### Variables
@@ -1483,7 +1484,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| `style` | `"bold purple"` | 這個模組的風格。 |
| `format` | `"on [$symbol$branch]($style) "` | The format for the module. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes |
-| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
+| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 |
| `disabled` | `true` | Disables the `hg_branch` module. |
### Variables
@@ -1511,7 +1512,7 @@ truncation_symbol = ""
The `nim` module shows the currently installed version of Nim. 這個模組在下列其中一個條件達成時顯示:
-- The current directory contains a `nim.cfg` file
+- 現在資料夾中包含一個 `nim.cfg` 檔案
- The current directory contains a file with the `.nim` extension
- The current directory contains a file with the `.nims` extension
- The current directory contains a file with the `.nimble` extension
@@ -1547,7 +1548,7 @@ symbol = "🎣 "
## Nix-shell
-The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
+`nix_shell` 模組顯示 nix-shell 環境。 這個模組會在 nix-shell 環境中顯示。
### 選項
@@ -1558,7 +1559,7 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
| `style` | `"bold blue"` | 這個模組的風格。