mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
docs(i18n): new Crowdin updates (#1719)
This commit is contained in:
+112
-116
@@ -234,13 +234,13 @@ $character"""
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------------- | ---------------------------------------------------- | -------------------------- |
|
||||
| `format` | `"on [$symbol$profile(\\($region\\))]($style) "` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | 顯示在目前 AWS 配置之前的符號。 |
|
||||
| `region_aliases` | | 除了AWS名稱外,顯示區域別名表 |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `AWS` 模組。 |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------------- | ------------------------------------------------ | -------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | 顯示在目前 AWS 配置之前的符號。 |
|
||||
| `region_aliases` | | 除了AWS名稱外,顯示區域別名表 |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `AWS` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -261,7 +261,7 @@ $character"""
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = "on [$symbol$profile(\\($region\\))]($style) "
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@@ -346,7 +346,7 @@ style = "bold red"
|
||||
|
||||
`display` 選項是一個下列表格的陣列。
|
||||
|
||||
| 變數 | 說明 |
|
||||
| Option | 說明 |
|
||||
| ----------- | ----------- |
|
||||
| `threshold` | 顯示選項的上界。 |
|
||||
| `style` | 顯示選項使用時的風格。 |
|
||||
@@ -575,7 +575,7 @@ The `dart` module shows the currently installed version of Dart. 這個模組在
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | ---------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🎯 "` | A format string representing the symbol of Dart |
|
||||
@@ -611,7 +611,7 @@ format = "via [🔰 $version](bold red) "
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------------- | -------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 |
|
||||
| `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 |
|
||||
@@ -620,6 +620,7 @@ format = "via [🔰 $version](bold red) "
|
||||
| `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: "…/" |
|
||||
|
||||
<details>
|
||||
<summary>這個模組有些進階設定選項可以控制顯示資料夾。</summary>
|
||||
@@ -658,6 +659,7 @@ format = "via [🔰 $version](bold red) "
|
||||
|
||||
[directory]
|
||||
truncation_length = 8
|
||||
truncation_symbol = "…/"
|
||||
```
|
||||
|
||||
## Docker Context
|
||||
@@ -755,12 +757,12 @@ The `elixir` module shows the currently installed version of Elixir and Erlang/O
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | ------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `style` | `"bold purple"` | 這個模組的風格。 |
|
||||
| `format` | `"via [$symbol$version \\(OTP $otp_version\\)]($style) "` | The format for the module elixir. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | --------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `style` | `"bold purple"` | 這個模組的風格。 |
|
||||
| `format` | `'via [$symbol$version \(OTP $otp_version\)]($style) '` | The format for the module elixir. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -898,13 +900,13 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| ---------------- | ---------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `"on [$symbol$account(\\($region\\))]($style) "` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the GCP name. |
|
||||
| `style` | `"bold blue"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `gcloud` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$account(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the GCP name. |
|
||||
| `style` | `"bold blue"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `gcloud` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -927,7 +929,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[gcloud]
|
||||
format = "on [$symbol$account(\\($project\\))]($style) "
|
||||
format = 'on [$symbol$account(\($project\))]($style) '
|
||||
```
|
||||
|
||||
#### Display active config name only
|
||||
@@ -994,13 +996,13 @@ The `git_commit` module shows the current commit hash of the repo in your curren
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) "` | The format for the module. |
|
||||
| `style` | `"bold green"` | 這個模組的風格。 |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | -------------------------- | ----------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `'[\($hash\)]($style) '` | The format for the module. |
|
||||
| `style` | `"bold green"` | 這個模組的風格。 |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1026,18 +1028,18 @@ commit_hash_length = 4
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||
| `rebase` | `"REBASING"` | A format string displayed when a `rebase` is in progress. |
|
||||
| `merge` | `"MERGING"` | A format string displayed when a `merge` is in progress. |
|
||||
| `revert` | `"REVERTING"` | A format string displayed when a `revert` is in progress. |
|
||||
| `cherry_pick` | `"CHERRY-PICKING"` | A format string displayed when a `cherry-pick` is in progress. |
|
||||
| `bisect` | `"BISECTING"` | A format string displayed when a `bisect` is in progress. |
|
||||
| `am` | `"AM"` | A format string displayed when an `apply-mailbox` (`git am`) is in progress. |
|
||||
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `format` | `"\\([$state( $progress_current/$progress_total)]($style)\\) "` | The format for the module. |
|
||||
| `disabled` | `false` | 停用 `git_state` 模組。 |
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||
| `rebase` | `"REBASING"` | A format string displayed when a `rebase` is in progress. |
|
||||
| `merge` | `"MERGING"` | A format string displayed when a `merge` is in progress. |
|
||||
| `revert` | `"REVERTING"` | A format string displayed when a `revert` is in progress. |
|
||||
| `cherry_pick` | `"CHERRY-PICKING"` | A format string displayed when a `cherry-pick` is in progress. |
|
||||
| `bisect` | `"BISECTING"` | A format string displayed when a `bisect` is in progress. |
|
||||
| `am` | `"AM"` | A format string displayed when an `apply-mailbox` (`git am`) is in progress. |
|
||||
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. |
|
||||
| `disabled` | `false` | 停用 `git_state` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1056,7 +1058,7 @@ commit_hash_length = 4
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[git_state]
|
||||
format = "[\\($state( $progress_current of $progress_total)\\)]($style) "
|
||||
format = '[\($state( $progress_current of $progress_total)\)]($style) '
|
||||
cherry_pick = "[🍒 PICKING](bold red)"
|
||||
```
|
||||
|
||||
@@ -1066,21 +1068,21 @@ cherry_pick = "[🍒 PICKING](bold red)"
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------ | --------------------------------------------- | ----------------------------------- |
|
||||
| `format` | `"[\[$all_status$ahead_behind\]]($style) "` | The default format for `git_status` |
|
||||
| `conflicted` | `"="` | 這個分支有合併衝突。 |
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
| `staged` | `"+"` | The format of `staged` |
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `git_status` 模組。 |
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------ | ----------------------------------------------- | ----------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `"="` | 這個分支有合併衝突。 |
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
| `staged` | `"+"` | The format of `staged` |
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `git_status` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1371,14 +1373,13 @@ Displays the current Kubernetes context name and, if set, the namespace from the
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------------------- | -------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
|
||||
| `format` | `"[$symbol$context( \\($namespace\\))]($style) in "` | The format for the module. |
|
||||
| `style` | `"cyan bold"` | 這個模組的風格。 |
|
||||
| `namespace_spaceholder` | `none` | The value to display if no namespace was found. |
|
||||
| `context_aliases` | | Table of context aliases to display. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
|
||||
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
|
||||
| `style` | `"cyan bold"` | 這個模組的風格。 |
|
||||
| `context_aliases` | | Table of context aliases to display. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1397,7 +1398,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[kubernetes]
|
||||
format = "on [⛵ $context \\($namespace\\)](dimmed green) "
|
||||
format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
@@ -1552,14 +1553,14 @@ symbol = "🎣 "
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------ | -------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$state( \\($name\\))]($style) "` | The format for the module. |
|
||||
| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. |
|
||||
| `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` | 停用 `nix_shell` 模組。 |
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------ | ---------------------------------------------- | ----------------------------------------------------- |
|
||||
| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. |
|
||||
| `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` | 停用 `nix_shell` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1581,7 +1582,7 @@ symbol = "🎣 "
|
||||
disabled = true
|
||||
impure_msg = "[impure shell](bold red)"
|
||||
pure_msg = "[pure shell](bold green)"
|
||||
format = "via [☃️ $state( \\($name\\))](bold blue) "
|
||||
format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
```
|
||||
|
||||
## NodeJS
|
||||
@@ -1718,7 +1719,7 @@ The `perl` module shows the currently installed version of Perl. 這個模組在
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | ---------------------------------- | ----------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$version]($style) "` | The format string for the module. |
|
||||
| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl |
|
||||
@@ -1798,15 +1799,16 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}${pyenv_prefix}${version}( \\($virtualenv\\))]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | 這個模組的風格。 |
|
||||
| `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
|
||||
| `disabled` | `false` | 停用 `python` 模組。 |
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | 這個模組的風格。 |
|
||||
| `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
|
||||
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
|
||||
| `disabled` | `false` | 停用 `python` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1818,23 +1820,6 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
|
||||
| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `"venv"` | The current `virtualenv` name |
|
||||
|
||||
<details>
|
||||
<summary>This module has some advanced configuration options.</summary>
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| --------------- | -------- | ----------------------------------------------------------------------------- |
|
||||
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
|
||||
|
||||
The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used.
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
python_binary = "python3"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### 範例
|
||||
|
||||
@@ -1846,6 +1831,17 @@ symbol = "👾 "
|
||||
pyenv_version_name = true
|
||||
```
|
||||
|
||||
Using the `python3` binary to get the version.
|
||||
|
||||
Note - The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used.
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
python_binary = "python3"
|
||||
```
|
||||
|
||||
## Ruby
|
||||
|
||||
`ruby` 模組顯示現在安裝的 Ruby 版本。 這個模組在下列其中一個條件達成時顯示:
|
||||
@@ -1923,7 +1919,7 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable,
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------- | ---------------------------- | --------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
@@ -1958,12 +1954,12 @@ The `singularity` module shows the current singularity image, if inside a contai
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | ------------------------------------ | ------------------------------------------------ |
|
||||
| `format` | `"[$symbol\\[$env\\]]($style) "` | The format for the module. |
|
||||
| `symbol` | `""` | A format string displayed before the image name. |
|
||||
| `style` | `"bold dimmed blue"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `singularity` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | -------------------------------- | ------------------------------------------------ |
|
||||
| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. |
|
||||
| `symbol` | `""` | A format string displayed before the image name. |
|
||||
| `style` | `"bold dimmed blue"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `singularity` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1981,7 +1977,7 @@ The `singularity` module shows the current singularity image, if inside a contai
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[singularity]
|
||||
format = "[📦 \\[$env\\]]($style) "
|
||||
format = '[📦 \[$env\]]($style) '
|
||||
```
|
||||
|
||||
## Swift
|
||||
@@ -2029,7 +2025,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | -------------------------- | ------------------------------------------------------ |
|
||||
| `format` | `[$symbol$status]($style)` | The format of the module |
|
||||
| `symbol` | `"✖"` | A format string representing the symbol for the status |
|
||||
@@ -2055,7 +2051,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
[status]
|
||||
style = "bg:blue"
|
||||
symbol = "💣 "
|
||||
format = "[\\[$symbol$status\\]]($style) "
|
||||
format = '[\[$symbol$status\]]($style) '
|
||||
disabled = false
|
||||
|
||||
```
|
||||
@@ -2147,7 +2143,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 不然的話,
|
||||
|
||||
[time]
|
||||
disabled = false
|
||||
format = "🕙[\\[ $time \\]]($style) "
|
||||
format = '🕙[\[ $time \]]($style) '
|
||||
time_format = "%T"
|
||||
utc_time_offset = "-5"
|
||||
time_range = "10:00:00-14:00:00"
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
- **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **Prompt**: [Starship](https://starship.rs/)
|
||||
|
||||
## How do I get command completion as shown in the demo GIF?
|
||||
|
||||
Completion support is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
|
||||
## Do top level `format` and `<module>.disabled` do the same thing?
|
||||
|
||||
Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `<module>.disabled` is the preferred way to do so for these reasons:
|
||||
|
||||
@@ -8,7 +8,7 @@ This guide is intended to walk you through the breaking changes.
|
||||
|
||||
Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship.
|
||||
|
||||
Starship v0.45.0 will instead be accepting a `format` value, allowing for customization of the prompt outside of the modules themselves.
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
|
||||
@@ -52,11 +52,11 @@ format = """\
|
||||
"""
|
||||
```
|
||||
|
||||
## Module `prefix` and `suffix` will be replaced by `format`
|
||||
## Module `prefix` and `suffix` have been replaced by `format`
|
||||
|
||||
Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered.
|
||||
|
||||
Starship v0.45.0 will instead be accepting a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
|
||||
@@ -71,7 +71,7 @@ prefix = "took "
|
||||
[cmd_duration]
|
||||
# $duration – The command duration (e.g. "15s")
|
||||
# $style – The default style of the module (e.g. "bold yellow")
|
||||
format = "took [$duration]($style)"
|
||||
format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
### Affected Modules
|
||||
@@ -93,8 +93,8 @@ format = "took [$duration]($style)"
|
||||
-- error_symbol = "✖"
|
||||
-- use_symbol_for_status = true
|
||||
-- vicmd_symbol = "❮"
|
||||
++ success_symbol = "[❯](bold green) "
|
||||
++ error_symbol = "[❯](bold red) "
|
||||
++ success_symbol = "[❯](bold green)"
|
||||
++ error_symbol = "[❯](bold red)"
|
||||
++ vicmd_symbol = "[❮](bold green)"
|
||||
```
|
||||
|
||||
@@ -106,9 +106,11 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
|
||||
|
||||
```toml
|
||||
[character]
|
||||
error_symbol = "[✖](bold red) "
|
||||
error_symbol = "[✖](bold red)"
|
||||
```
|
||||
|
||||
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
|
||||
#### 指令持續時間
|
||||
|
||||
| Removed Property | Replacement |
|
||||
@@ -120,7 +122,7 @@ error_symbol = "[✖](bold red) "
|
||||
```diff
|
||||
[cmd_duration]
|
||||
-- prefix = "took "
|
||||
++ format = "took [$duration]($style)"
|
||||
++ format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
#### 資料夾
|
||||
@@ -134,7 +136,7 @@ error_symbol = "[✖](bold red) "
|
||||
```diff
|
||||
[directory]
|
||||
-- prefix = "in "
|
||||
++ format = "[$path]($style)[$read_only]($read_only_style)"
|
||||
++ format = "[$path]($style)[$read_only]($read_only_style) "
|
||||
```
|
||||
|
||||
#### 環境變數
|
||||
@@ -166,7 +168,7 @@ error_symbol = "[✖](bold red) "
|
||||
[git_commit]
|
||||
-- prefix = "("
|
||||
-- suffix = ")"
|
||||
++ format = "[\\($hash\\)]($style) "
|
||||
++ format = '[\($hash\)]($style) '
|
||||
```
|
||||
|
||||
#### Git Status
|
||||
@@ -184,12 +186,12 @@ error_symbol = "[✖](bold red) "
|
||||
-- prefix = "["
|
||||
-- suffix = "]"
|
||||
-- show_sync_count = false
|
||||
++ format = "([$all_status$ahead_behind] )"
|
||||
++ format = '([\[$all_status$ahead_behind\]]($style) )'
|
||||
```
|
||||
|
||||
Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch.
|
||||
|
||||
With the release of v0.45.0, this has been replaced with the
|
||||
With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
|
||||
|
||||
To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file:
|
||||
|
||||
@@ -230,7 +232,7 @@ behind = "⇣${count}"
|
||||
[singularity]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = "[$symbol\\[$env\\]]($style) "
|
||||
++ format = '[$symbol\[$env\]]($style) '
|
||||
```
|
||||
|
||||
#### 時間
|
||||
@@ -245,7 +247,7 @@ behind = "⇣${count}"
|
||||
[time]
|
||||
-- format = "🕙[ %T ]"
|
||||
++ time_format = "%T"
|
||||
++ format = "at 🕙[$time]($style)
|
||||
++ format = "at 🕙[$time]($style) "
|
||||
```
|
||||
|
||||
#### Custom Commands
|
||||
|
||||
Reference in New Issue
Block a user