diff options
Diffstat (limited to 'docs/zh-TW/config/README.md')
-rw-r--r-- | docs/zh-TW/config/README.md | 102 |
1 files changed, 83 insertions, 19 deletions
diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index 8531b1ff7..1ea51feae 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -49,9 +49,9 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ### 術語 -**模組 (Module)**: 提示字元中的一個元件,基於你的作業系統提供的背景資訊來提供訊息。 For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project. +**模組 (Module)**: 提示字元中的一個元件,基於你的作業系統提供的背景資訊來提供訊息。 舉例來說,如果你現在的資料夾是一個 Node.js 專案,"nodejs" 模組會顯示出現在安裝在你的電腦上的 Node.js 版本。 -**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js. +變數 (**Variable**):模組的子元件,主要是由模組提供的訊息。 舉例來說,在 "nodejs" 模組中提供的 "version" 變數代表著當下使用的 Node.js 版本。 By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. @@ -256,7 +256,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | `region_aliases` | | 除了AWS名稱外,顯示區域別名表 | | `style` | `"bold yellow"` | 這個模組的風格。 | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | -| `disabled` | `false` | Disables the `AWS` module. | +| `disabled` | `false` | 停用 `AWS` 模組。 | ### Variables @@ -389,7 +389,17 @@ discharging_symbol = 💦 By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). -::: warning `error_symbol` is not supported on elvish shell. ::: +::: warning + +`error_symbol` is not supported on elvish shell. + +::: + +::: warning + +`vicmd_symbol` is only supported in fish and zsh. + +::: ### 選項 @@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the - `Directory.Build.props` - `Directory.Build.targets` - `Packages.props` -- `*.sln` - `*.csproj` - `*.fsproj` - `*.xproj` @@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft. | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `".NET "` | 在顯示 dotnet 版本之前用的符號。 | | `heuristic` | `true` | 使用更快速的版本偵測法來保持 starship 的速度。 | -| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. | +| `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"` | 這個模組的風格。 | @@ -2165,6 +2174,59 @@ python_binary = "python3" detect_extensions = [] ``` +```toml +# ~/.config/starship.toml + +[python] +# Display the version of python from inside a local venv. +# +# Note this will only work when the venv is inside the project and it will only +# work in the directory that contains the venv dir but maybe this is ok? +python_binary = ["./venv/bin/python", "python", "python3", "python2"] +``` + +## R + +The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.R` extension. +- The current directory contains a file with the `.Rd` extension. +- The current directory contains a file with the `.Rmd` extension. +- The current directory contains a file with the `.Rproj` extension. +- The current directory contains a file with the `.Rsx` extension. +- The current directory contains a `.Rprofile` file +- The current directory contains a `.Rproj.user` folder + +### 選項 + +| Option | 預設 | 說明 | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"📐"` | A format string representing the symbol of R. | +| `style` | `"blue bold"` | 這個模組的風格。 | +| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | +| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | +| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `disabled` | `false` | Disables the `r` module. | + +### Variables + +| 變數 | 範例 | 說明 | +| ------- | ------------- | ------------------------------------ | +| version | `v4.0.5` | The version of `R` | +| symbol | | Mirrors the value of option `symbol` | +| style | `"blue bold"` | Mirrors the value of option `style` | + +### 範例 + +```toml +# ~/.config/starship.toml + +[rlang] +format = "with [📐 $version](blue bold) " +``` + ## Red By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 這個模組在下列其中一個條件達成時顯示: @@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met: - The current directory contains a directory whose name is in `directories` - The current directory contains a file whose extension is in `extensions` - The `when` command returns 0 +- The current Operating System (std::env::consts::OS) matchs with `os` field if defined. ::: tip @@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including ### 選項 -| Option | 預設 | 說明 | -| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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`. | -| `files` | `[]` | The files that will be searched in the working directory for a match. | -| `directories` | `[]` | The directories that will be searched in the working directory for a match. | -| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | -| `symbol` | `""` | The symbol used before displaying the command output. | -| `style` | `"bold green"` | 這個模組的風格。 | -| `format` | `"[$symbol($output )]($style)"` | The format for the module. | -| `disabled` | `false` | Disables this `custom` module. | +| Option | 預設 | 說明 | +| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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) | +| `說明` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. | +| `files` | `[]` | The files that will be searched in the working directory for a match. | +| `directories` | `[]` | The directories that will be searched in the working directory for a match. | +| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | +| `symbol` | `""` | The symbol used before displaying the command output. | +| `style` | `"bold green"` | 這個模組的風格。 | +| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | +| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | ### Variables |