diff options
Diffstat (limited to 'docs/zh-TW')
-rw-r--r-- | docs/zh-TW/README.md | 14 | ||||
-rw-r--r-- | docs/zh-TW/advanced-config/README.md | 14 | ||||
-rw-r--r-- | docs/zh-TW/config/README.md | 115 | ||||
-rw-r--r-- | docs/zh-TW/faq/README.md | 2 | ||||
-rw-r--r-- | docs/zh-TW/guide/README.md | 2 | ||||
-rw-r--r-- | docs/zh-TW/installing/README.md | 2 |
6 files changed, 137 insertions, 12 deletions
diff --git a/docs/zh-TW/README.md b/docs/zh-TW/README.md index 194c5dbad..2aa0ae603 100644 --- a/docs/zh-TW/README.md +++ b/docs/zh-TW/README.md @@ -25,6 +25,20 @@ metaTitle: "Starship:跨 Shell 提示字元" description: Starship 是適合任何 shell 的最小、極速、高度客製化的提示字元! 顯示你需要的訊息,同時保持順暢與最小化。 有針對 Bash、Fish、ZSH、Ion 、Tcsh、Elvish、Nu、Xonsh、Cmd 與 Powershell 的快速安裝指南。 --- +<script setup> +import { onMounted } from 'vue' + +onMounted(() => { + const urlParams = new URLSearchParams(window.location.search) + if (urlParams.has('uwu') || urlParams.has('kawaii')) { + const img = document.querySelector('.VPHero .VPImage.image-src') + img.classList.add('uwu') + img.src = '/logo-uwu.png' + img.alt = 'Kawaii Starship Logo by @sawaratsuki1004' + } +}) +</script> + <video class="demo-video" muted autoplay loop playsinline> <source src="/demo.webm" type="video/webm"> <source src="/demo.mp4" type="video/mp4"> diff --git a/docs/zh-TW/advanced-config/README.md b/docs/zh-TW/advanced-config/README.md index aa8dbbf27..d53f4cbfc 100644 --- a/docs/zh-TW/advanced-config/README.md +++ b/docs/zh-TW/advanced-config/README.md @@ -84,20 +84,20 @@ enable_transience The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework at v0.4 or higher allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=<value>`: -The \<value\> here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. +The \<value\> here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and the option `prompt_ps1_transient` has a non-empty \<value\>, the prompt specified by `PS1` is erased on leaving the current command line. If \<value\> contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in \<value\> and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. -Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: +Make the following changes to your `~/.blerc` (or in `~/.config/blesh/init.sh`) to customize what gets displayed on the left and on the right: - To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do ```bash -bleopt prompt_ps1_final="$(starship module character)" +bleopt prompt_ps1_final='$(starship module character)' ``` - To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do ```bash -bleopt prompt_rps1_final="$(starship module time)" +bleopt prompt_rps1_final='$(starship module time)' ``` ## Custom pre-prompt and pre-execution Commands in Cmd @@ -266,7 +266,7 @@ Note: Continuation prompts are only available in the following shells: ```toml # ~/.config/starship.toml -# A continuation prompt that displays two filled in arrows +# A continuation prompt that displays two filled-in arrows continuation_prompt = '▶▶ ' ``` @@ -301,6 +301,6 @@ The `none` token overrides all other tokens in a string if it is not part of a ` Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: -- Many terminals disable support for `blink` by default +- Many terminals disable support for `blink` by default. - `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). -- `strikethrough` is not supported by the default macOS Terminal.app +- `strikethrough` is not supported by the default macOS Terminal.app. diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index babed1747..5112c4e25 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -281,6 +281,7 @@ $elixir\ $elm\ $erlang\ $fennel\ +$gleam\ $golang\ $guix_shell\ $haskell\ @@ -324,6 +325,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$nats\ $direnv\ $env_var\ $crystal\ @@ -601,7 +603,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `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 Bun. | +| `symbol` | `'🥟 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -1966,6 +1968,44 @@ Use Windows Starship executable on Windows paths in WSL windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe' ``` +## Gleam + +The `gleam` module shows the currently installed version of [Gleam](https://gleam.run/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `gleam.toml` file +- The current directory contains a file with the `.gleam` extension + +### 選項 + +| 選項 | 預設 | 說明 | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `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 Go. | +| `detect_extensions` | `['gleam']` | Which extensions should trigger this module. | +| `detect_files` | `['gleam.toml']` | Which filenames should trigger this module. | +| `style` | `'bold #FFAFF3'` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `gleam` module. | + +### 變數 + +| 變數 | 範例 | 說明 | +| --------- | -------- | ------------------------------------ | +| version | `v1.0.0` | The version of `gleam` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### 範例 + +```toml +# ~/.config/starship.toml + +[gleam] +format = 'via [⭐ $version](bold red) ' +``` + ## Go The `golang` module shows the currently installed version of [Go](https://golang.org/). By default the module will be shown if any of the following conditions are met: @@ -2444,7 +2484,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co 這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 -When the module is enabled it will always be active, unless any of `detect_extensions`, `detect_files` or `detect_folders` have been set in which case the module will only be active in directories that match those conditions. +When the module is enabled it will always be active, unless any of `detect_env_vars`, `detect_extensions`, `detect_files` or `detect_folders` have been set in which case the module will only be active in directories that match those conditions or one of the environmatal variable has been set. ::: @@ -2466,6 +2506,7 @@ The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | @@ -2768,6 +2809,35 @@ truncation_length = 4 truncation_symbol = '' ``` +## NATS + +The `nats` module shows the name of the current [NATS](https://nats.io) context. + +### 選項 + +| 選項 | 預設 | 說明 | +| ---------- | -------------------------- | ------------------------------------------------------------ | +| `symbol` | `'✉️ '` | The symbol used before the NATS context (defaults to empty). | +| `style` | `'bold purple'` | 這個模組的風格。 | +| `format` | `'[$symbol$name]($style)'` | The format for the module. | +| `disabled` | `false` | Disables the `nats` module. | + +### 變數 + +| 變數 | 範例 | 說明 | +| --------- | ----------- | ------------------------------------ | +| name | `localhost` | The name of the NATS context | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### 範例 + +```toml +[nats] +format = '[$symbol]($style)' +style = 'bold purple' +``` + ## Nim The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). By default the module will be shown if any of the following conditions are met: @@ -2943,6 +3013,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam format = 'via [🐪 $version]($style) ' ``` +## Odin + +The 'odin' module shows the currently installed version of [Odin](https://odin-lang.org/). By default the module will be shown if the current directory contains a `.odin` file. + +### 選項 + +| 選項 | 預設 | 說明 | +| ------------------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `show_commit` | `false` | Shows the commit as part of the version. | +| `symbol` | `'Ø '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold bright-blue'` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `odin` module. | +| `detect_extensions` | `['odin']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | + +### 變數 + +| 變數 | 範例 | 說明 | +| --------- | ------------- | ------------------------------------ | +| version | `dev-2024-03` | The version of `odin` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### 範例 + +```toml +# ~/.config/starship.toml + +[odin] +format = 'via [ ($version )]($style)' +show_commit = true +``` + ## Open Policy Agent The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. @@ -3811,7 +3918,7 @@ format = '$shlvl level(s) down' threshold = 3 ``` -Using `repeat` and `repeat_offset` along with `character` module, one can get prompt like `❯❯❯` where last character is colored appropriately for return status code and preceeding characters are provided by `shlvl`. +Using `repeat` and `repeat_offset` along with `character` module, one can get prompt like `❯❯❯` where last character is colored appropriately for return status code and preceding characters are provided by `shlvl`. ```toml # ~/.config/starship.toml @@ -4241,6 +4348,7 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | `format` | `'[$user]($style) in '` | The format for the module. | | `show_always` | `false` | 總是顯示 `username` 模組。 | | `disabled` | `false` | 停用 `username` 模組。 | +| `aliases` | `{}` | Translate system usernames to something else | ### 變數 @@ -4262,6 +4370,7 @@ style_root = 'black bold' format = 'user: [$user]($style) ' disabled = false show_always = true +aliases = { "corpuser034g" = "matchai" } ``` #### Hide the hostname in remote tmux sessions diff --git a/docs/zh-TW/faq/README.md b/docs/zh-TW/faq/README.md index 6f310f4d2..1e8406176 100644 --- a/docs/zh-TW/faq/README.md +++ b/docs/zh-TW/faq/README.md @@ -123,7 +123,7 @@ sh -c 'rm "$(command -v 'starship')"' ## How do I install Starship without `sudo`? -The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation directory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. diff --git a/docs/zh-TW/guide/README.md b/docs/zh-TW/guide/README.md index 8752dd7ad..f67348413 100644 --- a/docs/zh-TW/guide/README.md +++ b/docs/zh-TW/guide/README.md @@ -431,6 +431,8 @@ eval "$(starship init zsh)" 你可以[成爲一個贊助者](https://github.com/sponsors/starship)來支持這個專案! 你的名字和頭像會在這裏顯示,並且會帶有一個前往你網站的鏈接。 +- Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org) + <p align="center"> <br> <img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon"> diff --git a/docs/zh-TW/installing/README.md b/docs/zh-TW/installing/README.md index 6729e5a1a..83e97fe96 100644 --- a/docs/zh-TW/installing/README.md +++ b/docs/zh-TW/installing/README.md @@ -45,7 +45,7 @@ curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.term emerge app-shells/starship ``` -## [Nix](https://nixos.wiki/wiki/Nix) +## [Nix](https://wiki.nixos.org/wiki/Nix) ### 獲得執行檔 |