docs(i18n): new Crowdin translations (#1047)

This commit is contained in:
Matan Kushner
2020-04-06 14:48:26 -04:00
committed by GitHub
parent e94d5439ce
commit b01b498b9e
14 changed files with 1437 additions and 828 deletions
+209 -150
View File
@@ -98,6 +98,7 @@ prompt_order = [
"git_state",
"git_status",
"hg_branch",
"docker_context",
"package",
"dotnet",
"elixir",
@@ -105,6 +106,7 @@ prompt_order = [
"golang",
"haskell",
"java",
"julia",
"nodejs",
"php",
"python",
@@ -130,6 +132,8 @@ prompt_order = [
`aws` 模組顯示現在 AWS 的區域與概況。 這是根據 `AWS_REGION``AWS_DEFAULT_REGION``AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
### 選項
| 變數 | 預設 | 說明 |
@@ -318,7 +322,7 @@ style = "dimmed green"
The `crystal` module shows the currently installed version of Crystal. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `shard.yml` file
- 現在資料夾中含有一個 `shard.yml` 檔案
- The current directory contains a `.cr` file
### 選項
@@ -339,31 +343,31 @@ symbol = "✨ "
style = "bold blue"
```
## Directory
## 資料夾
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
`directory` 模組顯示到現在資料夾的路徑,並裁減到前三層資料夾。 你的資料夾也會被裁減到你所在的 git 儲存庫的根目錄。
When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
如果正在使用 fish 風格的 pwd 選項,將不會隱藏被裁減的資料夾,而是會根據你在選項中設定的數字看到每一層資料夾的縮寫。
For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
例如,給定一個右列的路徑 `~/Dev/Nix/nixpkgs/pkgs` 其中 `nixpkgs` 是儲存庫的根目錄,而且該選項被設定為 `1`。 你會看到 `~/D/N/nixpkgs/pkgs`,而在這個設定之前則是 `nixpkgs/pkgs`
### 選項
| 變數 | 預設 | 說明 |
| ------------------- | ------------- | -------------------------------------------------------------------------------- |
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
| `prefix` | `"in "` | Prefix to display immediately before the directory. |
| `style` | `"bold cyan"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `directory` module. |
| 變數 | 預設 | 說明 |
| ------------------- | ------------- | --------------------------------------------------- |
| `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 |
| `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 |
| `prefix` | `"in "` | Prefix to display immediately before the directory. |
| `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>
| 變數 | 預設 | 說明 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| `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 的路徑。 |
`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
@@ -378,22 +382,44 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
truncation_length = 8
```
## Dotnet
## Docker Context
The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
This module will only be shown in your prompt when one 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.
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
The `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`.
### 選項
| 變數 | 預設 | 說明 |
| ----------- | ------------- | -------------------------------------------------------- |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `dotnet` module. |
| 變數 | 預設 | 說明 |
| ----------------- | ------------- | --------------------------------------------------------------------------------------- |
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context . |
| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `true` | Disables the `docker_context` module. |
### 範例
```toml
# ~/.config/starship.toml
[docker_context]
symbol = "🐋 "
```
## Dotnet
`dotnet` 模組顯示現在資料夾使用的 .NET Core SDK 的版本。 如果這個資料夾已經選定一個 SDK,則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。
這個模組只會在下列檔案出現在你的現在資料夾中時,顯示在你的提示字元:`global.json``project.json``*.sln``*.csproj``*.fsproj``*.xproj`。 你也會需要安裝 .NET Core 文字命令工具來正確使用這個模組。
這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。
### 選項
| 變數 | 預設 | 說明 |
| ----------- | ------------- | ---------------------------- |
| `symbol` | `"•NET "` | 在顯示 dotnet 版本之前用的符號。 |
| `heuristic` | `true` | 使用更快速的版本偵測法來保持 starship 的速度。 |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `dotnet` 模組。 |
### 範例
@@ -410,7 +436,7 @@ heuristic = false
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `mix.exs` file.
- 現在資料夾中包含一個 `mix.exs` 檔案.
### 選項
@@ -432,8 +458,9 @@ symbol = "🔮 "
The `elm` module shows the currently installed version of Elm. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `elm.json` file
- The current directory contains a `elm-package.json` file
- 現在資料夾中包含一個 `elm.json` 檔案
- 現在資料夾中包含一個 `elm-package.json` 檔案
- The current directory contains a `.elm-version` file
- The current directory contains a `elm-stuff` folder
- The current directory contains a `*.elm` files
@@ -455,24 +482,24 @@ The `elm` module shows the currently installed version of Elm. 這個模組在
symbol = " "
```
## 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` 選項。
### 選項
| 變數 | 預設 | 說明 |
| ---------- | ---------------- | ---------------------------------------------------------------------------- |
| `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"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `env_var` module. |
| 變數 | 預設 | 說明 |
| ---------- | ---------------- | -------------------- |
| `symbol` | | 顯示在變數數值之前的符號。 |
| `variable` | | 要顯示的環境變數。 |
| `default` | | 在選擇的變數值沒有定義時,顯示的預設值。 |
| `prefix` | `""` | 在變數值正前方顯示的前綴。 |
| `suffix` | `""` | 在變數值正後方顯示的後綴。 |
| `style` | `"dimmed black"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `env_var` 模組。 |
### 範例
@@ -484,19 +511,19 @@ 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` 模組顯示現在的資料夾中使用中的儲存庫的分支。
### 選項
| 變數 | 預設 | 說明 |
| ------------------- | --------------- | ------------------------------------------------------------------------------------- |
| `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"` | 這個模組的風格。 |
| `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` 模組。 |
### 範例
@@ -535,22 +562,22 @@ commit_hash_length = 4
## Git State
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
`git_state` 模組會顯示在 git 儲存庫中的資料夾內,以及會在有作業正在進行時顯示,像是:_REBASING_、_BISECTING_ 等等。 如果有進展的資訊 (像是 REBASING 3/10),也會一併顯示出來。
### 選項
| 變數 | 預設 | 說明 |
| ------------------ | ------------------ | ---------------------------------------------------------------------------------------------------------------- |
| `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"` | 這個模組的風格。 |
| `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` 模組。 |
### 範例
@@ -564,34 +591,34 @@ cherry_pick = "🍒 PICKING"
## Git Status
The `git_status` module shows symbols representing the state of the repo in your current directory.
`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
### 選項
| 變數 | 預設 | 說明 |
| ------------------ | ------------------------ | ------------------------------------------------------- |
| `conflicted` | `"="` | This branch has merge conflicts. |
| `conflicted_count` | [連結](#git-status-counts) | Show and style the number of 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. |
| `untracked_count` | [連結](#git-status-counts) | Show and style the number of untracked files. |
| `stashed` | `"$"` | A stash exists for the local repository. |
| `stashed_count` | [連結](#git-status-counts) | Show and style the number of stashes. |
| `modified` | `"!"` | There are file modifications in the working directory. |
| `modified_count` | [連結](#git-status-counts) | Show and style the number of modified files. |
| `staged` | `"+"` | A new file has been added to the staging area. |
| `staged_count` | [連結](#git-status-counts) | Show and style the number of files staged files. |
| `renamed` | `"»"` | A renamed file has been added to the staging area. |
| `renamed_count` | [連結](#git-status-counts) | Show and style the number of renamed files. |
| `deleted` | `"✘"` | A file's deletion has been added to the staging area. |
| `deleted_count` | [連結](#git-status-counts) | Show and style the number of deleted files. |
| `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"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `git_status` module. |
| 變數 | 預設 | 說明 |
| ------------------ | ------------------------ | ------------------------------------------------ |
| `conflicted` | `"="` | 這個分支有合併衝突。 |
| `conflicted_count` | [連結](#git-status-counts) | Show and style the number of conflicts. |
| `ahead` | `"⇡"` | 這個分支超前正在追蹤的分支。 |
| `behind` | `"⇣"` | 這個分支落後正在追蹤的分支。 |
| `diverged` | `"⇕"` | 這個分支偏離正在追蹤的分支。 |
| `untracked` | `"?"` | 工作資料夾中有沒有追蹤的檔案。 |
| `untracked_count` | [連結](#git-status-counts) | Show and style the number of untracked files. |
| `stashed` | `"$"` | 本地儲存庫有 stash。 |
| `stashed_count` | [連結](#git-status-counts) | Show and style the number of stashes. |
| `modified` | `"!"` | 工作資料夾中有修改過的檔案。 |
| `modified_count` | [連結](#git-status-counts) | Show and style the number of modified files. |
| `staged` | `"+"` | 一個新檔案被加入了暫存區 (staging area)。 |
| `staged_count` | [連結](#git-status-counts) | Show and style the number of files staged files. |
| `renamed` | `"»"` | 一個被改名的檔案被加入了暫存區 (staging area)。 |
| `renamed_count` | [連結](#git-status-counts) | Show and style the number of renamed files. |
| `deleted` | `"✘"` | 一個刪除檔案的動作被加入了暫存區 (staging area)。 |
| `deleted_count` | [連結](#git-status-counts) | Show and style the number of deleted files. |
| `show_sync_count` | `false` | 顯示超前/落後追蹤的分支的數量。 |
| `prefix` | `[` | 在 git 狀態正前方顯示的前綴。 |
| `suffix` | `]` | 在 git 狀態正後方顯示的後綴。 |
| `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `git_status` 模組。 |
#### Git Status Counts
@@ -623,23 +650,24 @@ deleted = "🗑"
## Golang
The `golang` module shows the currently installed version of Golang. 這個模組在下列其中一個條件達成時顯示:
`golang` 模組顯示現在安裝的 Golang 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `go.mod` file
- The current directory contains a `go.sum` file
- The current directory contains a `glide.yaml` file
- The current directory contains a `Gopkg.yml` file
- The current directory contains a `Gopkg.lock` file
- 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` 檔案
- The current directory contains a `.go-version` file
- 現在資料夾中含有一個 `Godeps` 資料夾
- 現在資料夾中含有一個檔案具有 `.go` 副檔名
### 選項
| 變數 | 預設 | 說明 |
| ---------- | ------------- | -------------------------------------------------------- |
| `symbol` | `"🐹 "` | The symbol used before displaying the version of Golang. |
| `style` | `"bold cyan"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `golang` module. |
| 變數 | 預設 | 說明 |
| ---------- | ------------- | ------------------- |
| `symbol` | `"🐹 "` | 顯示在 Golang 版本之前的符號。 |
| `style` | `"bold cyan"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `golang` 模組。 |
### 範例
@@ -653,7 +681,7 @@ symbol = "🏎💨 "
The `haskell` module shows the currently installed version of Haskell Stack version. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `stack.yaml` file
- 現在資料夾中包含一個 `stack.yaml` 檔案
### 選項
@@ -703,18 +731,18 @@ disabled = false
## Java
The `java` module shows the currently installed version of Java. 這個模組在下列其中一個條件達成時顯示:
`java` 模組顯示現在安裝的 Java 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension
### 選項
| 變數 | 預設 | 說明 |
| ---------- | -------------- | ------------------------------------------------------ |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. |
| `style` | `"dimmed red"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `java` module. |
| 變數 | 預設 | 說明 |
| ---------- | -------------- | ----------------- |
| `symbol` | `"☕ "` | 顯示在 Java 版本之前的符號。 |
| `style` | `"dimmed red"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `java` 模組。 |
### 範例
@@ -725,18 +753,18 @@ The `java` module shows the currently installed version of Java. 這個模組在
symbol = "🌟 "
```
## Jobs
## 工作
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists.
`jobs` 模組顯示現在正在執行中的工作。 這個模組只會在有背景工作正在執行時顯示。 這個模組會在工作數量超過一個,或者有設定 `threshold` 時且數量超過設定值時,顯示工作的數量。
### 選項
| 變數 | 預設 | 說明 |
| ----------- | ------------- | ----------------------------------------------------- |
| `symbol` | `"✦"` | The symbol used before displaying the number of jobs. |
| `threshold` | `1` | Show number of jobs if exceeded. |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `jobs` module. |
| 變數 | 預設 | 說明 |
| ----------- | ------------- | -------------- |
| `symbol` | `"✦"` | 在顯示工作數量之前用的符號。 |
| `threshold` | `1` | 在超過指定值時顯示工作數量。 |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `jobs` 模組。 |
### 範例
@@ -748,9 +776,33 @@ symbol = "+ "
threshold = 4
```
## Julia
The `julia` module shows the currently installed version of Julia. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `Project.toml` file
- The current directory contains a `Manifest.toml` file
- The current directory contains a file with the `.jl` extension
### 選項
| 變數 | 預設 | 說明 |
| ---------- | --------------- | ------------------------------------------------------- |
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
| `style` | `"bold purple"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `julia` module. |
### 範例
```toml
# ~/.config/starship.toml
[julia]
symbol = "👸 "
```
## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
顯示現在 Kubernetes 主體名稱以及從 kubeconfig 檔案來的名稱空間 (如果有設定的話)。 The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 如果有設定 `$KUBECONFIG` 環境變數,這個模組就會使用設定值;如果沒有,它就會使用 `~/.kube/config`
::: tip
@@ -760,11 +812,12 @@ Displays the current Kubernetes context name and, if set, the namespace from the
### 選項
| 變數 | 預設 | 說明 |
| ---------- | ------------- | --------------------------------------------------- |
| `symbol` | `"☸ "` | The symbol used before displaying the Cluster info. |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `true` | Disables the `kubernetes` module |
| 變數 | 預設 | 說明 |
| ----------------- | ------------- | ----------------------------------- |
| `symbol` | `"☸ "` | 顯示在叢集 (cluster) 資訊之前的符號。 |
| `context_aliases` | | Table of context aliases to display |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `true` | 停用 `kubernetes` 模組。 |
### 範例
@@ -775,17 +828,19 @@ Displays the current Kubernetes context name and, if set, the namespace from the
symbol = "⛵ "
style = "dimmed green"
disabled = false
[kubernetes.context_aliases]
"dev.local.cluster.k8s" = "dev"
```
## Line Break
## 換行
The `line_break` module separates the prompt into two lines.
`line_break` 模組將提示字元分成兩行。
### 選項
| 變數 | 預設 | 說明 |
| ---------- | ------- | ------------------------------------------------------------------ |
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
| 變數 | 預設 | 說明 |
| ---------- | ------- | ----------------------------- |
| `disabled` | `false` | 停用 `line_break` 模組,讓提示字元變成一行。 |
### 範例
@@ -796,11 +851,11 @@ The `line_break` module separates the prompt into two lines.
disabled = true
```
## Memory Usage
## 記憶體使用量
The `memory_usage` module shows current system memory and swap usage.
`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。
By default the swap usage is displayed if the total system swap is non-zero.
預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。
::: tip
@@ -812,13 +867,13 @@ By default the swap usage is displayed if the total system swap is non-zero.
| 變數 | 預設 | 說明 |
| ----------------- | --------------------- | ------------------------------------------------------------- |
| `show_percentage` | `false` | Display memory usage as a percentage of the available memory. |
| `show_swap` | `true` | Display swap usage if total swap is non-zero. |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
| `symbol` | `"🐏 "` | The symbol used before displaying the memory usage. |
| `show_percentage` | `false` | 以剩餘記憶體佔有的百分比的方式顯示記憶體使用狀況。 |
| `show_swap` | `true` | 如果總 swap 使用量不為零的話,顯示 swap 使用量 |
| `threshold` | `75` | 將記憶體使用量隱藏,除非使用量超過指定值。 |
| `symbol` | `"🐏 "` | 顯示在記憶體使用量之前的符號。 |
| `separator` | `" | "` | The symbol or text that will seperate the ram and swap usage. |
| `style` | `"bold dimmed white"` | 這個模組的風格。 |
| `disabled` | `true` | Disables the `memory_usage` module. |
| `disabled` | `true` | 停用 `memory_usage` 模組。 |
### 範例
@@ -845,7 +900,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| ------------------- | --------------- | -------------------------------------------------------------------------------------------- |
| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 |
| `style` | `"bold purple"` | 這個模組的風格。 |
| `disabled` | `true` | Disables the `hg_branch` module. |
@@ -862,17 +917,17 @@ truncation_symbol = ""
## Nix-shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
`nix_shell` 模組顯示 nix-shell 環境。 這個模組會在 nix-shell 環境中顯示。
### 選項
| 變數 | 預設 | 說明 |
| ------------ | ------------ | ---------------------------------- |
| `use_name` | `false` | Display the name of the nix-shell. |
| `impure_msg` | `"impure"` | Customize the "impure" msg. |
| `pure_msg` | `"pure"` | Customize the "pure" msg. |
| `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `nix_shell` module. |
| 變數 | 預設 | 說明 |
| ------------ | ------------ | ------------------ |
| `use_name` | `false` | 顯示 nix-shell 的名稱。 |
| `impure_msg` | `"impure"` | 自定義「impure」訊息。 |
| `pure_msg` | `"pure"` | 自定義「pure」訊息。 |
| `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `nix_shell` 模組。 |
### 範例
@@ -891,6 +946,7 @@ pure_msg = "pure shell"
`nodejs` 模組顯示現在安裝的 NodeJS 版本。 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中包含一個 `package.json` 檔案
- The current directory contains a `.node-version` file
- 現在資料夾中包含一個 `node_modules` 資料夾
- 現在資料夾中包含一個檔案具有 `.js` 副檔名
@@ -920,6 +976,7 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並
- **poetry** `poetry` 套件的版本是從現在資料夾中的 `pyproject.toml` 之中擷取出來的
- **composer** The `composer` package version is extracted from the `composer.json` present in the current directory
- **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
> ⚠️ 顯示出來的版本是從你的現在資料夾之中擷取出來的,並非從套件管理員取得。
@@ -944,7 +1001,8 @@ symbol = "🎁 "
The `php` module shows the currently installed version of PHP. 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中含一個 `composer.json` 檔案
- 現在資料夾中含一個 `composer.json` 檔案
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file
### 選項
@@ -1008,6 +1066,7 @@ pyenv_prefix = "foo "
`ruby` 模組顯示現在安裝的 Ruby 版本。 這個模組在下列其中一個條件達成時顯示:
- 目前資料夾中有一個 `Gemfile` 檔案
- The current directory contains a `.ruby-version` file
- 目前資料夾中有一個 `.rb` 檔案
### 選項