diff options
Diffstat (limited to 'docs/zh-TW/config/README.md')
-rw-r--r-- | docs/zh-TW/config/README.md | 753 |
1 files changed, 377 insertions, 376 deletions
diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index 99c572692..3d1fe8693 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -1,83 +1,83 @@ -# Configuration +# è¨å®š ::: tip -🔥 Configuration is currently being worked on. Many new configuration options will be available in coming releases. +🔥 「è¨å®šã€ç¾åœ¨é‚„在建置ä¸ã€‚ 許多新的è¨å®šé¸é …會在之後的版本釋出。 ::: -To get started configuring starship, create the following file: `~/.config/starship.toml`. +為了開始è¨å®š Starship,請建立下å³æª”案: `~/.config/starship.toml`. ```shell $ 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 +# ä¸è¦åœ¨æ示å—元的開é æ›è¡Œ add_newline = false -# Replace the "â¯" symbol in the prompt with "âžœ" -[character] # The name of the module we are configuring is "character" -symbol = "âžœ" # The "symbol" segment is being set to "âžœ" +# 把æ示å—å…ƒä¸çš„ "â¯" 符號æ›æˆ "âžœ" +[character] # 我們æ£åœ¨è¨å®šçš„模組å«åš "character" +symbol = "âžœ" # è¨å®š "symbol" å€æ®µç‚º "âžœ" -# Disable the package module, hiding it from the prompt completely +# 關閉 package 模組,把它完全從æ示å—å…ƒè—起來 [package] disabled = true ``` -### 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 版本。 -**Segment**: Smaller sub-components that compose a module. For example, the "symbol" segment in the "nodejs" module contains the character that is shown before the version number (⬢ by default). +**å€æ®µ (Segment)**: 組æˆä¸€å€‹æ¨¡çµ„çš„å元件。 舉例來說,"nodejs" 模組內的 "symbol" å€æ®µåŒ…å«äº†ä¸€å€‹æœƒé¡¯ç¤ºåœ¨ç‰ˆæœ¬ç·¨è™Ÿä¹‹å‰çš„å—å…ƒ (é è¨æ˜¯ ⬢)。 -Here is the representation of the node module. In the following example, "symbol" and "version" are segments within it. Every module also has a prefix and suffix that are the default terminal color. +這是一個 node 模組的表示法。 在下é¢çš„例å裡,"symbol" è·Ÿ "version" 都是模組內的å€æ®µã€‚ æ¯å€‹æ¨¡çµ„也包å«äº†ä½¿ç”¨é è¨çµ‚端機é¡è‰²çš„一個å‰ç¶´ (prefix) 跟一個後綴 (suffix)。 ``` [prefix] [symbol] [version] [suffix] "via " "⬢" "v10.4.1" "" ``` -### Style Strings +### é¢¨æ ¼å—串 -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +Starship 內大多數的模組å…è¨±ä½ è¨å®šä»–å€‘çš„é¡¯ç¤ºé¢¨æ ¼ã€‚ 這è¦é€éŽä¸€å€‹æ¢ç›® (通常å«åš `style`),這個æ¢ç›®ä½¿ç”¨ä¸€å€‹å—串來進行è¨å®šã€‚ é€™è£¡çµ¦å¹¾å€‹é¢¨æ ¼å—串的例å,以åŠé€™äº›å—串的功用。 å°æ–¼å®Œæ•´èªžæ³•çš„詳細說明,請åƒç…§ [進階è¨å®šæŒ‡å—](/advanced-config/)。 -- `"fg:green bg:blue"` sets green text on a blue background -- `"bg:blue fg:bright-green"` sets bright green text on a blue background -- `"bold fg:27"` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 -- `"underline bg:#bf5700"` sets underlined text on a burnt orange background -- `"bold italic fg:purple"` sets bold italic purple text -- `""` explicitly disables all styling +- `"fg:green bg:blue"` 在一個è—色背景上è¨å®šç¶ è‰²æ–‡å— +- `"bg:blue fg:bright-green"` 在一個è—色背景上è¨å®šäº®ç¶ è‰²æ–‡å— +- `"bold fg:27"` è¨å®šå…·æœ‰ [ANSI é¡è‰²](https://i.stack.imgur.com/KTSQa.png) 27 è™Ÿçš„ç²—é«”æ–‡å— +- `"underline bg:#bf5700"` 在一個燒橙色背景上è¨å®šæœ‰åº•ç·šçš„æ–‡å— +- `"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. +注æ„é¢¨æ ¼ç”¢å‡ºçš„æ¨£åå–æ±ºæ–¼ä½ çš„çµ‚ç«¯æ©Ÿæ¨¡æ“¬å™¨ã€‚ 例如,有些終端機模擬器會æå‡é¡è‰²çš„亮度而ä¸æ˜¯è®“æ–‡å—變粗體,而且有些色彩主題å°ä¸€èˆ¬èˆ‡åŠ 亮é¡è‰²ä½¿ç”¨çš„是相åŒè‰²ç¢¼ã€‚ 除æ¤ä¹‹å¤–,為了è¦æœ‰æ–œé«”å—ï¼Œä½ çš„çµ‚ç«¯æ©Ÿä¸€å®šè¦æ”¯æ´æ–œé«”。 -## Prompt +## æ示å—å…ƒ -This is the list of prompt-wide configuration options. +以下是é‡å°æ示å—元內容的è¨å®šã€‚ -### Options +### é¸é … -| Variable | Default | Description | -| -------------- | ----------------------------- | ------------------------------------------------------ | -| `add_newline` | `true` | Add a new line before the start of the prompt. | -| `prompt_order` | [link](#default-prompt-order) | Configure the order in which the prompt module occurs. | +| 變數 | é è¨ | 說明 | +| -------------- | --------------------------- | ---------------- | +| `add_newline` | `true` | 在æ示å—å…ƒå‰é¢åŠ 上æ›è¡Œå—元。 | +| `prompt_order` | [連çµ](#default-prompt-order) | 調整å„個æ示å—å…ƒæ¨¡çµ„çš„é¡¯ç¤ºé †åºã€‚ | -### Example +### 範例 ```toml # ~/.config/starship.toml -# Disable the newline at the start of the prompt +# åœç”¨åœ¨æ示å—å…ƒå‰æ›è¡Œçš„功能 add_newline = false -# Overwrite a default_prompt_order and use custom prompt_order +# 覆寫 default_prompt_order 並使用自訂的 prompt_order prompt_order=["rust","line_break","package","line_break","character"] ``` -### Default Prompt Order +### é è¨çš„æ示å—å…ƒé †åº -The default `prompt_order` is used to define the order in which modules are shown in the prompt, if empty or no `prompt_order` is provided. The default is as shown: +é è¨ `prompt_order` 是用來在 `prompt_order` 為空時或者沒有æ供時定義模組顯示在æ示å—å…ƒçš„é †åºã€‚ é è¨å¦‚下: ```toml prompt_order = [ @@ -112,17 +112,17 @@ prompt_order = [ ## AWS -The `aws` module shows the current AWS profile. This is based on the `AWS_PROFILE` env var. +`aws` 模組顯示ç¾åœ¨ AWS çš„å€åŸŸèˆ‡æ¦‚æ³ã€‚ é€™æ˜¯æ ¹æ“š `AWS_REGION`ã€`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` ç’°å¢ƒè®Šæ•¸åŠ `~/.aws/config` 檔案。 -### Options +### é¸é … -| Variable | Default | Description | -| ---------- | --------------- | ---------------------------------------------------------- | -| `symbol` | `"â˜ï¸ "` | The symbol used before displaying the current AWS profile. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `AWS` module. | +| 變數 | é è¨ | 說明 | +| ---------- | --------------- | ------------------ | +| `symbol` | `"â˜ï¸ "` | é¡¯ç¤ºåœ¨ç›®å‰ AWS é…置之å‰çš„符號。 | +| `style` | `"bold yellow"` | é€™å€‹æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `AWS` 模組。 | -### Example +### 範例 ```toml # ~/.config/starship.toml @@ -132,33 +132,33 @@ style = "bold blue" symbol = "🅰 " ``` -## Battery +## é›»æ± -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% 的時候看見。 -### Options +### é¸é … -| Variable | Default | Description | -| -------------------- | ------------------------ | ------------------------------------------------- | -| `full_symbol` | `"•"` | The symbol shown when the battery is full. | -| `charging_symbol` | `"⇡"` | The symbol shown when the battery is charging. | -| `discharging_symbol` | `"⇣"` | The symbol shown when the battery is discharging. | -| `display` | [link](#battery-display) | Display threshold and style for the module. | -| `disabled` | `false` | Disables the `battery` module. | +| 變數 | é è¨ | 說明 | +| -------------------- | ---------------------- | ---------------- | +| `full_symbol` | `"•"` | ç•¶é›»æ± å……é£½æ™‚é¡¯ç¤ºçš„ç¬¦è™Ÿã€‚ | +| `charging_symbol` | `"⇡"` | ç•¶é›»æ± æ£åœ¨å……電時顯示的符號。 | +| `discharging_symbol` | `"⇣"` | ç•¶é›»æ± æ£åœ¨æ”¾é›»æ™‚顯示的符號。 | +| `display` | [連çµ](#battery-display) | é¡¯ç¤ºçš„é–€æª»èˆ‡æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `battery` 模組。 | <details> -<summary>There are also options for some uncommon battery states.</summary> +<summary>也有些é‡å°ä¸å¸¸è¦‹çš„é›»æ± ç‹€æ…‹è¨å®šçš„é¸é …。</summary> -| Variable | Description | -| ---------------- | --------------------------------------------------- | -| `unknown_symbol` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | The symbol shown when the battery state is empty. | +| 變數 | 說明 | +| ---------------- | -------------- | +| `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> -### Example +### 範例 ```toml # ~/.config/starship.toml @@ -169,9 +169,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]] @@ -179,49 +179,49 @@ threshold = 10 style = "bold red" ``` -#### Options +#### é¸é … -The `display` option is an array of the following table. +`display` é¸é …æ˜¯ä¸€å€‹ä¸‹åˆ—è¡¨æ ¼çš„é™£åˆ—ã€‚ -| Variable | Description | -| ----------- | ----------------------------------------------- | -| `threshold` | The upper bound for the display option. | -| `style` | The style used if the display option is in use. | +| 變數 | 說明 | +| ----------- | ----------- | +| `threshold` | 顯示é¸é …的上界。 | +| `style` | 顯示é¸é …ä½¿ç”¨æ™‚çš„é¢¨æ ¼ã€‚ | -#### Example +#### 範例 ```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% 時,電é‡æŒ‡ç¤ºå°±ä¸æœƒé¡¯ç¤ºå‡ºä¾† ``` -## Character +## å—å…ƒ -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: by changing color (red/green) or by changing its shape (â¯/✖). The latter will only be done if `use_symbol_for_status` is set to `true`. +這個å—å…ƒæœƒå‘Šè¨´ä½ æœ€å¾Œçš„æŒ‡ä»¤æ˜¯æˆåŠŸé‚„是失敗。 他會用兩種方å¼å‘Šè¨´ä½ :改變他的é¡è‰² (紅色/ç¶ è‰²) 或是改變他的形狀 (â¯/✖)。 後者åªæœƒåœ¨ `use_symbol_for_status` 被è¨å®šç‚º `true` 時出ç¾ã€‚ -### Options +### é¸é … -| Variable | Default | Description | -| ----------------------- | -------------- | ----------------------------------------------------------------------------------- | -| `symbol` | `"â¯"` | The symbol used before the text input in the prompt. | -| `error_symbol` | `"✖"` | The symbol used before text input if the previous command failed. | -| `use_symbol_for_status` | `false` | Indicate error status by changing the symbol. | -| `vicmd_symbol` | `"â®"` | The symbol used before the text input in the prompt if shell is in vim normal mode. | -| `style_success` | `"bold green"` | The style used if the last command was successful. | -| `style_failure` | `"bold red"` | The style used if the last command failed. | -| `disabled` | `false` | Disables the `character` module. | +| 變數 | é è¨ | 說明 | +| ----------------------- | -------------- | ----------------------------------------- | +| `symbol` | `"â¯"` | 使用在æ示å—元文å—輸入處å‰çš„符號。 | +| `error_symbol` | `"✖"` | 如果å‰ä¸€å€‹æŒ‡ä»¤å¤±æ•—時,使用在文å—輸入處å‰çš„符號。 | +| `use_symbol_for_status` | `false` | 是å¦é€éŽæ”¹è®Šç¬¦è™Ÿä¾†æ示錯誤狀態。 | +| `vicmd_symbol` | `"â®"` | 如果 shell æ£åœ¨ vim æ£å¸¸æ¨¡å¼å…§ï¼Œåœ¨æ示å—元的文å—輸入處å‰çš„使用的符號。 | +| `style_success` | `"bold green"` | 最後的指令æˆåŠŸæ™‚ä½¿ç”¨çš„é¢¨æ ¼ã€‚ | +| `style_failure` | `"bold red"` | æœ€å¾Œçš„æŒ‡ä»¤å¤±æ•—æ™‚ä½¿ç”¨çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `character` 模組。 | -### Example +### 範例 ```toml # ~/.config/starship.toml @@ -232,28 +232,28 @@ error_symbol = "✗" use_symbol_for_status = true ``` -## Command Duration +## 指令æŒçºŒæ™‚é–“ -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` 兩個陣列,然後就å¯ä»¥ç…§å¸¸é€²è¡Œã€‚ -### Options +### é¸é … -| Variable | Default | Description | -| ---------- | --------------- | ---------------------------------------------------------- | -| `min_time` | `2` | Shortest duration to show time for. | -| `prefix` | `took` | Prefix to display immediately before the command duration. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `cmd_duration` module. | +| 變數 | é è¨ | 說明 | +| ---------- | --------------- | --------------------- | +| `min_time` | `2` | 會顯示的最çŸæ™‚間長度。 | +| `prefix` | `took` | 在指令æŒçºŒæ™‚é–“æ£å‰æ–¹é¡¯ç¤ºçš„å‰ç¶´ã€‚ | +| `style` | `"bold yellow"` | é€™å€‹æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `cmd_duration` 模組。 | -### Example +### 範例 ```toml # ~/.config/starship.toml @@ -265,17 +265,17 @@ prefix = "underwent " ## Conda -The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. Note: This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False` +如果有è¨å®š `$CONDA_DEFAULT_ENV` 時,`conda` 模組顯示ç¾åœ¨ conda 的環境。 注æ„:這ä¸æœƒæŠ‘制 conda 自己的æ示å—元修飾å—ï¼Œä½ å¯èƒ½æœƒæƒ³åŸ·è¡Œ `conda config --set changeps1 False`。 -### Options +### é¸é … -| Variable | Default | Description | -| ---------- | -------------- | -------------------------------------------- | -| `symbol` | `"C "` | The symbol used before the environment name. | -| `style` | `"bold green"` | The style for the module. | -| `disabled` | `false` | Disables the `conda` module. | +| 變數 | é è¨ | 說明 | +| ---------- | -------------- | -------------- | +| `symbol` | `"C "` | 環境å稱å‰ä½¿ç”¨çš„符號。 | +| `style` | `"bold green"` | æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `conda` 模組。 | -### Example +### 範例 ```toml # ~/.config/starship.toml @@ -284,34 +284,34 @@ The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` style = "dimmed green" ``` -## 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`。 -### Options +### é¸é … -| Variable | Default | Description | -| ------------------- | ------------- | -------------------------------------------------------------------------------- | -| `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. | -| `style` | `"bold cyan"` | The style for the module. | -| `disabled` | `false` | Disables the `directory` module. | +| 變數 | é è¨ | 說明 | +| ------------------- | ------------- | ------------------------- | +| `truncation_length` | `3` | 到é”ç¾åœ¨è³‡æ–™å¤¾çš„路徑ä¸ï¼Œè¦è¢«è£æ¸›æŽ‰çš„資料夾數目。 | +| `truncate_to_repo` | `true` | 是å¦è¦è£æ¸›åˆ°ä½ ç¾åœ¨æ‰€åœ¨çš„ git 儲å˜åº«çš„æ ¹ç›®éŒ„ã€‚ | +| `style` | `"bold cyan"` | é€™å€‹æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `directory` 模組。 | <details> -<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary> +<summary>這個模組有些進階è¨å®šé¸é …å¯ä»¥æŽ§åˆ¶é¡¯ç¤ºè³‡æ–™å¤¾ã€‚</summary> -| Variable | Default | Description | -| --------------------------- | ------- | ---------------------------------------------------------------------------------------- | -| `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. | +| 變數 | é è¨ | 說明 | +| --------------------------- | ------ | ------------------------------------ | +| `fish_style_pwd_dir_length` | `0` | 當使用 fish shell çš„ pwd 路徑é‚輯時使用的å—元數é‡ã€‚ | +| `use_logical_path` | `true` | 顯示 shell (`PWD`) æ供的é‚輯路徑,而ä¸æ˜¯ OS 的路徑。 | </details> -### Example +### 範例 ```toml # ~/.config/starship.toml @@ -322,22 +322,22 @@ truncation_length = 8 ## 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 of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly. +這個模組åªæœƒåœ¨ä¸‹åˆ—檔案出ç¾åœ¨ä½ çš„ç¾åœ¨è³‡æ–™å¤¾ä¸æ™‚ï¼Œé¡¯ç¤ºåœ¨ä½ çš„æ示å—元:`global.json`ã€`project.json`ã€`*.sln`ã€`*.csproj`ã€`*.fsproj`ã€`*.xproj`。 ä½ ä¹Ÿæœƒéœ€è¦å®‰è£ .NET Core æ–‡å—命令工具來æ£ç¢ºä½¿ç”¨é€™å€‹æ¨¡çµ„。 -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` é¸é …來åœç”¨é€™å€‹åŠŸèƒ½ã€‚ -### Options +### é¸é … -| Variable | Default | Description | -| ----------- | ------------- | -------------------------------------------------------- | -| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | -| `style` | `"bold blue"` | The style for the module. | -| `heuristic` | `true` | Use faster version detection to keep starship snappy. | -| `disabled` | `false` | Disables the `dotnet` module. | +| 變數 | é è¨ | 說明 | +| ----------- | ------------- | ---------------------------- | +| `symbol` | `"•NET "` | 在顯示 dotnet 版本之å‰ç”¨çš„符號。 | +| `style` | `"bold blue"` | é€™å€‹æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `heuristic` | `true` | 使用更快速的版本åµæ¸¬æ³•ä¾†ä¿æŒ starship 的速度。 | +| `disabled` | `false` | åœç”¨ `dotnet` 模組。 | -### Example +### 範例 ```toml # ~/.config/starship.toml @@ -348,26 +348,26 @@ style = "green" heuristic = false ``` -## 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` é¸é …。 -### Options +### é¸é … -| Variable | Default | Description | -| ---------- | ---------------- | ---------------------------------------------------------------------------- | -| `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. | -| `prefix` | `""` | Prefix to display immediately before the variable value. | -| `suffix` | `""` | Suffix to display immediately after the variable value. | -| `style` | `"dimmed black"` | The style for the module. | -| `disabled` | `false` | Disables the `env_var` module. | +| 變數 | é è¨ | 說明 | +| ---------- | ---------------- | -------------------- | +| `symbol` | | 顯示在變數數值之å‰çš„符號。 | +| `variable` | | è¦é¡¯ç¤ºçš„環境變數。 | +| `default` | | 在é¸æ“‡çš„變數值沒有定義時,顯示的é è¨å€¼ã€‚ | +| `prefix` | `""` | 在變數值æ£å‰æ–¹é¡¯ç¤ºçš„å‰ç¶´ã€‚ | +| `suffix` | `""` | 在變數值æ£å¾Œæ–¹é¡¯ç¤ºçš„後綴。 | +| `style` | `"dimmed black"` | é€™å€‹æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `env_var` 模組。 | -### Example +### 範例 ```toml # ~/.config/starship.toml @@ -377,51 +377,51 @@ variable = "SHELL" default = "unknown shell" ``` -## Git Branch +## Git 分支 -The `git_branch` module shows the active branch of the repo in your current directory. +`git_branch` 模組顯示ç¾åœ¨çš„資料夾ä¸ä½¿ç”¨ä¸çš„儲å˜åº«çš„分支。 -### Options +### é¸é … -| Variable | Default | Description | -| ------------------- | --------------- | ------------------------------------------------------------------------------------- | -| `symbol` | `"î‚ "` | The symbol used before the branch name of the repo in your current directory. | -| `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 | -| `style` | `"bold purple"` | The style for the module. | -| `disabled` | `false` | Disables the `git_branch` module. | +| 變數 | é è¨ | 說明 | +| ------------------- | --------------- | -------------------------------- | +| `symbol` | `"î‚ "` | åœ¨ä½ ç¾åœ¨è³‡æ–™å¤¾ä¹‹ä¸çš„儲å˜åº«çš„分支å稱å‰ä½¿ç”¨çš„符號。 | +| `truncation_length` | `2^63 - 1` | è£æ¸›ä¸€å€‹ git 分支到 X å—ç´ (grapheme)。 | +| `truncation_symbol` | `"…"` | 用來指示分支å稱被縮減的符號。 ä½ å¯ä»¥ç”¨ "" 來表示ä¸è¦é¡¯ç¤ºã€‚ | +| `style` | `"bold purple"` | é€™å€‹æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `git_branch` 模組。 | -### Example +### 範例 ```toml # ~/.config/starship.toml [git_branch] symbol = "🌱 " -truncation_length = "4" +truncation_length = 4 truncation_symbol = "" ``` ## 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),也會一併顯示出來。 -### Options +### é¸é … -| Variable | Default | Description | -| ------------------ | ------------------ | ---------------------------------------------------------------------------------------------------------------- | -| `rebase` | `"REBASING"` | The text displayed when a `rebase` is in progress. | -| `merge` | `"MERGING"` | The text displayed when a `merge` is in progress. | -| `revert` | `"REVERTING"` | The text displayed when a `revert` is in progress. | -| `cherry_pick` | `"CHERRY-PICKING"` | The text displayed when a `cherry-pick` is in progress. | -| `bisect` | `"BISECTING"` | The text displayed when a `bisect` is in progress. | -| `am` | `"AM"` | The text displayed when an `apply-mailbox` (`git am`) is in progress. | -| `am_or_rebase` | `"AM/REBASE"` | The text displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. | -| `progress_divider` | `"/"` | The symbol or text which will separate the current and total progress amounts. (e.g., `" of "`, for `"3 of 10"`) | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `git_state` module. | +| 變數 | é è¨ | 說明 | +| ------------------ | ------------------ | -------------------------------------------------- | +| `rebase` | `"REBASING"` | `rebase` 進行ä¸é¡¯ç¤ºçš„æ–‡å—。 | +| `merge` | `"MERGING"` | `merge` 進行ä¸é¡¯ç¤ºçš„æ–‡å—。 | +| `revert` | `"REVERTING"` | `revert` 進行ä¸é¡¯ç¤ºçš„æ–‡å—。 | +| `cherry_pick` | `"CHERRY-PICKING"` | `cherry-pick` 進行ä¸é¡¯ç¤ºçš„æ–‡å—。 | +| `bisect` | `"BISECTING"` | `bisect` 進行ä¸é¡¯ç¤ºçš„æ–‡å—。 | +| `am` | `"AM"` | `apply-mailbox` (`git am`) 進行ä¸é¡¯ç¤ºçš„æ–‡å—。 | +| `am_or_rebase` | `"AM/REBASE"` | 當ä¸å®¹æ˜“分辨是 `apply-mailbox` 或 `rebase` æ£åœ¨é€²è¡Œä¸æ™‚顯示的文å—。 | +| `progress_divider` | `"/"` | 用來分開ç¾åœ¨èˆ‡ç¸½å…±é€²åº¦é‡çš„符號。 (例如:`" of "` 會得到 `"3 of 10"` 的效果) | +| `style` | `"bold yellow"` | é€™å€‹æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `git_state` 模組。 | -### Example +### 範例 ```toml # ~/.config/starship.toml @@ -433,29 +433,29 @@ cherry_pick = "💠PICKING" ## Git Status -The `git_status` module shows symbols representing the state of the repo in your current directory. - -### Options - -| Variable | Default | Description | -| ----------------- | ------------ | ------------------------------------------------------- | -| `conflicted` | `"="` | This branch has merge conflicts. | -| `ahead` | `"⇡"` | This branch is ahead of the branch being tracked. | -| `behind` | `"⇣"` | This branch is behind of the branch being tracked. | -| `diverged` | `"⇕"` | This branch has diverged from the branch being tracked. | -| `untracked` | `"?"` | There are untracked files in the working directory. | -| `stashed` | `"$"` | A stash exists for the local repository. | -| `modified` | `"!"` | There are file modifications in the working directory. | -| `staged` | `"+"` | A new file has been added to the staging area. | -| `renamed` | `"»"` | A renamed file has been added to the staging area. | -| `deleted` | `"✘"` | A file's deletion has been added to the staging area. | -| `show_sync_count` | `false` | Show ahead/behind count of the branch being tracked. | -| `prefix` | `[` | Prefix to display immediately before git status. | -| `suffix` | `]` | Suffix to display immediately after git status. | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `git_status` module. | - -### Example +`git_status` 模組顯示用來表示ç¾åœ¨è³‡æ–™å¤¾ä¹‹ä¸å„²å˜åº«ç‹€æ…‹çš„符號。 + +### é¸é … + +| 變數 | é è¨ | 說明 | +| ----------------- | ------------ | -------------------------------- | +| `conflicted` | `"="` | 這個分支有åˆä½µè¡çªã€‚ | +| `ahead` | `"⇡"` | 這個分支超å‰æ£åœ¨è¿½è¹¤çš„分支。 | +| `behind` | `"⇣"` | 這個分支è½å¾Œæ£åœ¨è¿½è¹¤çš„分支。 | +| `diverged` | `"⇕"` | 這個分支å離æ£åœ¨è¿½è¹¤çš„分支。 | +| `untracked` | `"?"` | 工作資料夾ä¸æœ‰æ²’有追蹤的檔案。 | +| `stashed` | `"$"` | 本地儲å˜åº«æœ‰ stash。 | +| `modified` | `"!"` | 工作資料夾ä¸æœ‰ä¿®æ”¹éŽçš„檔案。 | +| `staged` | `"+"` | ä¸€å€‹æ–°æª”æ¡ˆè¢«åŠ å…¥äº†æš«å˜å€ (staging area)。 | +| `renamed` | `"»"` | 一個被改åçš„æª”æ¡ˆè¢«åŠ å…¥äº†æš«å˜å€ (staging area)。 | +| `deleted` | `"✘"` | ä¸€å€‹åˆªé™¤æª”æ¡ˆçš„å‹•ä½œè¢«åŠ å…¥äº†æš«å˜å€ (staging area)。 | +| `show_sync_count` | `false` | 顯示超å‰/è½å¾Œè¿½è¹¤çš„分支的數é‡ã€‚ | +| `prefix` | `[` | 在 git 狀態æ£å‰æ–¹é¡¯ç¤ºçš„å‰ç¶´ã€‚ | +| `suffix` | `]` | 在 git 狀態æ£å¾Œæ–¹é¡¯ç¤ºçš„後綴。 | +| `style` | `"bold red"` | é€™å€‹æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `git_status` 模組。 | + +### 範例 ```toml # ~/.config/starship.toml @@ -475,25 +475,25 @@ deleted = "🗑" ## Golang -The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met: +`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 -- The current directory contains a `Godeps` directory -- The current directory contains a file with the `.go` extension +- ç¾åœ¨è³‡æ–™å¤¾ä¸å«æœ‰ä¸€å€‹ `go.mod` 檔案 +- ç¾åœ¨è³‡æ–™å¤¾ä¸å«æœ‰ä¸€å€‹ `go.sum` 檔案 +- ç¾åœ¨è³‡æ–™å¤¾ä¸å«æœ‰ä¸€å€‹ `glide.yaml` 檔案 +- ç¾åœ¨è³‡æ–™å¤¾ä¸å«æœ‰ä¸€å€‹ `Gopkg.yml` 檔案 +- ç¾åœ¨è³‡æ–™å¤¾ä¸å«æœ‰ä¸€å€‹ `Gopkg.lock` 檔案 +- ç¾åœ¨è³‡æ–™å¤¾ä¸å«æœ‰ä¸€å€‹ `Godeps` 資料夾 +- ç¾åœ¨è³‡æ–™å¤¾ä¸å«æœ‰ä¸€å€‹æª”案具有 `.go` 副檔å -### Options +### é¸é … -| Variable | Default | Description | -| ---------- | ------------- | -------------------------------------------------------- | -| `symbol` | `"🹠"` | The symbol used before displaying the version of Golang. | -| `style` | `"bold cyan"` | The style for the module. | -| `disabled` | `false` | Disables the `golang` module. | +| 變數 | é è¨ | 說明 | +| ---------- | ------------- | ------------------- | +| `symbol` | `"🹠"` | 顯示在 Golang 版本之å‰çš„符號。 | +| `style` | `"bold cyan"` | é€™å€‹æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `golang` 模組。 | -### Example +### 範例 ```toml # ~/.config/starship.toml @@ -502,21 +502,22 @@ The `golang` module shows the currently installed version of Golang. The module symbol = "ðŸŽðŸ’¨ " ``` -## Hostname +## 主機å稱 -The `hostname` module shows the system hostname. +`hostname` 模組顯示系統的主機å稱。 -### Options +### é¸é … -| Variable | Default | Description | -| ---------- | --------------------- | ---------------------------------------------------- | -| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | -| `prefix` | `""` | Prefix to display immediately before the hostname. | -| `suffix` | `""` | Suffix to display immediately after the hostname. | -| `style` | `"bold dimmed green"` | The style for the module. | -| `disabled` | `false` | Disables the `hostname` module. | +| 變數 | é è¨ | 說明 | +| ---------- | --------------------- | ---------------------------------------------------------- | +| `ssh_only` | `true` | åªåœ¨é€£æŽ¥åˆ°ä¸€å€‹ SSH session 時顯示主機å稱。 | +| `prefix` | `""` | 在主機å稱æ£å‰æ–¹é¡¯ç¤ºçš„å‰ç¶´ã€‚ | +| `suffix` | `""` | 在主機å稱æ£å¾Œæ–¹é¡¯ç¤ºçš„後綴。 | +| `trim_at` | `"."` | æ“·å–出主機å稱的斷點,以第一個符åˆçš„為準。 `"."` 會讓它åœåœ¨ç¬¬ä¸€å€‹é»žçš„符號。 `""` 會åœç”¨ä»»ä½•çš„截斷功能。 | +| `style` | `"bold dimmed green"` | é€™å€‹æ¨¡çµ„çš„é¢¨æ ¼ã€‚ | +| `disabled` | `false` | åœç”¨ `hostname` 模組。 | -### Example +### 範例 ```toml # ~/.config/starship.toml @@ -525,23 +526,24 @@ The `hostname` module shows the system hostname. ssh_only = false prefix = "⟪" suffix = "⟫" +trim_at = ".companyname.com" disabled = false ``` -## 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` 模組é |