diff options
author | Matan Kushner <hello@matchai.dev> | 2022-04-18 09:48:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-18 15:48:28 +0100 |
commit | 6a187dcbd7bb9712d9724020e4fb34ba765c9100 (patch) | |
tree | 93f139b1ed14af1bd063fcb2f234f86aac98a1b7 /docs/zh-TW | |
parent | 2e9516398dfd20e77f4a94dea63aab0b7244e103 (diff) |
docs(i18n): new Crowdin updates (#3789)
* New translations README.md (Sorani (Kurdish))
* New translations README.md (Chinese Traditional)
* New translations README.md (Chinese Simplified)
* New translations README.md (Chinese Simplified)
* New translations README.md (Chinese Traditional)
* New translations README.md (Vietnamese)
* New translations README.md (Vietnamese)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Indonesian)
* New translations README.md (Indonesian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Vietnamese)
* New translations README.md (Indonesian)
* New translations README.md (Sorani (Kurdish))
* New translations bracketed-segments.md (Portuguese, Brazilian)
* New translations nerd-font.md (Portuguese, Brazilian)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (Spanish)
* New translations README.md (French)
* New translations README.md (Arabic)
* 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 (Russian)
* 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 (Sorani (Kurdish))
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (Japanese)
* New translations README.md (Japanese)
* New translations README.md (Japanese)
* New translations README.md (Japanese)
* New translations README.md (Japanese)
* New translations README.md (Japanese)
* New translations README.md (Japanese)
* New translations README.md (Japanese)
* New translations README.md (Japanese)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (Spanish)
* New translations README.md (Chinese Traditional)
* New translations README.md (Russian)
* New translations README.md (Turkish)
* New translations README.md (Turkish)
* New translations README.md (Chinese Simplified)
* New translations README.md (Chinese Simplified)
* New translations README.md (Chinese Traditional)
* New translations README.md (Vietnamese)
* New translations README.md (Portuguese)
* New translations README.md (Vietnamese)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Indonesian)
* New translations README.md (Indonesian)
* New translations README.md (Sorani (Kurdish))
* New translations README.md (Russian)
* New translations README.md (Portuguese)
* New translations README.md (French)
* New translations README.md (Italian)
* New translations README.md (French)
* New translations README.md (Spanish)
* New translations README.md (Arabic)
* New translations README.md (Arabic)
* New translations README.md (German)
* New translations README.md (German)
* New translations README.md (Italian)
* New translations README.md (Polish)
* New translations README.md (Japanese)
* New translations README.md (Japanese)
* New translations README.md (Korean)
* New translations README.md (Korean)
* New translations README.md (Dutch)
* New translations README.md (Dutch)
* New translations README.md (Polish)
* New translations README.md (Sorani (Kurdish))
* New translations README.md (Spanish)
* New translations README.md (Spanish)
* New translations README.md (Spanish)
* 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 (Arabic)
* New translations README.md (Sorani (Kurdish))
* New translations README.md (Spanish)
* 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 (Arabic)
* New translations README.md (Sorani (Kurdish))
* New translations README.md (Spanish)
* 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 (French)
* New translations README.md (Chinese Simplified)
* New translations README.md (Chinese Traditional)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Vietnamese)
* New translations README.md (Polish)
* New translations README.md (Turkish)
* New translations README.md (Russian)
* New translations README.md (Portuguese)
* New translations README.md (Dutch)
* New translations README.md (Indonesian)
* New translations README.md (Sorani (Kurdish))
* 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 bracketed-segments.md (Spanish)
* New translations nerd-font.md (Spanish)
* New translations no-runtimes.md (Spanish)
* New translations plain-text.md (Spanish)
* New translations pure-preset.md (Spanish)
* New translations pastel-powerline.md (Spanish)
* New translations README.md (Chinese Simplified)
* New translations README.md (Arabic)
* New translations README.md (German)
* New translations README.md (Italian)
* New translations README.md (Japanese)
* New translations README.md (French)
* New translations README.md (Japanese)
* New translations README.md (Russian)
* 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 (Indonesian)
* New translations README.md (Spanish)
* 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 (Arabic)
* New translations README.md (Sorani (Kurdish))
* New translations README.md (Japanese)
* New translations README.md (Japanese)
* New translations README.md (Spanish)
* 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 (Arabic)
* New translations README.md (Sorani (Kurdish))
Diffstat (limited to 'docs/zh-TW')
-rw-r--r-- | docs/zh-TW/README.md | 2 | ||||
-rw-r--r-- | docs/zh-TW/advanced-config/README.md | 2 | ||||
-rw-r--r-- | docs/zh-TW/config/README.md | 489 | ||||
-rw-r--r-- | docs/zh-TW/guide/README.md | 14 | ||||
-rw-r--r-- | docs/zh-TW/installing/README.md | 2 |
5 files changed, 301 insertions, 208 deletions
diff --git a/docs/zh-TW/README.md b/docs/zh-TW/README.md index 4690e3f5b..f911bca25 100644 --- a/docs/zh-TW/README.md +++ b/docs/zh-TW/README.md @@ -120,7 +120,7 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化 #### Elvish - ::: warning 只有 elvish v0.17 或以上版本才有支援 ::: + ::: warning 只有 elvish v0.18 或以上版本才有支援 ::: 將以下內容放到 `~/.elvish/rc.elv` 的結尾: diff --git a/docs/zh-TW/advanced-config/README.md b/docs/zh-TW/advanced-config/README.md index fc63a3c29..1acae637d 100644 --- a/docs/zh-TW/advanced-config/README.md +++ b/docs/zh-TW/advanced-config/README.md @@ -131,7 +131,7 @@ Invoke-Expression (&starship init powershell) Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. -Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill). +Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). `right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index b8e270a66..0f9057b90 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -9,6 +9,9 @@ mkdir -p ~/.config && touch ~/.config/starship.toml 所有關於 Starship 的設定都在這個 [TOML](https://github.com/toml-lang/toml) 檔案內: ```toml +# Get editor completions based on the config schema +"$schema" = 'https://starship.rs/config-schema.json' + # Inserts a blank line between shell prompts add_newline = true @@ -199,6 +202,7 @@ $hg_branch\ $docker_context\ $package\ $buf\ +$c\ $cmake\ $cobol\ $container\ @@ -235,6 +239,7 @@ $vagrant\ $zig\ $nix_shell\ $conda\ +$spack\ $memory_usage\ $aws\ $gcloud\ @@ -263,9 +268,9 @@ format = "$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile when credentials, a `credential_process` or a `sso_start_url` have been setup. 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。 This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials, a `credential_process` or a `sso_start_url` have been setup. Alternatively, you can force this module to show the region and profile even when the credentials have not been setup with the `force_display` option. 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。 This module also shows an expiration timer when using temporary credentials. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if the conditions above are not respected. 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. @@ -275,15 +280,16 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL ### 選項 -| Option | 預設 | 說明 | -| ------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------- | -| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | 顯示在目前 AWS 配置之前的符號。 | -| `region_aliases` | | 除了AWS名稱外,顯示區域別名表 | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | 這個模組的風格。 | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | -| `disabled` | `false` | Disables the `AWS` module. | +| Option | 預設 | 說明 | +| ------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($style)'` | The format for the module. | +| `symbol` | `"☁️ "` | 顯示在目前 AWS 配置之前的符號。 | +| `region_aliases` | | 除了AWS名稱外,顯示區域別名表 | +| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | 這個模組的風格。 | +| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `disabled` | `false` | 停用 `AWS` 模組。 | +| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | ### Variables @@ -472,11 +478,57 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil symbol = "🦬 " ``` +## C + +The `c` module shows some information about your C compiler. By default the module will be shown if the current directory contains a `.c` or `.h` file. + +### 選項 + +| Option | 預設 | 說明 | +| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"C "` | The symbol used before displaying the compiler details | +| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | +| `style` | `"bold 149"` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `c` module. | + +### Variables + +| 變數 | 範例 | 說明 | +| ------- | ------ | ------------------------------------ | +| name | clang | The name of the compiler | +| version | 13.0.0 | The version of the compiler | +| symbol | | Mirrors the value of option `symbol` | +| style | | Mirrors the value of option `style` | + +NB that `version` is not in the default format. + +### Commands + +The `commands` option accepts a list of commands to determine the compiler version and name. + +Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. + +If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). + +### 範例 + +```toml +# ~/.config/starship.toml + +[c] +format = "via [$name $version]($style)" +``` + ## 字元 -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 (`❯`/`✖`) @@ -497,7 +549,7 @@ By default it only changes color. If you also want to change its shape take a lo | `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | | `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | | `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `disabled` | `false` | Disables the `character` module. | +| `disabled` | `false` | 停用 `character` 模組。 | ### Variables @@ -598,25 +650,25 @@ 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. | +| `show_milliseconds` | `false` | 顯示時間除了以秒為單位外,亦以毫秒顯示 | | `format` | `"took [$duration]($style) "` | The format for the module. | | `style` | `"bold yellow"` | 這個模組的風格。 | -| `disabled` | `false` | Disables the `cmd_duration` module. | +| `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). | | `notification_timeout` | | Duration to show notification for (in milliseconds). If unset, notification timeout will be determined by daemon. Not all notification daemons honor this option. | @@ -652,14 +704,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 @@ -716,8 +768,8 @@ format = "[$symbol \\[$name\\]]($style) " 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`檔案 ### 選項 @@ -757,7 +809,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` 檔案 ### 選項 @@ -829,21 +881,21 @@ 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. | +| `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` | Disables the `directory` module. | +| `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: "…/" | @@ -853,12 +905,12 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | <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. @@ -945,7 +997,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: @@ -960,9 +1012,9 @@ 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. +The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks>) when there is a `.csproj` file in the current directory. ### 選項 @@ -970,13 +1022,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 @@ -1004,7 +1056,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` 檔案. ### 選項 @@ -1043,8 +1095,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 `*.elm` files @@ -1083,10 +1135,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. @@ -1103,13 +1155,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 @@ -1147,8 +1199,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` 檔案. ### 選項 |