summaryrefslogtreecommitdiffstats
path: root/docs/zh-TW/config/README.md
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.dev>2022-01-15 17:08:31 -0500
committerGitHub <noreply@github.com>2022-01-15 23:08:31 +0100
commit6aa2bab97ee957322f15effdf5fb721a046060f4 (patch)
treed3b6867f794790135c0204ac79a60b6b1afe8168 /docs/zh-TW/config/README.md
parent682f49abdb7065f0053ca7ec82de166027a72072 (diff)
docs(i18n): new Crowdin updates (#3344)
* New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (French) * New translations README.md (French) * New translations README.md (Portuguese, Brazilian) * New translations README.md (French) * New translations README.md (Portuguese, Brazilian) * New translations README.md (French) * New translations README.md (Portuguese, Brazilian) * New translations README.md (French) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (Korean) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Chinese Simplified) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Traditional) * New translations README.md (Arabic) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Indonesian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Russian) * New translations README.md (French) * New translations README.md (Dutch) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Indonesian) * New translations README.md (Chinese Simplified) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Indonesian) * New translations README.md (Indonesian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Russian) * New translations README.md (Russian) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish))
Diffstat (limited to 'docs/zh-TW/config/README.md')
-rw-r--r--docs/zh-TW/config/README.md202
1 files changed, 110 insertions, 92 deletions
diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md
index 74da40cbe..c71552055 100644
--- a/docs/zh-TW/config/README.md
+++ b/docs/zh-TW/config/README.md
@@ -24,13 +24,19 @@ disabled = true
你可以透過更改環境變數 `STARSHIP_CONFIG` 來變更設定檔存放的位置:
```sh
-export STARSHIP_CONFIG=~/.starship/config.toml
+export STARSHIP_CONFIG=~/example/non/default/path/starship.toml
```
等同於在 PowersShell(Windows)的 `$PROFILE` 中添加下列文字:
```powershell
-$ENV:STARSHIP_CONFIG = "$HOME\.starship\config.toml"
+$ENV:STARSHIP_CONFIG = "$HOME\example\non\default\path\starship.toml"
+```
+
+Or for Cmd (Windows) would be adding this line to your `starship.lua`:
+
+```lua
+os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\starship.toml')
```
### Logging
@@ -47,11 +53,17 @@ export STARSHIP_CACHE=~/.starship/cache
$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
```
+Or for Cmd (Windows) would be adding this line to your `starship.lua`:
+
+```lua
+os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp')
+```
+
### 術語
-**模組 (Module)**: 提示字元中的一個元件,基於你的作業系統提供的背景資訊來提供訊息。 舉例來說,如果你現在的資料夾是一個 Node.js 專案,"nodejs" 模組會顯示出現在安裝在你的電腦上的 Node.js 版本。
+**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project.
-變數 (**Variable**):模組的子元件,主要是由模組提供的訊息。 舉例來說,在 "nodejs" 模組中提供的 "version" 變數代表著當下使用的 Node.js 版本。
+**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix.
@@ -85,7 +97,7 @@ For example:
#### 風格字串
-Starship 內大多數的模組允許你設定他們的顯示風格。 這要透過一個條目 (通常叫做 `style`),這個條目使用一個字串來進行設定。 這裡給幾個風格字串的例子,以及這些字串的功用。 對於完整語法的詳細說明,請參照 [進階設定指南](/advanced-config/)。
+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/).
- `"fg:green bg:blue"` 在一個藍色背景上設定綠色文字
- `"bg:blue fg:bright-green"` 在一個藍色背景上設定亮綠色文字
@@ -94,7 +106,7 @@ Starship 內大多數的模組允許你設定他們的顯示風格。 這要透
- `"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
@@ -131,7 +143,7 @@ format = '''
## 提示字元
-以下是針對提示字元內容的設定。
+This is the list of prompt-wide configuration options.
### 選項
@@ -164,7 +176,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 `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown:
```toml
format = "$all"
@@ -248,7 +260,7 @@ format="$all$directory$character"
## AWS
-`aws` 模組顯示現在 AWS 的區域與概況。 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。 This module also shows an expiration timer when using temporary credentials.
+The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials.
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var.
@@ -347,7 +359,7 @@ style = "blue bold"
## 電池
-`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%.
### 選項
@@ -375,7 +387,7 @@ discharging_symbol = "💀 "
### 電池顯示
-The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果沒有提供 `display`。 預設如下:
+The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown:
```toml
[[battery.display]]
@@ -387,7 +399,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
#### 選項
-`display` 選項是一個下列表格的陣列。
+The `display` option is an array of the following table.
| Option | 預設 | 說明 |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
@@ -414,9 +426,9 @@ discharging_symbol = "💦"
## 字元
-`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 (`❯`/`✖`)
@@ -425,13 +437,13 @@ By default it only changes color. If you also want to change its shape take a lo
::: warning
-`error_symbol` is not supported on elvish and nu shell.
+`error_symbol` is not supported on nu shell.
:::
::: warning
-`vicmd_symbol` is only supported in fish and zsh.
+`vicmd_symbol` is only supported in cmd, fish and zsh.
:::
@@ -544,15 +556,15 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
## 指令持續時間
-`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.
### 選項
@@ -568,7 +580,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
::: tip
-Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
+Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
:::
@@ -713,20 +725,20 @@ format = "via [🔰 $version](bold red) "
## Deno
The `deno` module shows you your currently installed version of [Deno](https://deno.land/). 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
+- The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### 選項
-| Option | 預設 | 說明 |
-| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `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. |
+| Option | 預設 | 說明 |
+| ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
+| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `["deno.json", "deno.jsonc", "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
@@ -747,29 +759,30 @@ 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: "…/" |
-| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. |
-| `home_symbol` | `"~"` | The symbol indicating home directory. |
+| 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: "…/" |
+| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. |
+| `home_symbol` | `"~"` | The symbol indicating home directory. |
+| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |
<details>
-<summary>這個模組有些進階設定選項可以控制顯示資料夾。</summary>
+<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
| Advanced Option | 預設 | 說明 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -846,7 +859,7 @@ format = "via [🐋 $context](blue bold)"
## Dotnet
-The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 如果這個資料夾已經選定一個 SDK,則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。
+The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
By default this module will only be shown in your prompt when one or more of the following files are present in the current directory:
@@ -861,7 +874,7 @@ By default this module will only be shown in your prompt when one or more of the
You'll also need the .NET Core SDK installed in order to use it correctly.
-這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。
+Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
@@ -984,7 +997,7 @@ format = "via [ $version](cyan bold) "
## 環境變數
-The `env_var` module displays the current value of a selected environment variables. 這個模組只在下列條件其中之一達到時顯示:
+The `env_var` module displays the current value of a selected environment variables. The module will be shown only if any of the following conditions are met:
- `variable` 設定選項符合一個存在的環境變數。
- 沒有設定 `variable` 選項,但是有設定 `default` 選項。
@@ -1174,7 +1187,7 @@ asia-northeast1 = "an1"
## Git 分支
-`git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
+The `git_branch` module shows the active branch of the repo in your current directory.
### 選項
@@ -1249,7 +1262,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.
### 選項
@@ -1293,7 +1306,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1330,26 +1343,27 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
## 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` | `"="` | 這個分支有合併衝突。 |
-| `ahead` | `"⇡"` | The format of `ahead` |
-| `behind` | `"⇣"` | The format of `behind` |
-| `diverged` | `"⇕"` | The format of `diverged` |
-| `up_to_date` | `""` | The format of `up_to_date` |
-| `untracked` | `"?"` | The format of `untracked` |
-| `stashed` | `"$"` | The format of `stashed` |
-| `modified` | `"!"` | The format of `modified` |
-| `staged` | `"+"` | The format of `staged` |
-| `renamed` | `"»"` | The format of `renamed` |
-| `deleted` | `"✘"` | The format of `deleted` |
-| `style` | `"bold red"` | 這個模組的風格。 |
-| `disabled` | `false` | 停用 `git_status` 模組。 |
+| Option | 預設 | 說明 |
+| ------------------- | ----------------------------------------------- | ----------------------------------- |
+| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
+| `conflicted` | `"="` | 這個分支有合併衝突。 |
+| `ahead` | `"⇡"` | The format of `ahead` |
+| `behind` | `"⇣"` | The format of `behind` |
+| `diverged` | `"⇕"` | The format of `diverged` |
+| `up_to_date` | `""` | The format of `up_to_date` |
+| `untracked` | `"?"` | The format of `untracked` |
+| `stashed` | `"$"` | The format of `stashed` |
+| `modified` | `"!"` | The format of `modified` |
+| `staged` | `"+"` | The format of `staged` |
+| `renamed` | `"»"` | The format of `renamed` |
+| `deleted` | `"✘"` | The format of `deleted` |
+| `style` | `"bold red"` | 這個模組的風格。 |
+| `ignore_submodules` | `false` | Ignore changes to submodules. |
+| `disabled` | `false` | Disables the `git_status` module. |
### Variables
@@ -1499,7 +1513,7 @@ format = "via [⎈ $version](bold white) "
## 主機名稱
-`hostname` 模組顯示系統的主機名稱。
+The `hostname` module shows the system hostname.
### 選項
@@ -1513,10 +1527,10 @@ format = "via [⎈ $version](bold white) "
### Variables
-| 變數 | 範例 | 說明 |
-| --------- | -- | ------------------------------------ |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 變數 | 範例 | 說明 |
+| --------- | ---------- | ----------------------------------- |
+| hostname | `computer` | The hostname of the computer |
+| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
@@ -1573,7 +1587,7 @@ symbol = "🌟 "
## 工作
-`jobs` 模組顯示現在正在執行中的工作。 這個模組只會在有背景工作正在執行時顯示。 The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running.
+The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is:
@@ -1722,7 +1736,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1784,7 +1798,7 @@ Long and automatically generated cluster names can be identified and shortened u
## 換行
-`line_break` 模組將提示字元分成兩行。
+The `line_break` module separates the prompt into two lines.
### 選項
@@ -1844,13 +1858,13 @@ format = "via [🌕 $version](bold blue) "
## 記憶體使用量
-`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。
+The `memory_usage` module shows current system memory and swap usage.
-預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。
+By default the swap usage is displayed if the total system swap is non-zero.
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1969,7 +1983,7 @@ symbol = "🎣 "
## Nix-shell
-The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. 這個模組會在 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.
### 選項
@@ -2133,7 +2147,7 @@ symbol = "☁️ "
## 套件版本
-The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages.
+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`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` 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
@@ -2150,6 +2164,7 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並
- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
- [**SBT**](https://scala-sbt.org) - The `sbt` package version is extracted from the `build.sbt` present in the current directory
+- [**Dart**](https://pub.dev/) - The `dart` package version is extracted from the `pubspec.yaml` present in the current directory
> ⚠️ 顯示出來的版本是從你的現在資料夾之中擷取出來的,並非從套件管理員取得。
@@ -2657,7 +2672,7 @@ The `shell` module shows an indicator for currently used shell.
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2673,6 +2688,8 @@ The `shell` module shows an indicator for currently used shell.
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
+| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
+| `nu_indicator` | `nu` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | The format for the module. |
| `style` | `"white bold"` | 這個模組的風格。 |
@@ -2774,11 +2791,11 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
-::: warning This module is not supported on elvish and nu shell. :::
+::: warning This module is not supported on nu shell. :::
### 選項
@@ -2804,6 +2821,7 @@ The `status` module displays the exit code of the previous command. The module w
| 變數 | 範例 | 說明 |
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
| 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 |
@@ -2836,7 +2854,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2980,11 +2998,11 @@ format = "[🏎💨 $workspace]($style) "