summaryrefslogtreecommitdiffstats
path: root/docs/zh-TW
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.dev>2020-09-30 16:26:13 -0400
committerGitHub <noreply@github.com>2020-09-30 16:26:13 -0400
commitd8dcf04cff71794d15255e46a164a7f3633a11ec (patch)
tree989a55c405ba1d99cd1c740ffaee43e9456742ad /docs/zh-TW
parentd63c7ce3f924bfe5c96bccddb49f452c9190ff7e (diff)
docs(i18n): new Crowdin updates (#1512)
Diffstat (limited to 'docs/zh-TW')
-rw-r--r--docs/zh-TW/config/README.md801
-rw-r--r--docs/zh-TW/faq/README.md4
-rw-r--r--docs/zh-TW/guide/README.md2
-rw-r--r--docs/zh-TW/migrating-to-0.45.0/README.md265
-rw-r--r--docs/zh-TW/presets/README.md9
5 files changed, 816 insertions, 265 deletions
diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md
index 15868a0ff..f418ddfc8 100644
--- a/docs/zh-TW/config/README.md
+++ b/docs/zh-TW/config/README.md
@@ -1,18 +1,12 @@
# 設定
-::: tip
-
-🔥 「設定ã€ç¾åœ¨é‚„在建置中。 許多新的設定é¸é …會在之後的版本釋出。
-
-:::
-
-為了開始設定 Starship,請建立下å³æª”案: `~/.config/starship.toml`.
+To get started configuring starship, create the following file: `~/.config/starship.toml`.
```sh
mkdir -p ~/.config && touch ~/.config/starship.toml
```
-所有關於 Starship 的設定都在這個 [TOML](https://github.com/toml-lang/toml) 檔案內:
+All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
```toml
# Don't print a new line at the start of the prompt
@@ -27,7 +21,7 @@ success_symbol = "[➜](bold green)" # The "success_symbol" segment is being
disabled = true
```
-ä½ å¯ä»¥è—‰ç”±ä¿®æ”¹ `STARSHIP_CONFIG`環境變數而改變é è¨­çš„`starship.toml` 檔案ä½ç½®
+You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable:
```sh
export STARSHIP_CONFIG=~/.starship
@@ -39,9 +33,23 @@ Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
```
-### 術語
+### Logging
+
+By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable:
+
+```sh
+export STARSHIP_CACHE=~/.starship/cache
+```
+
+Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
+
+```ps1
+$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
+```
+
+### Terminology
-**模組 (Module)**: æ示字元中的一個元件,基於你的作業系統æ供的背景資訊來æ供訊æ¯ã€‚ 舉例來說,如果你ç¾åœ¨çš„資料夾是一個 NodeJS 專案,"nodejs" 模組會顯示出ç¾åœ¨å®‰è£åœ¨ä½ çš„電腦上的 NodeJS 版本。
+**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.
**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.
@@ -77,7 +85,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"` 在一個è—色背景上設定亮綠色文字
@@ -86,7 +94,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
@@ -102,7 +110,7 @@ For example:
The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`).
-- $
+- \$
- \\
- [
- ]
@@ -130,7 +138,7 @@ format = '''
## æ示字元
-以下是é‡å°æ示字元內容的設定。
+This is the list of prompt-wide configuration options.
### é¸é …
@@ -138,15 +146,13 @@ format = '''
| -------------- | ---------------------------- | ----------------------------------------------------- |
| `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. |
### 範例
```toml
# ~/.config/starship.toml
-# Disable the newline at the start of the prompt
-format = "$all"
-
# Use custom format
format = """
[┌───────────────────>](bold green)
@@ -155,20 +161,23 @@ format = """
# Wait 10 milliseconds for starship to check files under the current directory.
scan_timeout = 10
+
+# Disable the newline at the start of the prompt
+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 = "\n$all"
+format = "$all"
# Which is equivalent to
format = """
-
$username\
$hostname\
+$shlvl\
$kubernetes\
$directory\
$git_branch\
@@ -179,6 +188,7 @@ $hg_branch\
$docker_context\
$package\
$cmake\
+$dart\
$dotnet\
$elixir\
$elm\
@@ -190,17 +200,20 @@ $julia\
$nim\
$nodejs\
$ocaml\
+$perl\
$php\
$purescript\
$python\
$ruby\
$rust\
+$swift\
$terraform\
$zig\
$nix_shell\
$conda\
$memory_usage\
$aws\
+$gcloud\
$env_var\
$crystal\
$cmd_duration\
@@ -209,14 +222,15 @@ $line_break\
$jobs\
$battery\
$time\
+$status\
$character"""
```
## AWS
-`aws` 模組顯示ç¾åœ¨ AWS çš„å€åŸŸèˆ‡æ¦‚æ³ã€‚ 這是根據 `AWS_REGION`ã€`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` ç’°å¢ƒè®Šæ•¸åŠ `~/.aws/config` 檔案。
+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_VAULT`讀å–而使用 [aws-vault](https://github.com/99designs/aws-vault) 這個設定檔
+When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
### é¸é …
@@ -282,7 +296,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%.
### é¸é …
@@ -296,14 +310,14 @@ symbol = "🅰 "
| `disabled` | `false` | åœç”¨ `battery` 模組。 |
<details>
-<summary>也有些é‡å°ä¸å¸¸è¦‹çš„電池狀態設定的é¸é …。</summary>
+<summary>There are also options for some uncommon battery states.</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>
@@ -318,9 +332,9 @@ charging_symbol = "âš¡ï¸"
discharging_symbol = "💀"
```
-### 電池顯示
+### Battery Display
-`display` 設定是用來定義甚麼時候電池指示會顯示出來 (threshold),以åŠå®ƒé•·ç”šéº¼æ¨£å­ (style)。 如果沒有æä¾› `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:
```toml
[[battery.display]]
@@ -330,7 +344,7 @@ style = "bold red"
#### é¸é …
-`display` é¸é …是一個下列表格的陣列。
+The `display` option is an array of the following table.
| 變數 | 說明 |
| ----------- | ----------- |
@@ -340,23 +354,23 @@ style = "bold red"
#### 範例
```toml
-[[battery.display]] # 0% 到 10% é›»é‡ä¹‹é–“時,使用 "bold red" 風格
+[[battery.display]] # "bold red" style when capacity is between 0% and 10%
threshold = 10
style = "bold red"
-[[battery.display]] # 10% 到 30% é›»é‡ä¹‹é–“時,使用 "bold yellow" 風格
+[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
threshold = 30
style = "bold yellow"
-# 當電é‡è¶…éŽ 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 (`â¯`/`✖`)
@@ -437,15 +451,15 @@ The `cmake` module shows the currently installed version of CMake if:
## 指令æŒçºŒæ™‚é–“
-`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.
### é¸é …
@@ -478,7 +492,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
@@ -494,7 +508,8 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| `symbol` | `"🅒 "` | 環境å稱å‰ä½¿ç”¨çš„符號。 |
| `style` | `"bold green"` | 這個模組的風格。 |
| `format` | `"[$symbol$environment]($style) "` | The format for the module. |
-| `disabled` | `false` | åœç”¨ `conda` 模組。 |
+| `ignore_base` | `true` | Ignores `base` environment when activated. |
+| `disabled` | `false` | Disables the `conda` module. |
### Variables
@@ -517,7 +532,7 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
-`crystal` 模組顯示ç¾åœ¨æ‰€å®‰è£çš„Crystal版本 這個模組在下列其中一個æ¢ä»¶é”æˆæ™‚顯示:
+The `crystal` module shows the currently installed version of Crystal. 這個模組在下列其中一個æ¢ä»¶é”æˆæ™‚顯示:
- ç¾åœ¨è³‡æ–™å¤¾ä¸­å«æœ‰ä¸€å€‹ `shard.yml` 檔案
- ç¾åœ¨è³‡æ–™å¤¾ä¸­å«æœ‰ä¸€å€‹`.cr`檔案
@@ -550,34 +565,70 @@ format = "[$symbol$environment](dimmed green) "
format = "via [✨ $version](bold blue) "
```
-## 資料夾
+## Dart
+
+The `dart` module shows the currently installed version of Dart. 這個模組在下列其中一個æ¢ä»¶é”æˆæ™‚顯示:
+
+- The current directory contains a file with `.dart` extension
+- The current directory contains a `.dart_tool` directory
+- The current directory contains a `pubspec.yaml` or `pubspec.lock` file
+
+### é¸é …
+
+| 變數 | é è¨­ | 說明 |
+| ---------- | ---------------------------------- | ----------------------------------------------- |
+| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `symbol` | `"🎯 "` | A format string representing the symbol of Dart |
+| `style` | `"bold blue"` | 這個模組的風格。 |
+| `disabled` | `false` | Disables the `dart` module. |
+
+### Variables
+
+| 變數 | 範例 | 說明 |
+| --------- | -------- | ------------------------------------ |
+| version | `v2.8.4` | The version of `dart` |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+### 範例
+
+```toml
+# ~/.config/starship.toml
+
+[dart]
+format = "via [🔰 $version](bold red) "
+```
+
+## Directory
-`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`.
### é¸é …
-| 變數 | é è¨­ | 說明 |
-| ------------------------ | ----------------------------------------------- | ----------------------------------------------------- |
-| `truncation_length` | `3` | 到é”ç¾åœ¨è³‡æ–™å¤¾çš„路徑中,è¦è¢«è£æ¸›æŽ‰çš„資料夾數目。 |
-| `truncate_to_repo` | `true` | 是å¦è¦è£æ¸›åˆ°ä½ ç¾åœ¨æ‰€åœ¨çš„ git 儲存庫的根目錄。 |
-| `format` | `"[$path]($style)[$lock_symbol]($lock_style) "` | The format for the module. |
-| `style` | `"bold cyan"` | 這個模組的風格。 |
-| `disabled` | `false` | åœç”¨ `directory` 模組。 |
-| `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` | 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. |
<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 路徑é‚輯時使用的字元數é‡ã€‚ |
-| `use_logical_path` | `true` | 顯示 shell (`PWD`) æ供的é‚輯路徑,而ä¸æ˜¯ OS 的路徑。 |
+| 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. |
`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.
@@ -644,7 +695,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.
This module will only be shown in your prompt when one or more of the following files are present in the current directory:
@@ -660,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.
-這個模組內部是使用它自己的機制來åµæ¸¬ç‰ˆæœ¬ã€‚ 一般來說這個模組有 `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` | `"v[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. |
-| `symbol` | `"•NET "` | 在顯示 dotnet 版本之å‰ç”¨çš„符號。 |
-| `heuristic` | `true` | 使用更快速的版本åµæ¸¬æ³•ä¾†ä¿æŒ starship 的速度。 |
-| `style` | `"bold blue"` | 這個模組的風格。 |
-| `disabled` | `false` | åœç”¨ `dotnet` 模組。 |
+| 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. |
### Variables
@@ -700,7 +751,7 @@ heuristic = false
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 這個模組在下列其中一個æ¢ä»¶é”æˆæ™‚顯示:
-- ç¾åœ¨è³‡æ–™å¤¾ä¸­åŒ…å«ä¸€å€‹ `mix.exs` 檔案.
+- The current directory contains a `mix.exs` file.
### é¸é …
@@ -735,8 +786,8 @@ symbol = "🔮 "
The `elm` module shows the currently installed version of Elm. 這個模組在下列其中一個æ¢ä»¶é”æˆæ™‚顯示:
-- ç¾åœ¨è³‡æ–™å¤¾ä¸­åŒ…å«ä¸€å€‹ `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
@@ -769,28 +820,28 @@ The `elm` module shows the currently installed version of Elm. 這個模組在ä¸
format = "via [ $version](cyan bold) "
```
-## 環境變數
+## Environment Variable
-`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
| 變數 | 範例 | 說明 |
| --------- | ------------------------------------------- | ------------------------------------------ |
-| env_value | `Windows NT` (if *variable* would be `$OS`) | The environment value of option `variable` |
+| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
@@ -810,8 +861,8 @@ default = "unknown shell"
The `erlang` module shows the currently installed version of Erlang/OTP. 這個模組在下列其中一個æ¢ä»¶é”æˆæ™‚顯示:
-- ç¾åœ¨è³‡æ–™å¤¾ä¸­åŒ…å«ä¸€å€‹ `rebar.config` 檔案.
-- ç¾åœ¨è³‡æ–™å¤¾ä¸­åŒ…å«ä¸€å€‹ `erlang.mk` 檔案.
+- The current directory contains a `rebar.config` file.
+- The current directory contains a `erlang.mk` file.
### é¸é …
@@ -841,20 +892,80 @@ The `erlang` module shows the currently installed version of Erlang/OTP. 這個æ
format = "via [e $version](bold red) "
```
-## Git 分支
+## 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.
+
+### é¸é …
+
+| 變數 | é è¨­ | 說明 |
+| ---------------- | ---------------------------------------------------- | --------------------------------------------------------------- |
+| `format` | `"on [$symbol$account(\\($region\\))]($style) "` | The format for the module. |
+| `symbol` | `"â˜ï¸ "` | The symbol used before displaying the current GCP profile. |
+| `region_aliases` | | Table of region aliases to display in addition to the GCP name. |
+| `style` | `"bold blue"` | 這個模組的風格。 |
+| `disabled` | `false` | Disables the `gcloud` module. |
+
+### Variables
+
+| 變數 | 範例 | 說明 |
+| --------- | ----------------- | ------------------------------------------------------------------ |
+| region | `us-central1` | The current GCP region |
+| account | `foo@example.com` | The current GCP profile |
+| project | | The current GCP project |
+| active | `default` | The active config name written in `~/.config/gcloud/active_config` |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+### Examples
+
+#### Display account and project
+
+```toml
+# ~/.config/starship.toml
+
+[gcloud]
+format = "on [$symbol$account(\\($project\\))]($style) "
+```
+
+#### Display active config name only
+
+```toml
+# ~/.config/starship.toml
+
+[gcloud]
+format = "[$symbol$active]($style) "
+style = "bold yellow"
+```
+
+#### Display account and aliased region
-`git_branch` 模組顯示ç¾åœ¨çš„資料夾中使用中的儲存庫的分支。
+```toml
+# ~/.config/starship.toml
+
+[gcloud]
+symbol = "ï¸ðŸ‡¬ï¸ "
+[gcloud.region_aliases]
+us-central1 = "uc1"
+asia-northeast1 = "an1"
+```
+
+## Git Branch
+
+The `git_branch` module shows the active branch of the repo in your current directory.
### é¸é …
-| 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` 模組。 |
+| 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. |
### Variables
@@ -911,7 +1022,7 @@ commit_hash_length = 4
## 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.
### é¸é …
@@ -925,8 +1036,8 @@ commit_hash_length = 4
| `am` | `"AM"` | A format string displayed when an `apply-mailbox` (`git am`) is in progress. |
| `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` 模組。 |
+| `format` | `"\\([$state( $progress_current/$progress_total)]($style)\\) "` | The format for the module. |
+| `disabled` | `false` | Disables the `git_state` module. |
### Variables
@@ -951,26 +1062,25 @@ 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` | `"="` | 這個分支有åˆä½µè¡çªã€‚ |
-| `ahead` | `"⇡"` | The format of `ahead` |
-| `behind` | `"⇣"` | The format of `behind` |
-| `diverged` | `"⇕"` | The format of `diverged` |
-| `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` |
-| `show_sync_count` | `false` | 顯示超å‰/è½å¾Œè¿½è¹¤çš„分支的數é‡ã€‚ |
-| `style` | `"bold red"` | 這個模組的風格。 |
-| `disabled` | `false` | åœç”¨ `git_status` 模組。 |
+| Option | é è¨­ | 說明 |
+| ------------ | --------------------------------------------- | ----------------------------------- |
+| `format` | `"[\[$all_status$ahead_behind\]]($style) "` | The default format for `git_status` |
+| `conflicted` | `"="` | This branch has merge conflicts. |
+| `ahead` | `"⇡"` | The format of `ahead` |
+| `behind` | `"⇣"` | The format of `behind` |
+| `diverged` | `"⇕"` | The format of `diverged` |
+| `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` | Disables the `git_status` module. |
### Variables
@@ -981,12 +1091,12 @@ The following variables can be used in `format`:
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
-| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
-| `stashed` | Displays `stashed` when a stash exists for the local repository. |
-| `modified` | Displays `modified` when there are file modifications in the working directory. |
-| `staged` | Displays `staged` when a new file has been added to the staging area. |
-| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
-| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
+| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
+| `stashed` | Displays `stashed` when a stash exists for the local repository. |
+| `modified` | Displays `modified` when there are file modifications in the working directory. |
+| `stag