mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
docs(i18n): new Crowdin updates (#3085)
* New translations README.md (French) * New translations README.md (Korean) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Arabic) * 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 (French) * 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 (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * 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 (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Russian) * 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 (Turkish) * New translations README.md (Arabic) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Indonesian) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * 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 (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * 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 (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Japanese) * New translations README.md (German) * 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 (French) * 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 (Arabic) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * 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 (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (German) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Portuguese) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Indonesian) * 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 (Korean) * New translations README.md (French) * New translations README.md (Japanese) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Chinese Traditional) * 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 Simplified) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Indonesian) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * 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 (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Japanese)
This commit is contained in:
+235
-162
@@ -212,6 +212,7 @@ $nodejs\
|
||||
$ocaml\
|
||||
$perl\
|
||||
$php\
|
||||
$pulumi\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
@@ -252,7 +253,7 @@ format="$all$directory$character"
|
||||
|
||||
## AWS
|
||||
|
||||
The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials.
|
||||
`aws` 模組顯示現在 AWS 的區域與概況。 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。 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.
|
||||
|
||||
@@ -326,7 +327,7 @@ symbol = "🅰 "
|
||||
|
||||
## 電池
|
||||
|
||||
The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
|
||||
`battery` 模組顯示電池的電量以及現在的充電狀態。 這個模組只會在裝置的電量低於 10% 的時候看見。
|
||||
|
||||
### 選項
|
||||
|
||||
@@ -354,7 +355,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). If no `display` is provided. 預設如下:
|
||||
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`。 預設如下:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
@@ -366,7 +367,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
|
||||
|
||||
#### 選項
|
||||
|
||||
The `display` option is an array of the following table.
|
||||
`display` 選項是一個下列表格的陣列。
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
@@ -385,7 +386,7 @@ style = "bold red"
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
discharging_symbol = "💦"
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
@@ -393,9 +394,9 @@ discharging_symbol = 💦
|
||||
|
||||
## 字元
|
||||
|
||||
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
|
||||
`character` 模組在你的文字輸入處旁顯示一個字元 (通常是箭頭)。
|
||||
|
||||
The character will tell you whether the last command was successful or not. It can do this in two ways:
|
||||
這個字元會告訴你最後的指令是成功還是失敗。 It can do this in two ways:
|
||||
|
||||
- changing color (`red`/`green`)
|
||||
- changing shape (`❯`/`✖`)
|
||||
@@ -523,27 +524,27 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
|
||||
|
||||
## 指令持續時間
|
||||
|
||||
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` 兩個陣列,然後就可以照常進行。
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
|
||||
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
|
||||
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
|
||||
| `format` | `"took [$duration]($style) "` | The format for the module. |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `cmd_duration` module. |
|
||||
| `show_notifications` | `false` | Show desktop notifications when command completes. |
|
||||
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | ----------------------------- | ----------------------------------------------------- |
|
||||
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
|
||||
| `show_milliseconds` | `false` | 顯示時間除了以秒為單位外,亦以毫秒顯示 |
|
||||
| `format` | `"took [$duration]($style) "` | The format for the module. |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `cmd_duration` 模組。 |
|
||||
| `show_notifications` | `false` | Show desktop notifications when command completes. |
|
||||
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
|
||||
|
||||
::: tip
|
||||
|
||||
@@ -582,14 +583,14 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. |
|
||||
| `symbol` | `"🅒 "` | The symbol used before the environment name. |
|
||||
| `style` | `"bold green"` | 這個模組的風格。 |
|
||||
| `format` | `"via [$symbol$environment]($style) "` | The format for the module. |
|
||||
| `ignore_base` | `true` | Ignores `base` environment when activated. |
|
||||
| `disabled` | `false` | Disables the `conda` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
||||
| `truncation_length` | `1` | 如果環境變數由所`conda create -p [path]`產生時,環境變數的資料夾需要截斷的數目。 `0` 表示不截斷 也請參考 [`directory`](#directory)模組 |
|
||||
| `symbol` | `"🅒 "` | 環境名稱前使用的符號。 |
|
||||
| `style` | `"bold green"` | 這個模組的風格。 |
|
||||
| `format` | `"via [$symbol$environment]($style) "` | The format for the module. |
|
||||
| `ignore_base` | `true` | Ignores `base` environment when activated. |
|
||||
| `disabled` | `false` | 停用 `conda` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -614,8 +615,8 @@ format = "[$symbol$environment](dimmed green) "
|
||||
|
||||
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `shard.yml` file
|
||||
- The current directory contains a `.cr` file
|
||||
- 現在資料夾中含有一個 `shard.yml` 檔案
|
||||
- 現在資料夾中含有一個`.cr`檔案
|
||||
|
||||
### 選項
|
||||
|
||||
@@ -655,7 +656,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
|
||||
|
||||
- The current directory contains a file with `.dart` extension
|
||||
- The current directory contains a `.dart_tool` directory
|
||||
- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file
|
||||
- 現在資料夾中包含一個 `pubspec.yaml`、`pubspec.yml` 或 `pubspec.lock` 檔案
|
||||
|
||||
### 選項
|
||||
|
||||
@@ -726,33 +727,33 @@ format = "via [🦕 $version](green bold) "
|
||||
|
||||
## 資料夾
|
||||
|
||||
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`。
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
|
||||
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
|
||||
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. |
|
||||
| `style` | `"bold cyan"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `directory` module. |
|
||||
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
|
||||
| `read_only_style` | `"red"` | The style for the read only symbol. |
|
||||
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
|
||||
| `home_symbol` | `"~"` | The symbol indicating home directory. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------------- | -------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 |
|
||||
| `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 |
|
||||
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. |
|
||||
| `style` | `"bold cyan"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `directory` 模組。 |
|
||||
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
|
||||
| `read_only_style` | `"red"` | The style for the read only symbol. |
|
||||
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
|
||||
| `home_symbol` | `"~"` | The symbol indicating home directory. |
|
||||
|
||||
<details>
|
||||
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
|
||||
<summary>這個模組有些進階設定選項可以控制顯示資料夾。</summary>
|
||||
|
||||
| Advanced Option | 預設 | 說明 |
|
||||
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `fish_style_pwd_dir_length` | `0` | 當使用 fish shell 的 pwd 路徑邏輯時使用的字元數量。 |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD.
|
||||
@@ -788,7 +789,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Docker Context
|
||||
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
|
||||
### 選項
|
||||
|
||||
@@ -824,7 +825,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. 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.
|
||||
The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 如果這個資料夾已經選定一個 SDK,則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 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:
|
||||
|
||||
@@ -839,7 +840,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.
|
||||
|
||||
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
|
||||
這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。
|
||||
|
||||
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
|
||||
|
||||
@@ -849,13 +850,13 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `symbol` | `".NET "` | 在顯示 dotnet 版本之前用的符號。 |
|
||||
| `heuristic` | `true` | 使用更快速的版本偵測法來保持 starship 的速度。 |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
| `disabled` | `false` | 停用 `dotnet` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -883,7 +884,7 @@ heuristic = false
|
||||
|
||||
The `elixir` module shows the currently installed version of [Elixir](https://elixir-lang.org/) and [Erlang/OTP](https://erlang.org/doc/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `mix.exs` file.
|
||||
- 現在資料夾中含有一個 `mix.exs` 檔案.
|
||||
|
||||
### 選項
|
||||
|
||||
@@ -922,8 +923,8 @@ symbol = "🔮 "
|
||||
|
||||
The `elm` module shows the currently installed version of [Elm](https://elm-lang.org/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `elm.json` file
|
||||
- The current directory contains a `elm-package.json` file
|
||||
- 現在資料夾中含有一個 `elm.json` 檔案
|
||||
- 現在資料夾中包含一個 `elm-package.json` 檔案
|
||||
- The current directory contains a `.elm-version` file
|
||||
- The current directory contains a `elm-stuff` folder
|
||||
- The current directory contains a `*.elm` files
|
||||
@@ -962,10 +963,10 @@ format = "via [ $version](cyan bold) "
|
||||
|
||||
## 環境變數
|
||||
|
||||
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:
|
||||
The `env_var` module displays the current value of a selected environment variables. 這個模組只在下列條件其中之一達到時顯示:
|
||||
|
||||
- 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` 選項。
|
||||
|
||||
|
||||
::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character.
|
||||
@@ -981,13 +982,13 @@ default = "unknown user"
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | ------------------------------ | -------------------------- |
|
||||
| `symbol` | `""` | 顯示在變數數值之前的符號。 |
|
||||
| `variable` | | 要顯示的環境變數。 |
|
||||
| `default` | | 在選擇的變數值沒有定義時,顯示的預設值。 |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `disabled` | `false` | 停用 `env_var` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1024,8 +1025,8 @@ default = "unknown user"
|
||||
|
||||
The `erlang` module shows the currently installed version of [Erlang/OTP](https://erlang.org/doc/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `rebar.config` file.
|
||||
- The current directory contains a `erlang.mk` file.
|
||||
- 現在資料夾中含有一個 `rebar.config` 檔案.
|
||||
- 現在資料夾中含有一個 `erlang.mk` 檔案.
|
||||
|
||||
### 選項
|
||||
|
||||
@@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | 這個模組的風格。 |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `fill` module |
|
||||
|
||||
### 範例
|
||||
|
||||
@@ -1149,22 +1151,22 @@ us-central1 = "uc1"
|
||||
asia-northeast1 = "an1"
|
||||
```
|
||||
|
||||
## Git Branch
|
||||
## Git 分支
|
||||
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
`git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
|
||||
| `format` | `"on [$symbol$branch]($style) "` | The format for the module. Use `"$branch"` to refer to the current branch name. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of git branch. |
|
||||
| `style` | `"bold purple"` | 這個模組的風格。 |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. |
|
||||
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. |
|
||||
| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. |
|
||||
| `disabled` | `false` | Disables the `git_branch` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | -------------------------------- | ------------------------------------------------------------------------------------ |
|
||||
| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
|
||||
| `format` | `"on [$symbol$branch]($style) "` | The format for the module. Use `"$branch"` to refer to the current branch name. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of git branch. |
|
||||
| `style` | `"bold purple"` | 這個模組的風格。 |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. |
|
||||
| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 You can use `""` for no symbol. |
|
||||
| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. |
|
||||
| `disabled` | `false` | 停用 `git_branch` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1226,7 +1228,7 @@ tag_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),也會一併顯示出來。
|
||||
|
||||
### 選項
|
||||
|
||||
@@ -1241,7 +1243,7 @@ The `git_state` module will show in directories which are part of a git reposito
|
||||
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. |
|
||||
| `disabled` | `false` | Disables the `git_state` module. |
|
||||
| `disabled` | `false` | 停用 `git_state` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1270,7 +1272,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
|
||||
:::
|
||||
|
||||
@@ -1307,14 +1309,14 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
## Git Status
|
||||
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------ | ----------------------------------------------- | ----------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `"="` | This branch has merge conflicts. |
|
||||
| `conflicted` | `"="` | 這個分支有合併衝突。 |
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
@@ -1326,7 +1328,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `disabled` | `false` | 停用 `git_status` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1394,14 +1396,14 @@ behind = "⇣${count}"
|
||||
|
||||
The `golang` module shows the currently installed version of [Go](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `go.mod` file
|
||||
- The current directory contains a `go.sum` file
|
||||
- The current directory contains a `glide.yaml` file
|
||||
- The current directory contains a `Gopkg.yml` file
|
||||
- The current directory contains a `Gopkg.lock` file
|
||||
- 現在資料夾中含有一個 `go.mod` 檔案
|
||||
- 現在資料夾中含有一個 `go.sum` 檔案
|
||||
- 現在資料夾中含有一個 `glide.yaml` 檔案
|
||||
- 現在資料夾中含有一個 `Gopkg.yml` 檔案
|
||||
- 現在資料夾中含有一個 `Gopkg.lock` 檔案
|
||||
- The current directory contains a `.go-version` file
|
||||
- The current directory contains a `Godeps` directory
|
||||
- The current directory contains a file with the `.go` extension
|
||||
- 現在資料夾中含有一個 `Godeps` 資料夾
|
||||
- 現在資料夾中含有一個檔案具有 `.go` 副檔名
|
||||
|
||||
### 選項
|
||||
|
||||
@@ -1414,7 +1416,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
|
||||
| `detect_files` | `["go.mod", "go.sum", "glide.yaml", "Gopkg.yml", "Gopkg.lock", ".go-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["Godeps"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold cyan"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `golang` module. |
|
||||
| `disabled` | `false` | 停用 `golang` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1439,7 +1441,7 @@ format = "via [🏎💨 $version](bold cyan) "
|
||||
|
||||
The `helm` module shows the currently installed version of [Helm](https://helm.sh/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `helmfile.yaml` file
|
||||
- 現在資料夾中含有一個 `helmfile.yaml` 檔案
|
||||
- The current directory contains a `Chart.yaml` file
|
||||
|
||||
### 選項
|
||||
@@ -1476,17 +1478,17 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## 主機名稱
|
||||
|
||||
The `hostname` module shows the system hostname.
|
||||
`hostname` 模組顯示系統的主機名稱。
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
|
||||
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
|
||||
| `format` | `"[$hostname]($style) in "` | The format for the module. |
|
||||
| `style` | `"bold dimmed green"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `hostname` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | --------------------------- | ---------------------------------------------------------- |
|
||||
| `ssh_only` | `true` | 只在連接到一個 SSH session 時顯示主機名稱。 |
|
||||
| `trim_at` | `"."` | 擷取出主機名稱的斷點,以第一個符合的為準。 `"."` 會讓它停在第一個點的符號。 `""` 會停用任何的截斷功能。 |
|
||||
| `format` | `"[$hostname]($style) in "` | The format for the module. |
|
||||
| `style` | `"bold dimmed green"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `hostname` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1527,7 +1529,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
| `disabled` | `false` | 停用 `java` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1548,9 +1550,9 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
## Jobs
|
||||
## 工作
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there 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.
|
||||
`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 default functionality is:
|
||||
|
||||
@@ -1574,13 +1576,13 @@ The `threshold` option is deprecated, but if you want to use it, the module will
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
|
||||
| `threshold`\* | `1` | Show number of jobs if exceeded. |
|
||||
| `threshold`\* | `1` | 在超過指定值時顯示工作數量。 |
|
||||
| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. |
|
||||
| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. |
|
||||
| `format` | `"[$symbol$number]($style) "` | The format for the module. |
|
||||
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
|
||||
| `style` | `"bold blue"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `jobs` module. |
|
||||
| `disabled` | `false` | 停用 `jobs` 模組。 |
|
||||
\*: This option is deprecated, please use the
|
||||
|
||||
`number_threshold` and `symbol_threshold` options instead.
|
||||
@@ -1699,7 +1701,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
|
||||
:::
|
||||
|
||||
@@ -1759,15 +1761,15 @@ Long and automatically generated cluster names can be identified and shortened u
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
## 換行
|
||||
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
`line_break` 模組將提示字元分成兩行。
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | ------- | ------------------------------------------------------------------ |
|
||||
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | ------- | ----------------------------- |
|
||||
| `disabled` | `false` | 停用 `line_break` 模組,讓提示字元變成一行。 |
|
||||
|
||||
### 範例
|
||||
|
||||
@@ -1819,27 +1821,27 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = "via [🌕 $version](bold blue) "
|
||||
```
|
||||
|
||||
## Memory Usage
|
||||
## 記憶體使用量
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。
|
||||
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
|
||||
:::
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | 這個模組的風格。 |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------- | ----------------------------------------------- | -------------------------- |
|
||||
| `threshold` | `75` | 將記憶體使用量隱藏,除非使用量超過指定值。 |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | 顯示在記憶體使用量之前的符號。 |
|
||||
| `style` | `"bold dimmed white"` | 這個模組的風格。 |
|
||||
| `disabled` | `true` | 停用 `memory_usage` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1878,7 +1880,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
|
||||
| `style` | `"bold purple"` | 這個模組的風格。 |
|
||||
| `format` | `"on [$symbol$branch]($style) "` | The format for the module. |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes |
|
||||
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
|
||||
| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 |
|
||||
| `disabled` | `true` | Disables the `hg_branch` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1906,7 +1908,7 @@ truncation_symbol = ""
|
||||
|
||||
The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `nim.cfg` file
|
||||
- 現在資料夾中含有一個 `nim.cfg` 檔案
|
||||
- The current directory contains a file with the `.nim` extension
|
||||
- The current directory contains a file with the `.nims` extension
|
||||
- The current directory contains a file with the `.nimble` extension
|
||||
@@ -1946,7 +1948,7 @@ symbol = "🎣 "
|
||||
|
||||
## 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.
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. 這個模組會在 nix-shell 環境中顯示。
|
||||
|
||||
### 選項
|
||||
|
||||
@@ -1957,7 +1959,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
|
||||
| `style` | `"bold blue"` | 這個模組的風格。 |
|
||||
| `impure_msg` | `"impure"` | A format string shown when the shell is impure. |
|
||||
| `pure_msg` | `"pure"` | A format string shown when the shell is pure. |
|
||||
| `disabled` | `false` | Disables the `nix_shell` module. |
|
||||
| `disabled` | `false` | 停用 `nix_shell` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1986,10 +1988,10 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
|
||||
The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `package.json` file
|
||||
- 現在資料夾中包含一個 `package.json` 檔案
|
||||
- The current directory contains a `.node-version` file
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- The current directory contains a `node_modules` directory
|
||||
- 現在資料夾中包含一個 `node_modules` 資料夾
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
|
||||
@@ -2004,7 +2006,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `disabled` | `false` | 停用 `nodejs` 模組。 |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
|
||||
|
||||
### Variables
|
||||
@@ -2108,9 +2110,9 @@ style = "bold yellow"
|
||||
symbol = "☁️ "
|
||||
```
|
||||
|
||||
## Package Version
|
||||
## 套件版本
|
||||
|
||||
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` and `helm` packages.
|
||||
The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` 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
|
||||
@@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||
- [**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
|
||||
|
||||
> ⚠️ 顯示出來的版本是從你的現在資料夾之中擷取出來的,並非從套件管理員取得。
|
||||
@@ -2133,11 +2136,11 @@ The `package` module is shown when the current directory is the repository for a
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `symbol` | `"📦 "` | 顯示在套件的版本之前的符號。 |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | 這個模組的風格。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| `disabled` | `false` | 停用 `package` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -2202,7 +2205,7 @@ format = "via [🦪 $version]($style) "
|
||||
|
||||
The `php` module shows the currently installed version of [PHP](https://www.php.net/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `composer.json` file
|
||||
- 現在資料夾中含有一個 `composer.json` 檔案
|
||||
- The current directory contains a `.php-version` file
|
||||
- The current directory contains a `.php` extension
|
||||
|
||||
@@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
|
||||
format = "via [🔹 $version](147 bold) "
|
||||
```
|
||||
|
||||
## Pulumi
|
||||
|
||||
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
|
||||
|
||||
::: tip
|
||||
|
||||
By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version).
|
||||
|
||||
:::
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
|
||||
| `style` | `"bold 5"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `pulumi` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| 變數 | 範例 | 說明 |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| version | `v0.12.24` | The version of `pulumi` |
|
||||
| stack | `dev` | The current Pulumi stack |
|
||||
| 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
|
||||
|
||||
### 範例
|
||||
|
||||
#### With Pulumi Version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[pulumi]
|
||||
format = "[🛥 ($version )$stack]($style) "
|
||||
```
|
||||
|
||||
#### Without Pulumi version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
[pulumi]
|
||||
symbol = "🛥 "
|
||||
format = "[$symbol$stack]($style) "
|
||||
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met:
|
||||
@@ -2571,31 +2631,35 @@ The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
|
||||
:::
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------------------- | ------------ | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `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. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `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. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `"[$indicator]($style) "` | The format for the module. |
|
||||
| `style` | `"white bold"` | 這個模組的風格。 |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| --------- | -- | ---------------------------------------------------------- |
|
||||
| indicator | | Mirrors the value of `indicator` for currently used shell. |
|
||||
| style\* | | Mirrors the value of option `style`. |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Examples
|
||||
|
||||
@@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
fish_indicator = ""
|
||||
powershell_indicator = "_"
|
||||
unknown_indicator = "mystery shell"
|
||||
style = "cyan bold"
|
||||
disabled = false
|
||||
```
|
||||
|
||||
@@ -2683,7 +2748,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
|
||||
:::
|
||||
|
||||
@@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions
|
||||
|
||||
### 選項
|
||||
|
||||
@@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💠"` | A format string shown before the terraform workspace. |
|
||||
| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold 105"` | 這個模組的風格。 |
|
||||
@@ -2843,7 +2908,7 @@ The `time` module shows the current **local** time. The `format` configuration v
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
|
||||
:::
|
||||
|
||||
@@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
:::
|
||||
|
||||
::: warning Command output is printed unescaped to the prompt
|
||||
|
||||
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell.
|
||||
|
||||
Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html).
|
||||
|
||||
:::
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
@@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
files = ["foo"] # can specify filters but wildcards are not supported
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
format = " transcending [$output]($style)"
|
||||
|
||||
[custom.time]
|
||||
command = "time /T"
|
||||
files = ["*.pst"]
|
||||
extensions = ["pst"] # filters *.pst files
|
||||
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user