From 1d965a9d24509d500954669b4e5fb08e54733411 Mon Sep 17 00:00:00 2001 From: Matan Kushner Date: Mon, 7 Feb 2022 15:53:55 +0100 Subject: [PATCH] docs(i18n): new Crowdin updates (#3460) --- docs/ar-SA/README.md | 8 +- docs/ar-SA/advanced-config/README.md | 34 +- docs/ar-SA/config/README.md | 275 ++++--- docs/ar-SA/faq/README.md | 2 +- docs/ar-SA/guide/README.md | 246 ++++--- docs/ar-SA/migrating-to-0.45.0/README.md | 2 +- docs/ar-SA/presets/README.md | 5 +- docs/ckb-IR/README.md | 8 +- docs/ckb-IR/advanced-config/README.md | 40 +- docs/ckb-IR/config/README.md | 275 ++++--- docs/ckb-IR/faq/README.md | 2 +- docs/ckb-IR/guide/README.md | 248 ++++--- docs/ckb-IR/migrating-to-0.45.0/README.md | 2 +- docs/ckb-IR/presets/README.md | 5 +- docs/de-DE/README.md | 8 +- docs/de-DE/advanced-config/README.md | 78 +- docs/de-DE/config/README.md | 423 ++++++----- docs/de-DE/faq/README.md | 2 +- docs/de-DE/guide/README.md | 254 ++++--- docs/de-DE/migrating-to-0.45.0/README.md | 2 +- docs/de-DE/presets/README.md | 5 +- docs/es-ES/README.md | 8 +- docs/es-ES/advanced-config/README.md | 88 +-- docs/es-ES/config/README.md | 709 ++++++++++-------- docs/es-ES/faq/README.md | 2 +- docs/es-ES/guide/README.md | 254 ++++--- docs/es-ES/migrating-to-0.45.0/README.md | 2 +- docs/es-ES/presets/README.md | 5 +- docs/fr-FR/README.md | 8 +- docs/fr-FR/advanced-config/README.md | 90 +-- docs/fr-FR/config/README.md | 566 +++++++------- docs/fr-FR/faq/README.md | 2 +- docs/fr-FR/guide/README.md | 256 ++++--- docs/fr-FR/migrating-to-0.45.0/README.md | 2 +- docs/fr-FR/presets/README.md | 5 +- docs/id-ID/README.md | 10 +- docs/id-ID/advanced-config/README.md | 70 +- docs/id-ID/config/README.md | 425 ++++++----- docs/id-ID/faq/README.md | 2 +- docs/id-ID/guide/README.md | 288 +++++--- docs/id-ID/migrating-to-0.45.0/README.md | 2 +- docs/id-ID/presets/README.md | 5 +- docs/it-IT/README.md | 8 +- docs/it-IT/advanced-config/README.md | 68 +- docs/it-IT/config/README.md | 305 ++++---- docs/it-IT/faq/README.md | 2 +- docs/it-IT/guide/README.md | 250 ++++--- docs/it-IT/migrating-to-0.45.0/README.md | 2 +- docs/it-IT/presets/README.md | 5 +- docs/ja-JP/README.md | 8 +- docs/ja-JP/advanced-config/README.md | 74 +- docs/ja-JP/config/README.md | 520 +++++++------ docs/ja-JP/faq/README.md | 2 +- docs/ja-JP/guide/README.md | 246 ++++--- docs/ja-JP/migrating-to-0.45.0/README.md | 2 +- docs/ja-JP/presets/README.md | 5 +- docs/ko-KR/README.md | 40 +- docs/ko-KR/advanced-config/README.md | 34 +- docs/ko-KR/config/README.md | 269 ++++--- docs/ko-KR/faq/README.md | 2 +- docs/ko-KR/guide/README.md | 264 ++++--- docs/ko-KR/installing/README.md | 4 +- docs/ko-KR/migrating-to-0.45.0/README.md | 2 +- docs/ko-KR/presets/README.md | 7 +- docs/nl-NL/README.md | 6 +- docs/nl-NL/advanced-config/README.md | 34 +- docs/nl-NL/config/README.md | 269 ++++--- docs/nl-NL/faq/README.md | 2 +- docs/nl-NL/guide/README.md | 246 ++++--- docs/nl-NL/migrating-to-0.45.0/README.md | 2 +- docs/nl-NL/presets/README.md | 5 +- docs/pl-PL/README.md | 6 +- docs/pl-PL/advanced-config/README.md | 34 +- docs/pl-PL/config/README.md | 291 +++++--- docs/pl-PL/faq/README.md | 2 +- docs/pl-PL/guide/README.md | 246 ++++--- docs/pl-PL/migrating-to-0.45.0/README.md | 2 +- docs/pl-PL/presets/README.md | 5 +- docs/pt-BR/README.md | 10 +- docs/pt-BR/advanced-config/README.md | 122 +-- docs/pt-BR/config/README.md | 855 ++++++++++++---------- docs/pt-BR/faq/README.md | 4 +- docs/pt-BR/guide/README.md | 256 ++++--- docs/pt-BR/migrating-to-0.45.0/README.md | 2 +- docs/pt-BR/presets/README.md | 5 +- docs/pt-PT/README.md | 6 +- docs/pt-PT/advanced-config/README.md | 34 +- docs/pt-PT/config/README.md | 269 ++++--- docs/pt-PT/faq/README.md | 2 +- docs/pt-PT/guide/README.md | 246 ++++--- docs/pt-PT/migrating-to-0.45.0/README.md | 2 +- docs/pt-PT/presets/README.md | 5 +- docs/ru-RU/README.md | 18 +- docs/ru-RU/advanced-config/README.md | 64 +- docs/ru-RU/config/README.md | 439 ++++++----- docs/ru-RU/faq/README.md | 2 +- docs/ru-RU/guide/README.md | 248 ++++--- docs/ru-RU/installing/README.md | 4 +- docs/ru-RU/migrating-to-0.45.0/README.md | 2 +- docs/ru-RU/presets/README.md | 5 +- docs/tr-TR/README.md | 6 +- docs/tr-TR/advanced-config/README.md | 47 +- docs/tr-TR/config/README.md | 269 ++++--- docs/tr-TR/faq/README.md | 2 +- docs/tr-TR/guide/README.md | 246 ++++--- docs/tr-TR/migrating-to-0.45.0/README.md | 2 +- docs/tr-TR/presets/README.md | 5 +- docs/vi-VN/README.md | 8 +- docs/vi-VN/advanced-config/README.md | 66 +- docs/vi-VN/config/README.md | 439 ++++++----- docs/vi-VN/faq/README.md | 2 +- docs/vi-VN/guide/README.md | 254 ++++--- docs/vi-VN/migrating-to-0.45.0/README.md | 2 +- docs/vi-VN/presets/README.md | 5 +- docs/zh-CN/README.md | 12 +- docs/zh-CN/advanced-config/README.md | 78 +- docs/zh-CN/config/README.md | 379 ++++++---- docs/zh-CN/faq/README.md | 2 +- docs/zh-CN/guide/README.md | 264 ++++--- docs/zh-CN/migrating-to-0.45.0/README.md | 2 +- docs/zh-CN/presets/README.md | 5 +- docs/zh-TW/README.md | 8 +- docs/zh-TW/advanced-config/README.md | 66 +- docs/zh-TW/config/README.md | 357 +++++---- docs/zh-TW/faq/README.md | 2 +- docs/zh-TW/guide/README.md | 246 ++++--- docs/zh-TW/migrating-to-0.45.0/README.md | 2 +- docs/zh-TW/presets/README.md | 5 +- 128 files changed, 7869 insertions(+), 5504 deletions(-) diff --git a/docs/ar-SA/README.md b/docs/ar-SA/README.md index e3cfcb8a..7ff91261 100644 --- a/docs/ar-SA/README.md +++ b/docs/ar-SA/README.md @@ -119,7 +119,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Elvish - ::: warning Only elvish v0.17 or higher is supported. ::: + ::: تحذير يدعم فقط elvish v0.17 أو أعلى. ::: أضف ما يلي إلى نهاية `~/.elvish/rc.elv`: @@ -147,9 +147,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/ar-SA/advanced-config/README.md b/docs/ar-SA/advanced-config/README.md index a2925308..9ba38747 100644 --- a/docs/ar-SA/advanced-config/README.md +++ b/docs/ar-SA/advanced-config/README.md @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### مثال @@ -178,15 +180,15 @@ continuation_prompt = "▶▶" Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. @@ -194,8 +196,8 @@ The `none` token overrides all other tokens in a string if it is not part of a ` A color specifier can be one of the following: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/ar-SA/config/README.md b/docs/ar-SA/config/README.md index 60c431a0..70b98c1a 100644 --- a/docs/ar-SA/config/README.md +++ b/docs/ar-SA/config/README.md @@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la add_newline = true # Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" # Disable the package module, hiding it from the prompt completely [package] @@ -75,7 +75,7 @@ Format strings are the format that a module prints all its variables with. Most A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. -For example: +على سبيل المثال: - `$version` is a format string with a variable named `version`. - `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. @@ -89,7 +89,7 @@ The first part, which is enclosed in a `[]`, is a [format string](#format-string In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. -For example: +على سبيل المثال: - `[on](red bold)` will print a string `on` with bold text colored red. - `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. @@ -112,7 +112,7 @@ Note that what styling looks like will be controlled by your terminal emulator. A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. -For example: +على سبيل المثال: - `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. - `(some text)` will always show nothing since there are no variables wrapped in the braces. @@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | - ### مثال ```toml @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | 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 +*: This variable can only be used as a part of a style string ### Examples @@ -411,17 +412,16 @@ The `display` option is an array of the following table. #### مثال ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 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 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 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 +*: This variable can only be used as a part of a style string ## Command Duration @@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Options -| 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. | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `cmd_duration` module. | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| 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. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### مثال @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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 +*: This variable can only be used as a part of a style string ### مثال @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Options + +| Option | الافتراضي | الوصف | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | The style for the module. | +| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| Variable | مثال | الوصف | +| --------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| 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 + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 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 +*: This variable can only be used as a part of a style string ### مثال @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 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 +*: This variable can only be used as a part of a style string ### مثال @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Options @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### مثال @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | 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 +*: This variable can only be used as a part of a style string ### مثال @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### مثال ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2905,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### مثال ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | 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 +*: This variable can only be used as a part of a style string ### مثال @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | 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 +*: This variable can only be used as a part of a style string ### مثال @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### مثال @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 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 +*: This variable can only be used as a part of a style string ### مثال @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Mirrors the value of option `symbol` | | style\* | `black bold dimmed` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### مثال @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | 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 +*: This variable can only be used as a part of a style string ### مثال @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 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 +*: This variable can only be used as a part of a style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/ar-SA/faq/README.md b/docs/ar-SA/faq/README.md index 99dd6bcc..89ffc1ac 100644 --- a/docs/ar-SA/faq/README.md +++ b/docs/ar-SA/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## I see symbols I don't understand or expect, what do they mean? diff --git a/docs/ar-SA/guide/README.md b/docs/ar-SA/guide/README.md index 243fcfca..95c9d896 100644 --- a/docs/ar-SA/guide/README.md +++ b/docs/ar-SA/guide/README.md @@ -169,159 +169,227 @@ - تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك (على سبيل المثال، جرب [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### البدء مع Starship +### Step 1. Install Starship -**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/). +Select your operating system from the list below to view installation instructions: -1. تثبيت **starship**: +
+Android +Install Starship using any of the following package managers: - #### تثبيت أحدث إصدار +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### From prebuilt binary, with Shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - لتحديث Starship نفسه، أعد تشغيل البرنامج النصي أعلاه. سيتم استبدال الإصدار الحالي بدون لمس تكوين Starship. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **ملاحظة** - يمكن تجاوز الإعدادات الافتراضية لنص التثبيت لرؤية المساعدة المدمجة. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### التثبيت عبر مدير الحزم +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### بإستخدام [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### بإستخدام [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. أضف ما يلي إلى ملف تكوين موجه الأوامر الخاص بك: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- أضف ما يلي إلى نهاية `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - أضف ما يلي إلى نهاية `~/.config/fish/config.fish`: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +أضف ما يلي إلى نهاية `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- أضف ما يلي إلى نهاية `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. +أضف ما يلي إلى نهاية `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- أضف ما يلي إلى نهاية `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +أضف ما يلي إلى نهاية `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. أضف ما يلي إلى نهاية `~/.elvish/rc.elv`: +أضف ما يلي إلى نهاية `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - أضف ما يلي إلى نهاية `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - أضف ما يلي إلى نهاية `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +أضف ما يلي إلى نهاية `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +أضف ما يلي إلى نهاية `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. فقط إصدار nu v0.33 أو أعلى مدعوم. Add the following to your nu config file. يمكنك التحقق من موقع هذا الملف عن طريق تشغيل `config path` في nu. +أضف ما يلي إلى نهاية `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 المساهمة @@ -335,11 +403,11 @@ يرجى التحقق من هذه الأعمال السابقة التي ساعدت على إنشاء starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/ar-SA/migrating-to-0.45.0/README.md b/docs/ar-SA/migrating-to-0.45.0/README.md index 95a847bf..18661c3b 100644 --- a/docs/ar-SA/migrating-to-0.45.0/README.md +++ b/docs/ar-SA/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur 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. +_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. #### Command Duration diff --git a/docs/ar-SA/presets/README.md b/docs/ar-SA/presets/README.md index 23a2ec8a..0c20f57c 100644 --- a/docs/ar-SA/presets/README.md +++ b/docs/ar-SA/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/ckb-IR/README.md b/docs/ckb-IR/README.md index c5300f8b..7851a1c6 100644 --- a/docs/ckb-IR/README.md +++ b/docs/ckb-IR/README.md @@ -119,7 +119,7 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب #### Elvish - ::: warning Only elvish v0.17 or higher is supported. ::: + ::: ئاگادارکردنەوە تەنها elvish v0.17 یان بەرزتر پشتگیری کراوە. ::: ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`: @@ -147,9 +147,9 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/ckb-IR/advanced-config/README.md b/docs/ckb-IR/advanced-config/README.md index 84f3de2e..7c9474d7 100644 --- a/docs/ckb-IR/advanced-config/README.md +++ b/docs/ckb-IR/advanced-config/README.md @@ -32,9 +32,9 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## فرمانە کڕیاڕخوازەکانی pre-prompt و pre-execution لە Bashـدا -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: +بەپێچەوانەی شێلەکانی دیکە Bash هیچ چوارچێوەیەکی فەرمی preexec/precmdـی نییە. لەبەر ئەوە، دابین کردنی قولابە تەواو کڕیارخوازکراوەکان ئاسان نییە لە `Bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: - To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### نموونە @@ -178,24 +180,24 @@ continuation_prompt = "▶▶" Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `تۆخ` +- `لار` +- `بنهێڵ` +- `کاڵ کراو` +- `پێچەوانە کراو` +- `bg:` +- `fg:` +- `` +- `هیچ` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +کە `` دیاریکەری ڕەنگێکە (لە ژێرەوە باسکراوە). `fg:` و `` لە ئێستادا هەمان شت ئەکەن، بەڵام ئەمە ڕەنگە لە داهاتووا بگۆڕێت. `inverted` ڕەنگی پاشبنەما و پێشبنەما ئەگۆڕێتەوە. ڕیزبەندی ووشەکان لە زنجیرەکەدا گرنگ نییە. The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. A color specifier can be one of the following: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/ckb-IR/config/README.md b/docs/ckb-IR/config/README.md index 2444e103..6b460344 100644 --- a/docs/ckb-IR/config/README.md +++ b/docs/ckb-IR/config/README.md @@ -13,8 +13,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml add_newline = true # Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" # Disable the package module, hiding it from the prompt completely [package] @@ -75,7 +75,7 @@ Format strings are the format that a module prints all its variables with. Most A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. -For example: +بۆ نموونە: - `$version` is a format string with a variable named `version`. - `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. @@ -89,7 +89,7 @@ The first part, which is enclosed in a `[]`, is a [format string](#format-string In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. -For example: +بۆ نموونە: - `[on](red bold)` will print a string `on` with bold text colored red. - `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. @@ -112,7 +112,7 @@ Note that what styling looks like will be controlled by your terminal emulator. A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. -For example: +بۆ نموونە: - `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. - `(some text)` will always show nothing since there are no variables wrapped in the braces. @@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | - ### نموونە ```toml @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | 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 +*: This variable can only be used as a part of a style string ### Examples @@ -411,17 +412,16 @@ The `display` option is an array of the following table. #### نموونە ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 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 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 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 +*: This variable can only be used as a part of a style string ## Command Duration @@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Options -| Option | Default | Description | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | -| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `cmd_duration` module. | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Option | Default | Description | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### نموونە @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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 +*: This variable can only be used as a part of a style string ### نموونە @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | The style for the module. | +| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| گۆڕاو | نموونە | Description | +| --------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| 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 + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 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 +*: This variable can only be used as a part of a style string ### نموونە @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 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 +*: This variable can only be used as a part of a style string ### نموونە @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Options @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### نموونە @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | 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 +*: This variable can only be used as a part of a style string ### نموونە @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### نموونە ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2905,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### نموونە ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | 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 +*: This variable can only be used as a part of a style string ### نموونە @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | 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 +*: This variable can only be used as a part of a style string ### نموونە @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### نموونە @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 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 +*: This variable can only be used as a part of a style string ### نموونە @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Mirrors the value of option `symbol` | | style\* | `black bold dimmed` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### نموونە @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | 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 +*: This variable can only be used as a part of a style string ### نموونە @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 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 +*: This variable can only be used as a part of a style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/ckb-IR/faq/README.md b/docs/ckb-IR/faq/README.md index 3c0b411f..0be4a083 100644 --- a/docs/ckb-IR/faq/README.md +++ b/docs/ckb-IR/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## I see symbols I don't understand or expect, what do they mean? diff --git a/docs/ckb-IR/guide/README.md b/docs/ckb-IR/guide/README.md index d32245c9..edac8830 100644 --- a/docs/ckb-IR/guide/README.md +++ b/docs/ckb-IR/guide/README.md @@ -99,7 +99,7 @@ >Português do Brasil   +

Android +Install Starship using any of the following package managers: - #### کۆتا وەشان دابمەزرێنە +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | + - ##### لە باینەرییە پێشوەخت دروستکراوەکانەوە، لەگەڵ شێڵی: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - بۆ نوێکردنەوەی Starship خۆی، نووسینەکەی سەرەوە ڕەن بکەوە. وەشانی ئێستا دەگۆڕێت بێ ئەوەی دەسکاری ڕێکخستنەکانی Starship بکات. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **تێبینی** - بنەڕەتییەکانی سکریپتی دامەزراندن ئەتوانرێ بگۆڕدرێ سەیری یارمەتی نێوخۆیی بکە. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### دابمەزرێنە لەڕێگەی بەڕێوبەری گورزەوە +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### لەگەڵ [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### لەگەڵ [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. نوسینی init زیادبکە بۆ فایلی ڕێکخستنی شێڵەکەت: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/fish/config.fish`: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - ئەمەی خوارەوە زیادبکە لە کۆتایی `Microsoft.PowerShell_profile.ps1`. ئەتوانی شوێنی ئەم فایلە ببینیتەوە بە سەیرکردنی گۆڕاوی `$PROFILE` لە PowerShell. ئاسایی ڕێڕەوەکە بریتیە لە `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` یان `/.config/powershell/Microsoft.PowerShell_profile.ps1` لەسەر -Nix. +ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`: +ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - ئەمەی دێت زیادبکە بۆ کۆتایی پەڕگەی `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +ئەمەی دێت زیادبکە بۆ کۆتایی پەڕگەی `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. تەنها وەشانی v0.33 یان بەرزتری nu پشتگیریکراوە. Add the following to your nu config file. ئەتوانی شوێنی ئەم پەڕگەیە بپشکنی بە جێبەجێکردنی `config path` لە nu دا. +ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 بەژداریکردن @@ -331,11 +399,11 @@ تکایە ئەم کارە کۆنانە سەیربکەوە کە ئیلهامی دروستکردنی starship دا. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - یەکێ لە promptـەکانی ZSH بۆ ئاسمانەوانان. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - ڕووکاری robbyrussellـی شێڵ نەناس کە بە جاڤاسکریپت نووسراوە. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - یەکێ لە promptـە شێڵ نەناسە دڵخوازکراوەکان کە لە powerline دەچێ لەگەڵ ئایکۆندا. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/ckb-IR/migrating-to-0.45.0/README.md b/docs/ckb-IR/migrating-to-0.45.0/README.md index 95a847bf..18661c3b 100644 --- a/docs/ckb-IR/migrating-to-0.45.0/README.md +++ b/docs/ckb-IR/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur 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. +_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. #### Command Duration diff --git a/docs/ckb-IR/presets/README.md b/docs/ckb-IR/presets/README.md index a74be0b8..35fb1255 100644 --- a/docs/ckb-IR/presets/README.md +++ b/docs/ckb-IR/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/de-DE/README.md b/docs/de-DE/README.md index afc3d4b6..da4fe6d6 100644 --- a/docs/de-DE/README.md +++ b/docs/de-DE/README.md @@ -119,7 +119,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P #### Elvish - ::: warning Only elvish v0.17 or higher is supported. ::: + ::: warning Nur elvish v0.17 oder höher ist unterstützt. ::: Trage folgendes am Ende von `~/.config/fish/rc.elv` ein: @@ -147,9 +147,9 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/de-DE/advanced-config/README.md b/docs/de-DE/advanced-config/README.md index 6d9c68fe..383924ca 100644 --- a/docs/de-DE/advanced-config/README.md +++ b/docs/de-DE/advanced-config/README.md @@ -32,11 +32,11 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## Benutzerdefinierte Pre-Prompt- und Pre-Execution-Befehle in der Bash -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Starship bietet daher die begrenzte Möglichkeit, eigene Funktionen in das prompt rendering Verfahren einzufügen: +Die Bash Shell hat, im Gegensatz zu vielen anderen Shells, kein konventionelles preexec/precmd Framework. Daher gestaltet es sich schwierig, vollständig anpassbare Hooks für `bash` anzubieten. Starship bietet daher die begrenzte Möglichkeit, eigene Funktionen in das prompt rendering Verfahren einzufügen: -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- Um eine benutzerdefinierte Funktion kurz vor Anzeige der Eingabeaufforderung auszuführen, definiere eine neue Funktion und weise den Namen `starship_precmd_user_func` zu. Um beispielsweise eine Rakete anzuzeigen, bevor die Eingabeaufforderung erscheint, würde man folgendes tun ```bash function blastoff(){ @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- Um eine benutzerdefinierte Funktion direkt vor der Ausführung eines Befehls auszulösen, kann man den [`DEBUG` trap](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/) Mechanismus verwenden. Allerdings **muss** das DEBUG Signal _vor_ der Initialisierung von Starship getrapped werden! Starship kann den Wert der DEBUG-trap speichern. Wenn der Wert der DEBUG-trap überschrieben wird nachdem Starship gestartet ist kann es zu Fehlern im Bezug auf die verwendete DEBUG-trap kommen. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -67,27 +69,27 @@ function Invoke-Starship-PreCommand { } ``` -## Change Window Title +## Fenstertitel anpassen -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish ist standardmäßig so konfiguriert. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. -First, define a window title change function (identical in bash and zsh): +Zuerst wird eine Funktion definiert um den Fenstertitel zu ändern ( für bash und zsh ist die Funktion identisch): ```bash function set_win_title(){ - echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" + echo -ne "\033]0; DEIN_FENSTERTITEL_HIER \007" } ``` -You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). +Sie können Variablen verwenden, um diesen Titel anzupassen (`$USER`, `$HOSTNAME`, `$PWD`). -In `bash`, set this function to be the precmd starship function: +Für `bash` muss die Funktion als "precmd starship"-Funktion gesetzt werden: ```bash starship_precmd_user_func="set_win_title" ``` -In `zsh`, add this to the `precmd_functions` array: +Füge dies in `Zsh` zum `precmd_functions`-Array hinzu: ```bash precmd_functions+=(set_win_title) @@ -95,7 +97,7 @@ precmd_functions+=(set_win_title) If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. -For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: +Zum Beispiel, wenn sie ihr aktuelles Verzeichnis als Terminal Title anzeigen wollen, fügen Sie folgenden Code-Schnipsel zu ihrer `~/.bashrc` oder `~/.zshrc` hinzu: ```bash function set_win_title(){ @@ -151,51 +153,51 @@ Produces a prompt like the following: ▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s ``` -## Continuation Prompt +## Fortsetzungsprompt -Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote). +Einige Shells unterstützen einen speziellen Fortsetzungsprompt zusätzlich zum normalen Prompt. Dieser Prompt wird anstelle des normalen Prompts ausgegeben, wenn der Benutzer ein unvollständiges Kommando eingegeben hat (etwa wie eine einzelne linke Klammer oder ein einzelnes Anführungszeichen). -Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `"[∙](bright-black) "`. +Starship kann das Aussehen des Fortsetzungs-Prompts mit der `continuation_prompt` Option einstellen. The default prompt is `"[∙](bright-black) "`. -Note: `continuation_prompt` should be set to a literal string without any variables. +Hinweis: Die `continuation_prompt` Anweisung sollte auf einen literalen String ohne Variablen gesetzt werden. -Note: Continuation prompts are only available in the following shells: +Hinweis: Fortsetzungs-Prompts sind nur für folgende Shells verfügbar: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Beispiel ```toml # ~/.config/starship.toml -# A continuation prompt that displays two filled in arrows +# Ein Fortsetzungs-Prompt der 2 ausgefüllte Pfeile darstellt continuation_prompt = "▶▶" ``` ## Style-Strings -Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: +Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben keine Groß- und Kleinschreibung (z.B. `bold` und `BoLd` werden als dieselbe Zeichenkette betrachtet). Jedes Wort kann eines der folgenden sein: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `invertiert` +- `bg:` +- `fg:` +- `` +- `none` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +wobei `` eine Farbspezifikation ist (siehe unten). `fg:` und `` tun derzeit dasselbe, das kann sich in Zukunft aber ändern. `inverted` tauscht Hinter- und Vordergrundfarben. Die Reihenfolge der Wörter in der Liste spielt keine Rolle. -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +`none` überschreibt alle anderen Tokens in einem String wenn es nicht ein Teil einer `bg:` Zeichenkette ist, so dass z.B. über die Zeichenkette `fg:red none fg:blue` kein Styling mehr anzeigt wird. `bg:none` setzt den Hintergrund auf die Standardfarbe, so `fg:red bg:none` entspricht `rot` oder `fg:red` und `bg:green fg:red bg:none` entspricht auch `fg:red` oder `rot`. In der Zukunft könnte die Unterstützung von `none` in Verbindung mit anderen Tokens fallen gelassen werden. -A color specifier can be one of the following: +Eine Farbspezifikation kann wie folgt aussehen: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- Eine `#` gefolgt von einer sechsstelligen Hexadezimalnummer. Dies ergibt einen [RGB hex Farbcode](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- Eine Zahl zwischen 0-255. Dies ergibt einen [8-bit ANSI-Farbcode](https://i.stack.imgur.com/KTSQa.png). -If multiple colors are specified for foreground/background, the last one in the string will take priority. +Wenn mehrere Farben für Vordergrund oder Hintergrund angegeben werden, hat die letzte Farbe der Zeichenkette Priorität. diff --git a/docs/de-DE/config/README.md b/docs/de-DE/config/README.md index ca2d0c12..e9ceeada 100644 --- a/docs/de-DE/config/README.md +++ b/docs/de-DE/config/README.md @@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Die gesamte Konfiguration von Starship erfolgt in dieser [TOML](https://github.com/toml-lang/toml)-Datei: ```toml -# Füge eine Leerzeile zwischen den Eingabeaufforderungen ein +# Inserts a blank line between shell prompts add_newline = true -# Ersetze das "❯" Symbol der Eingabeaufforderung mit "➜" -[character] # Der Name des Moduls, welches wir konfigurieren ist "character" -success_symbol = "[➜](bold green)" # Das "succes_symbol" Segment wird zu "➜" eingestellt und ist "bold green" (fettgedrucktes grün) gefärbt +# Replace the "❯" symbol in the prompt with "➜" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" -# Deaktiviere das "package" Modul, damit es aus der Eingabeaufforderung komplett verschwindet +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` @@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### Protokollierung -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +Standardmäßig protokolliert Starship Warnungen und Fehler in einer Datei names `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, wobei der session key zu der Instanz deines Terminals korrespondiert. Das kann jedoch durch die Nutzung der `STARSHIP_CACHE` Umgebungsvariable verändert werden: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### Terminologie -**Module**: A component in the prompt giving information based on contextual information from your OS. 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**: Eine Komponente in der Konsole, die auf kontextualisierte Informationen des OS basiert. Beispielsweise zeigt das "nodejs" Module die Version von Node.js, welches derzeitig auf deinem Computer installiert ist, an, falls dein derzeitiger Ordner ein Node.js Projekt ist. -**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**: Eine kleinere Unterkomponente, welche Information des Moduls enthält. Zum Beispiel enthält die Variable "version" im Modul "nodejs" die aktuelle Version von 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. +Die meisten Module haben einen Präfix der standardmäßigen terminal-Farbe (z.B. `via` in "nodejs") und ein Leerzeichen als Suffix. ### Formatierte Strings -Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. +Formatierte Strings sind das Format, mit dem ein Modul all seine Variablen ausgibt. Die meisten Module haben den Eintrag `format`, welcher das anzeige-Format des Moduls konfiguriert. Du kannst Texte, Variablen und Textgruppen in einem formatierten string benutzen. #### Variable -A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. +Eine Variable besteht aus dem `$` Symbol und dem Namen der Variable. The name of a variable can only contain letters, numbers and `_`. -For example: +Hier sind ein paar Beispiele: - `$version` ist ein formatierter string mit dem Namen `version`. - `$git_branch$git_commit` ist ein formatierter string mit zwei Variablen, nämlich `git_branch` und `git_commit`. @@ -83,13 +83,13 @@ For example: #### Textgruppe -A text group is made up of two different parts. +Eine Textgruppe besteht aus zwei verschiedenen Teilen. -The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. +Der erste Teil, welcher innerhalb eckiger Klammern `[]` ist, ist ein [formatierter string](#format-strings). Du kannst ihm Texte, Variablen oder sogar verschachtelte Textgruppen hinzufügen. -In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. +Der zweite Teil ist innerhalb normaler Klammern `()` und ist ein[style string](#style-strings). Dies kann verwendet werden, um den ersten Teil zu gestalten. -For example: +Hier sind ein paar Beispiele: - `[on](red bold)` wird einen string `on` mit fettgedrucktem roten Text ausgeben. - `[⌘ $version](bold green)` wird ein Symbol `⌘` gefolgt von dem Inhalt der Variable `version` mit fettgedrucktem grünen Text ausgeben. @@ -97,7 +97,7 @@ For example: #### Style-Strings -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +Die meisten Module in Starship lassen dich den Darstellungsstil verändern. Dies passiert meistens an einem bestimmten Eintrag (gewöhnlich `style` genannt), der einen String mit den Einstellungen darstellt. Es folgen ein paar Beispiele für solche Strings zusammen mit Beschreibungen was sie bewirken. Details zur vollen Syntax findest du im [Erweiterten Konfigurationshandbuch](/advanced-config/). - `"fg:green bg:blue"` setzt grünen Text auf einem blauen Hintergrund - `"bg:blue fg:bright-green"` setzt hell-grünen Text auf einen blauen Hintergrund @@ -106,13 +106,13 @@ Most modules in starship allow you to configure their display styles. This is do - `"bold italic fg:purple"` setzt lilane fett-kursive Schrift - `""` deaktiviert explizit jeden Stil -Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. +Wie genau sich diese Konfiguration auswirkt liegt an deinem Terminal-Emulator. Einige Emulatoren zum Beispiel werden die Farben erhellen statt Text dick zu machen, und ein paar Farbthemen benutzen dieselben Werte für normale und helle Farben. Für kursiven Text muss dein Terminal Kursivschrift unterstützen. #### Bedingte Formatierung -A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. +Ein Formatierungszeichenkette (string) in `(` and `)` eingeklammert wird nicht ausgewertet wenn alle darin benutzten Variablen leer oder undefiniert sind. -For example: +Hier sind ein paar Beispiele: - `(@$region)` ist die Variable `region` undefiniert (`None`) oder eine leere Zeichenkette (`""`) dann wird nichts angezeigt, ansonsten <0>@ gefolgt von dem Inhalt der Variablen. - `(some text)` zeigt nichts an, weil der Text in Klammern keine Variablen enthält. @@ -120,11 +120,11 @@ For example: #### Spezielle Zeichen -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. +Die folgenden Zeichen habe eine spezielle Bedeutung in Formatstrings und müssen durch einen vorangestellten Backslash '\' besonders markiert werden (escaped): `$ \ [ ] ( )`. -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). +Wichtig: TOML hat sowohl Basis-Zeichenketten (basic strings, eingeschlossen in " ") und literale Zeichenketten (literal strings, eingeschlossenin ' '). Empfehlung ist nur literale Zeichenketten (in ' ') in der Konfigurationsdatei zu verwenden. Wenn man Basis-Zeichenketten (in " ") verwenden will, dann muss man den Backslash mit einem Backslash markieren (d.h. '\\' verwenden). -For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: +Die folgenden Bespiele für eine Formatierungszeichenkette sind gleich, wenn man ein `$` Symbol in einer neuen Zeile ausgeben will: ```toml # with basic string @@ -143,7 +143,7 @@ format = ''' ## Prompt -This is the list of prompt-wide configuration options. +Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen. ### Optionen @@ -155,28 +155,27 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Maximale Zeit für von Starship ausgeführte Kommandos. | | `add_newline` | `true` | Fügt leere Zeilen zwischen Shell Prompts ein. | - ### Beispiel ```toml # ~/.config/starship.toml -# Use custom format +# Verwende benutzerdefiniertes Format format = """ [┌───────────────────>](bold green) [│](bold green)$directory$rust$package [└─>](bold green) """ -# Wait 10 milliseconds for starship to check files under the current directory. +# Warte 10 Millisekunden damit Starship die Dateien im aktuellen Ordner überprüfen kann. scan_timeout = 10 -# Disable the blank line at the start of the prompt +# Deaktiviere die Leerzeile am Anfang der Eingabeaufforderung add_newline = false ``` ### Vordefiniertes Aussehen des Prompts -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: +The default `format` is used to define the format of the prompt, if empty or no `format` is provided. Die Standardwerte sind folgende: ```toml format = "$all" @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,12 +256,12 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +Das `aws`-Modul zeigt das aktuelle AWS-Profil an. Dies basiert auf den Umgebungsvariablen: `AWS_REGION`, `AWS_DEFAULT_REGION`, `AWS_PROFILE` und der `~/.aws/config` Datei. This module also shows an expiration timer when using temporary credentials. 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. @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiele @@ -359,7 +360,7 @@ style = "blue bold" ## Akkustand -The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. +Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den aktuellen Ladestatus. Das Modul ist nur sichtbar, wenn der Akku des Geräts unter 10% geladen ist. ### Optionen @@ -387,7 +388,7 @@ discharging_symbol = "💀 " ### Anzeige des Akkustandes -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). Wenn `display` nicht angegeben ist. Die Standardwerte sind folgende: ```toml [[battery.display]] @@ -399,7 +400,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### Optionen -The `display` option is an array of the following table. +Die `display`-Option beinhaltet ein Array mit den folgenden Werten. | Option | Standardwert | Beschreibung | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | @@ -411,24 +412,23 @@ The `display` option is an array of the following table. #### Beispiel ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Zeichen -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +Das `character` Modul zeigt ein Zeichen ( meistens einen Pfeil "❯") vor der Texteingabe an. -The character will tell you whether the last command was successful or not. It can do this in two ways: +Das Zeichen zeigt an ob der letzte Befehl erfolgreich war, oder einen Fehler erzeugt hat. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,37 +552,32 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ## Befehlsdauer -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. +Das `cmd_duration` Modul zeigt an wie lange der letzte Befehl ausgeführt wurde. Das Modul wird nur angezeigt wenn der letzte Befehl länger als zwei Sekunden ausgeführt wurde. Mit der `min_time` Option kann die Zeit eingestellt werden ab der <0>cmd_duration angezeigt wird. -::: warning Do not hook the DEBUG trap in Bash +::: warning Nicht die DEBUG-trap in der Bash hooken -If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. +Ist `bash` die Konsole der Wahl, dann nicht die `DEBUG`-trap nach der Ausführung von `eval $(starship init $0)` hooken, andernfalls **wird** dieses Modul unweigerlich untergehen. ::: -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. +Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras bash_preexec Framework](https://github.com/rcaloras/bash-preexec) verwenden. Definieren Sie einfach die Arrays `preexec_functions` und `precmd_functions` bevor sie `eval $(starship init $0)` ausführen, und fahren Sie dann wie gewohnt fort. ### Optionen -| Option | Standardwert | Beschreibung | -| -------------------- | ----------------------------- | ------------------------------------------------------------------ | -| `min_time` | `2_000` | Schwellwert für kleinste anzuzeigende Laufzeit (in Millisekunden). | -| `show_milliseconds` | `false` | Zeige Millisekunden zusätzlich zu Sekunden. | -| `format` | `"took [$duration]($style) "` | Das Format für das Modul. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `cmd_duration`-Modul. | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Option | Standardwert | Beschreibung | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Schwellwert für kleinste anzuzeigende Laufzeit (in Millisekunden). | +| `show_milliseconds` | `false` | Zeige Millisekunden zusätzlich zu Sekunden. | +| `format` | `"took [$duration]($style) "` | Das Format für das Modul. | +| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `disabled` | `false` | Deaktiviert das `cmd_duration`-Modul. | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -607,9 +602,9 @@ format = "underwent [$duration](bold yellow)" The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. -::: tip +::: Tipp -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Hinweis: Dies unterdrückt nicht conda's eigenen Prompt-Modifikator, sie können jedoch conda mit `conda config --set changeps1 False` konfigurieren, um die Ausgabe von conda selbst auszuschalten. ::: @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Optionen + +| Option | Standardwert | Beschreibung | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | Stil für dieses Modul. | +| `format` | "[$symbol \\[$name\\]]($style) " | Das Format für das Modul. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| Variable | Beispiel | Beschreibung | +| --------- | ------------------- | ------------------------------------- | +| name | `fedora-toolbox:35` | The name of the container | +| symbol | | Spiegelt den Wert der Option `symbol` | +| style\* | | Spiegelt den Wert der Option `style` | + +*: This variable can only be used as a part of a style string + +### Beispiel + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Optionen @@ -759,7 +787,7 @@ format = "via [🦕 $version](green bold) " ## Verzeichnis -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. +Das `directory` -Modul zeigt den Pfad zu Ihrem aktuellen Verzeichnis an, abgeschnitten auf drei übergeordnete Ordner. Your directory will also be truncated to the root of the git repo that you're currently in. 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. @@ -782,7 +810,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |

-This module has a few advanced configuration options that control how the directory is displayed. +Dieses Modul hat einige erweiterte Konfigurationsoptionen, welche die Darstellung von Verzeichnissen steuern. | Advanced Option | Standardwert | Beschreibung | | --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel ```toml - # ~/.config/starship.toml [status] @@ -2845,16 +2905,15 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: tip +::: Tipp -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. ::: @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -2941,7 +2999,7 @@ format = "via [🏎 $version](red bold)" The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. -::: tip +::: Tipp By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -2998,11 +3056,11 @@ format = "[🏎💨 $workspace]($style) " ## Zeit -The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. +Das `time` Modul zeigt die aktuelle **lokale** Zeit an. Der `format` Wert wird von der crate [`chrono`](https://crates.io/crates/chrono) benutzt um die Zeit zu formatieren. Schau dir [die chrono strftime Dokumentation](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) an, um die möglichen Optionen zu sehen. -::: tip +::: Tipp -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. ::: @@ -3018,7 +3076,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `disabled` | `true` | Deaktiviert das `time`-Modul. | | `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Ansonsten ist der Standardwert hierfür `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. ### Variables @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | uhrzeit | `13:08:10` | The current time. | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -3044,14 +3102,14 @@ time_range = "10:00:00-14:00:00" ## Benutzername -The `username` module shows active user's username. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +Das Modul `username` zeigt den Benutzernamen des aktiven Benutzers. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: - Der aktuelle Benutzer ist root - Der aktuelle Benutzer ist nicht derjenige, der derzeit angemeldet ist - Der Benutzer ist über eine SSH-Sitzung verbunden - Die Variale `show_always` ist auf `true` gesetzt -::: tip +::: Tipp SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | `black bold dimmed` | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Spiegelt den Wert der Option `symbol` | | style\* | | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Beispiel @@ -3242,19 +3301,19 @@ These modules will be shown if any of the following conditions are met: - The `when` command returns 0 - The current Operating System (std::env::consts::OS) matchs with `os` field if defined. -::: tip +::: Tipp Multiple custom modules can be defined by using a `.`. ::: -::: tip +::: Tipp The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. ::: -::: tip +::: Tipp [Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there! @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | Spiegelt den Wert der Option `symbol` | | style\* | Spiegelt den Wert der Option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/de-DE/faq/README.md b/docs/de-DE/faq/README.md index 7042bece..bbc841d6 100644 --- a/docs/de-DE/faq/README.md +++ b/docs/de-DE/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## I see symbols I don't understand or expect, what do they mean? diff --git a/docs/de-DE/guide/README.md b/docs/de-DE/guide/README.md index 21439bb1..c0b9d780 100644 --- a/docs/de-DE/guide/README.md +++ b/docs/de-DE/guide/README.md @@ -103,7 +103,7 @@ >Português do Brasil   Русский   Tiếng Việt   +Android +Install Starship using any of the following package managers: - #### Neueste Version installieren +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### Neuster GitHub Release über die Shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - Um Starship selbst zu aktualisieren, lasse das Skript oben nochmal laufen. Es wird die vorhandene Version ersetzen, ohne die Konfiguration von Starship zu berühren. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Hinweis** - Die Standardwerte des Installationsskripts können überschrieben werden, sehen Sie die integrierte Hilfe. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### Installation mithilfe eines Paket-Managers +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### Mit [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### Mit [scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Füge das init-Skript zur Konfigurationsdatei deiner Shell hinzu: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Trage folgendes am Ende der `~/.bashrc` ein: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - Trage folgendes am Ende der `~/.config/fish/config.fish` ein: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Trage folgendes am Ende der `~/.bashrc` ein: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Trage folgendes am Ende der `~/.zshrc` ein: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Füge das folgende zum Ende von `Microsoft.PowerShell_profile.ps1` hinzu. Sie können den Speicherort dieser Datei überprüfen, indem Sie die `$PROFILE` Variable in PowerShell abfragen. Normalerweise ist der Pfad `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oder `~/.config/powershell/Microsoft.PowerShell_profile.ps1` auf -Nix. +Trage folgendes am Ende von `~/.config/fish/rc.elv` ein: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- Trage folgendes am Ende der `~/.config/ion/initrc` ein: +
+Fish - ```sh - # ~/.config/ion/initrc +Trage folgendes am Ende der `~/.config/fish/config.fish` ein: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. Trage folgendes am Ende von `~/.config/fish/rc.elv` ein: +Trage folgendes am Ende der `~/.config/ion/initrc` ein: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - Trage folgendes am Ende von `~/.bashrc` ein: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Füge folgendes an das Ende von `~/.xonshrc` hinzu: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Trage folgendes am Ende von `~/.bashrc` ein: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Füge folgendes an das Ende von `~/.xonshrc` hinzu: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Es wird nur nu Version v0.33 oder höher unterstützt. Add the following to your nu config file. Du kannst den Speicherort dieser Datei überprüfen, indem du `config path` in nu ausführst. +Trage folgendes am Ende der `~/.zshrc` ein: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 Mitwirken @@ -329,17 +397,17 @@ Wir laden Leute **aller Erfahrungsstufen** herzlich ein mitzumachen! Falls du di Wenn du eine andere Sprache flüssig sprichts, würden wir uns sehr freuen wenn du helfen würdest die Dokumentation in anderen Sprachen auf dem aktuellsten Stand zu halten. Hier kannst du bei der Übersetzung helfen [Starship Crowdin](https://translate.starship.rs/). -Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Leitfaden zum Mitwirken](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord-Server](https://discord.gg/8Jzqu3T) vorbei. 👋 +Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord server](https://discord.gg/8Jzqu3T) vorbei. 👋 ## 💭 Inspiriert durch Checkt bitte diese älteren Projekte, die das Entstehen von Starhip inspiriert haben. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Ein ZSH-Prompt für Astronauten. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Ein Shell-übergreifendes und in JavaScript geschriebenes robbyrussell-Theme. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - Shell-übergreifendes, anpassbares und Powerline-ähnliches Prompt mit Symbolen. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/de-DE/migrating-to-0.45.0/README.md b/docs/de-DE/migrating-to-0.45.0/README.md index fda0100b..8e3d8db7 100644 --- a/docs/de-DE/migrating-to-0.45.0/README.md +++ b/docs/de-DE/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur 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. +_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. #### Befehlsdauer diff --git a/docs/de-DE/presets/README.md b/docs/de-DE/presets/README.md index ce6054f0..4dbb1fd1 100644 --- a/docs/de-DE/presets/README.md +++ b/docs/de-DE/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/es-ES/README.md b/docs/es-ES/README.md index 3e532a90..0b966b67 100644 --- a/docs/es-ES/README.md +++ b/docs/es-ES/README.md @@ -119,7 +119,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente #### Elvish - ::: warning Only elvish v0.17 or higher is supported. ::: + ::: advertencia Solo se admite Elvish v0.17 o superior. ::: Añade el siguiente código al final de `~/.elvish/rc.elv`: @@ -147,9 +147,9 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/es-ES/advanced-config/README.md b/docs/es-ES/advanced-config/README.md index 2782fadf..f0a4c3cd 100644 --- a/docs/es-ES/advanced-config/README.md +++ b/docs/es-ES/advanced-config/README.md @@ -32,11 +32,11 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## Comandos pre-prompt y pre-ejecucución personalizados en Bash -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Sin embargo, Starship te da la posibilidad de insertar de forma limitada tus propias funciones en el proceso de renderizado del prompt: +Bash no posee un framework oficial de preexec/precmd como la mayoría de los demás intérpretes de comandos. Debido a esto, es difícil proporcionar "hooks" totalmente personalizables en `Bash`. Sin embargo, Starship te da la posibilidad de insertar de forma limitada tus propias funciones en el proceso de renderizado del prompt: -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- Para ejecutar una función personalizada previa al renderizado del prompt, define una nueva función y asigna su nombre a `starship_precmd_user_func`. Por ejemplo, para dibujar un cohete antes del prompt, se puede realizar así: ```bash function blastoff(){ @@ -45,21 +45,23 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- Para ejecutar una función personalizada antes de que un comando sea ejecutado, es posible usar el [mecanismo de trampa `DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No obstante, ¡**debes** atrapar la señal DEBUG _antes_ de inicializar Starship! Starship puede preservar el valor de la trampa DEBUG, pero si la trampa es reemplazada después de que Starship inicie, alguna funcionalidad fallará. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` -## Custom pre-prompt and pre-execution Commands in PowerShell +## Comandos pre-prompt y pre-ejecución personalizados en PowerShell -PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Sin embargo, Starship te da la posibilidad de insertar de forma limitada tus propias funciones en el proceso de renderizado del prompt: +Powershell no posee un framework oficial de preexec/precmd como la mayoría de los demás intérpretes de comandos. Debido a esto, es difícil proporcionar "hooks" totalmente personalizables en `Powershell`. Sin embargo, Starship te da la posibilidad de insertar de forma limitada tus propias funciones en el proceso de renderizado del prompt: -Create a function named `Invoke-Starship-PreCommand` +Crea una función llamada `Invoke-Starship-PreCommand` ```powershell function Invoke-Starship-PreCommand { @@ -69,33 +71,33 @@ function Invoke-Starship-PreCommand { ## Cambiar título de la ventana -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +Algunos intérpretes de comandos van a cambiar automáticamente el título de la ventana por ti (p. ej., para mostrar tu directorio actual). Fish incluso lo hace por defecto. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. -First, define a window title change function (identical in bash and zsh): +Primero, define una función para el cambio de título de la ventana (idéntico en Bash y zsh): ```bash function set_win_title(){ - echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" + echo -ne "\033]0; TU_TÍTULO_DE_VENTANA_AQUÍ \007" } ``` -You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). +Puedes usar variables para personalizar este título (`$USER`, `$HOSTNAME` y `$PWD` son opciones populares). -In `bash`, set this function to be the precmd starship function: +En `Bash`, establece que esta función sea la función precmd de Starship: ```bash starship_precmd_user_func="set_win_title" ``` -In `zsh`, add this to the `precmd_functions` array: +En `zsh`, añade esto al array `precmd_functions`: ```bash precmd_functions+=(set_win_title) ``` -If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. +Si te gusta el resultado, añade estas líneas a tu archivo de configuración del intérprete de comandos (`~/.bashrc` o `~/.zsrhc`) para hacerlo permanente. -For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: +Por ejemplo, si quieres mostrar tu directorio actual en el título de la pestaña de la terminal, añade el siguiente fragmento a tu `~/.bashrc` o `~/.zshrc`: ```bash function set_win_title(){ @@ -114,7 +116,7 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. +También puede establecer una salida similar con PowerShell creando una función llamada `Invoke-Starship-PreCommand`. ```powershell # edit $PROFILE @@ -125,27 +127,27 @@ function Invoke-Starship-PreCommand { Invoke-Expression (&starship init powershell) ``` -## Enable Right Prompt +## Gabilitar Prompt Derecho -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`. +Algunos intérpretes de órdenes soportan un prompt derecho que se renderiza en la misma línea que la entrada. Starship puede establecer el contenido del prompt correcto usando la opción `right_format`. Cualquier módulo que pueda ser usado en `format` también es soportado en `right_format`. La variable `$all` solo contendrá módulos no utilizados explícitamente en `format` o `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). +Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo fill](/config/#fill). `right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. ### Ejemplo ```toml -# ~/.config/starship.toml +# ~/.config/starship. oml -# A minimal left prompt +# Un prompt izquierdo mínimo format = """$character""" -# move the rest of the prompt to the right +# mueve el resto del mensaje a la derecha right_format = """$all""" ``` -Produces a prompt like the following: +Produce un prompt como el siguiente: ``` ▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Ejemplo @@ -176,26 +178,26 @@ continuation_prompt = "▶▶" ## Cadenas de estilo -Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: +Las cadenas de estilo son una lista de palabras, separadas por espacios en blanco. Las palabras no son sensibles a mayúsculas (es decir, `negrita` y `NeGriTa` se consideran la misma cadena). Cada palabra puede ser una de las siguientes: - - `negrita` - - `cursiva` - - `subrayado` - - `atenuado` - - `invertido` - - `bg:` - - `fg:` - - `` - - `ninguno` +- `negrita` +- `cursiva` +- `subrayado` +- `atenuado` +- `invertido` +- `bg:` +- `fg:` +- `` +- `ninguno` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +donde `` es un especificador de color (discutido a continuación). `fg:` y `` hacen actualmente lo mismo, aunque esto puede cambiar en el futuro. `inverted` cambia el fondo y los colores de primer plano. El orden de las palabras en la cadena no importa. -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +El token `none` anula todos los demás tokens en una cadena si no es parte de un especificador `bg:`, de modo que por ejemplo `fg:red none fg:blue` creará una cadena sin ningún estilo. `bg:none` establece el fondo al color por defecto, así que `fg:red bg:none` es equivalente a `red` o `fg:red` y `bg:green fg:red bg:none` también es equivalente a `fg:red` o `red`. Puede convertirse en un error usar `none` junto con otros tokens en el futuro. -A color specifier can be one of the following: +Un especificador de color puede ser uno de los siguientes: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- Un `#` seguido de un número hexadecimal de seis dígitos. Esto especifica un [código hexadecimal de color RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- Un número entre 0-255. Esto especifica un [Código de color ANSI de 8-bits](https://i.stack.imgur.com/KTSQa.png). -If multiple colors are specified for foreground/background, the last one in the string will take priority. +Si se especifican varios colores para el primer plano/fondo, el último en la cadena tendrá prioridad. diff --git a/docs/es-ES/config/README.md b/docs/es-ES/config/README.md index dbfab79f..90c58c21 100644 --- a/docs/es-ES/config/README.md +++ b/docs/es-ES/config/README.md @@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Toda la configuración de Starship se realiza en este archivo [TOML](https://github.com/toml-lang/toml): ```toml -# Inserta una línea en blanco al inicio del prompt +# Inserts a blank line between shell prompts add_newline = true -# Reemplaza el símbolo "❯" por "➜" en el prompt -[character] # El nombre del módulo que se está configurandoes "character" -success_symbol = "[➜](bold green)" # El segmento "success_symbol" es reemplzado por "➜" con el color "bold green" +# Replace the "❯" symbol in the prompt with "➜" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" -# Deshabilita el módulo "package", ocultándolo por completo del prompt +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` @@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### Registros -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +Starship registra por defecto los mensajes de advertencia y error en un fichero con nombre `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, en el que la clave de sesión corresponde con una instancia de tu terminal. Esto, sin embargo, puede ser cambiado usando la variable de entorno `STARSHIP_CACHE`: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -61,19 +61,19 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### Terminología -**Module**: A component in the prompt giving information based on contextual information from your OS. 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. +**Módulo**: un componente en el promt que provee información basada en información contextual de tu sistema operativo. Por ejemplo, el módulo "nodejs" muestra la versión de NodeJS que tienes actualmente instalada en tu ordenador, si el directorio actual es un proyecto NodeJS. -**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**: subcomponentes más pequeños que contienen información proporcionada por el módulo. Por ejemplo, la variable "version" en el módulo "nodejs" contiene la versión actual de NodeJS. -By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. +Por convención, la mayoría de los módulos tienen un prefijo del color predeterminado de la terminal (por ejemplo, `vía` en "nodejs") y un espacio vacío como sufijo. ### Cadenas de Formato -Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. +Es el formato con el que un módulo imprime todas sus variables. La mayoría de los módulos tienen una entrada llamada `format` que configura el formato de visualización del módulo. Se puede utilizar textos, variables y grupos de texto. #### Variable -A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. +Una variable contiene un símbolo `$` seguido por el nombre de la variable. The name of a variable can only contain letters, numbers and `_`. Por ejemplo: @@ -83,11 +83,11 @@ Por ejemplo: #### Grupo de Texto -A text group is made up of two different parts. +Un grupo de texto se compone de dos partes diferentes. -The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. +La primera parte, que está encerrada en un `[]`, es un [formato de cadena de texto](#format-strings). Se puede agregar textos, variables, o incluso grupos de texto anidados. -In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. +En la segunda parte, que está encerrada en un `()`, es un [formato de cadena de texto](#style-strings). Esto se puede utilizar para diseñar la primera parte. Por ejemplo: @@ -97,7 +97,7 @@ Por ejemplo: #### Cadenas de estilo -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +La mayoría de los módulos de starship permiten configurar los estilos de su cadenas texto. Esto se consigue con una entrada (normalmente llamada `style` - estilo) que no es más que un texto donde se especifica la configuración. A continuación mostramos algunos ejemplos de textos estilados junto con su funcionalidad. Para más detalles sobre la sintaxis completa, consulta [la guía de configuración avanzada](/advanced-config/). - `"fg:green bg:blue"` pone texto verde sobre un fondo azul - `"bg:blue fg:bright-green"` pone texto verde claro sobre un fondo azul @@ -106,11 +106,11 @@ Most modules in starship allow you to configure their display styles. This is do - `"bold italic fg:purple"` pone texto color morado, en negrita y cursiva - `""` desactiva explícitamente cualquier estilo -Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. +Nótese que el estilo es similar a como se controlaría por el emulador de su terminal. Por ejemplo, algunos emuladores de terminal harán los colores más brillantes en lugar de más gruesos, y algunos temas usan los mismos valores para texto normal y colores brillantes. Además, para mostrar textos en cursiva tu terminal debe tener soporte para hacerlo. #### Cadenas de Formato Condicional -A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. +Una cadena de formato condicional envuelto en `(` y `)` no se renderizará si todas las variables dentro están vacías. Por ejemplo: @@ -124,18 +124,18 @@ The following symbols have special usage in a format string and must be escaped: Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). -For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: +Por ejemplo, cuando se desea imprimir un símbolo `$` en una nueva línea, las siguientes configuraciones para el `format` son equivalentes: ```toml -# with basic string +# con cadena básica format = "\n\\$" -# with multiline basic string +# con cadena básica multilínea format = """ \\$""" -# with literal string +# con cadena literal format = ''' \$''' @@ -143,7 +143,7 @@ format = ''' ## Prompt -This is the list of prompt-wide configuration options. +Esta es la lista de opciones de configuración. ### Opciones @@ -155,28 +155,27 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Tiempo de espera para los comandos ejecutados por Starship (en milisegundos). | | `add_newline` | `true` | Inserta un línea en blanco entre las instrucciones del intérprete de comandos. | - ### Ejemplo ```toml # ~/.config/starship.toml -# Use custom format +# Usar formato personalizado format = """ [┌───────────────────>](bold green) [│](bold green)$directory$rust$package [└─>](bold green) """ -# Wait 10 milliseconds for starship to check files under the current directory. +# Espera 10 milisegundos para que starship revise los archivos del directorio actual. scan_timeout = 10 -# Disable the blank line at the start of the prompt +# Deshabilita la línea en blanco al inicio del prompt add_newline = false ``` ### Formato por Defecto del Prompt -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: +El `format` predeterminado se utiliza para definir el formato del prompt, si está vacío o no `format` se proporciona. El valor por defecto es el siguiente: ```toml format = "$all" @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -251,22 +252,22 @@ $shell\ $character""" ``` -If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Ej. +Si solo quieres extender el formato predeterminado, puedes usar `$all`; los módulos que se añaden explícitamente al formato no serán duplicados. Ej. ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +El módulo `aws` muestra la región actual de AWS y el perfil. Éste se basa en las variables de entorno `AWS_REGION`, `AWS_DEFAULT_REGION`, y `AWS_PROFILE` del fichero `~/.aws/config`. Este módulo también muestra un temporizador de caducidad al usar credenciales temporales. -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. +Cuando se utiliza [aws-vault](https://github.com/99designs/aws-vault), el perfil se lee de la variable de entorno `AWS_VAULT` y la fecha de expiración de credenciales se lee de la variable de entorno `AWS_SESSION_EXPIRATION`. -When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. +Cuando uses [awsu](https://github.com/kreuzwerker/awsu) el perfil se obtiene de la variable de entorno `AWSU_PROFILE`. -When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +Cuando se utiliza [AWSume](https://awsu.me), el perfil se lee de la variable de entorno `AWSUME_PROFILE` y la fecha de expiración de credenciales se lee de la variable de entorno `AWSUME_EXPIRATION`. ### Opciones @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplos @@ -359,7 +360,7 @@ style = "blue bold" ## Battery -The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. +El módulo `battery` muestra la cantidad de batería y si está cargando o no. El módulo es solo visible cuando la batería está por debajo del 10%. ### Opciones @@ -387,7 +388,7 @@ discharging_symbol = "💀 " ### Indicador de batería -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown: +La opción de configuración `display` se utiliza para definir cuándo debe mostrarse el indicador de batería (threshold), qué symbol se utilizaría (symbol), y cómo sería (style). Si no se provee ningún valor para `display` El valor por defecto es el siguiente: ```toml [[battery.display]] @@ -395,11 +396,11 @@ threshold = 10 style = "bold red" ``` -The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. +El valor por defecto para las opciones `charging_symbol` y `discharging_symbol` son respectivamente los valores `charging_symbol` y `discharging_symbol` de las opción de `battery`. #### Opciones -The `display` option is an array of the following table. +La opción `display` es un array de la siguiente tabla. | Opción | Por defecto | Descripción | | -------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------- | @@ -411,29 +412,28 @@ The `display` option is an array of the following table. #### Ejemplo ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +El módulo `character` muestra un carater (normalmente una flecha) tras el texto que introduces en el terminal. -The character will tell you whether the last command was successful or not. It can do this in two ways: +El carácter te dirá si el último comando funcionó o no. Se puede hacer de dos maneras: - Cambiando el color (`red`/`green`) - Cambiando la forma (`.`/`✖`) -By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +Por defecto sólo cambia el color. Si también se quiere cambiar su forma, ver [este ejemplo](#with-custom-error-shape). ::: aviso @@ -496,7 +496,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: +El módulo `cmake` muestra la versión actualmente instalada de [CMake](https://cmake.org/). Por defecto el módulo se activará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `CMakeLists.txt` - The current directory contains a `CMakeCache.txt` file @@ -522,11 +522,11 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ## COBOL / GNUCOBOL -The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met: +El módulo `cobol` muestra la versión instalada de COBOL. Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene cualquier archivo que termine en `.cob` o `.COB` - El directorio actual contiene cualquier archivo que termine en `.cbl` o `.CBL` @@ -552,37 +552,32 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ## Tiempo de Ejecución -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. +El módulo `cmd_duration` muestra cuánto tiempo tardó el último comando en ejecutarse. El módulo se mostrará solo si el comando llevó dos segundos o más, o el valor de `min_time`, si existe. -::: warning Do not hook the DEBUG trap in Bash +::: warning No utilizar DEBUG en Bash -If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. +Si estás usando Starship con `bash`, no uses `DEBUG` después de ejecutar `eval $(starship init $0)`, o el módulo **se romperá**. ::: -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. +Los usuarios de bash que necesiten la funcionalidad preexec-like pueden usar el framework rcaloras's bash_preexec. Simplemente define los arrays preexec_functions y precmd_functions antes de ejecutar eval $(starship init $0), y continúa con normalidad. Basta con definir los arrays `preexec_functions` y `precmd_functions` antes de ejecutar `eval $(starship init $0)`, y luego proceder como siempre. ### Opciones -| Opción | Por defecto | Descripción | -| -------------------- | ----------------------------- | ---------------------------------------------------------------------- | -| `min_time` | `2_000` | Duración mínima para mostrar el tiempo de ejecución (en milisegundos) | -| `show_milliseconds` | `false` | Muestra la duración con precisión en milisegundos. | -| `format` | `"took [$duration]($style) "` | El formato del módulo. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `cmd_duration`. | -| `show_notifications` | `false` | Muestra notificaciones de escritorio cuando se complete el comando. | -| `min_time_to_notify` | `45_000` | Duración mínima para mostrar el tiempo de ejecución (en milisegundos). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Opción | Por defecto | Descripción | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Duración mínima para mostrar el tiempo de ejecución (en milisegundos) | +| `show_milliseconds` | `false` | Muestra la duración con precisión en milisegundos. | +| `format` | `"took [$duration]($style) "` | El formato del módulo. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `cmd_duration`. | +| `show_notifications` | `false` | Muestra notificaciones de escritorio cuando se complete el comando. | +| `min_time_to_notify` | `45_000` | Duración mínima para mostrar el tiempo de ejecución (en milisegundos). | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | El tiempo que tardó en ejecutar el comando | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -605,11 +600,11 @@ format = "underwent [$duration](bold yellow)" ## Conda -The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. +El módulo `conda` muestra el entorno actual [Conda](https://docs.conda.io/en/latest/), si `$CONDA_DEFAULT_ENV` está configurado. ::: consejo -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Esto no modifica el propio símbolo de sistema de Conda. En caso de querer suprimirlo, ejecuta `conda config --set changeps1 False`. ::: @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -643,9 +638,41 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Opciones + +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | El estilo del módulo. | +| `format` | "[$symbol \\[$name\\]]($style) " | El formato del módulo. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | ------------------- | -------------------------------------- | +| name | `fedora-toolbox:35` | The name of the container | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | + +*: Esta variable sólo puede ser usada como parte de una cadena de estilo + +### Ejemplo + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal -The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `cristal` muestra la versión instalada de [Crystal](https://crystal-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un fichero `shard.yml` - El directorio actual contiene un fichero `.cr` @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -684,7 +711,7 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `dart` muestra la versión instalada de [Dart](https://dart.dev/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo con la extensión `.dart` - El directorio actual contiene un directorio `.dart_tool` @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -724,7 +751,8 @@ format = "via [🔰 $version](bold red) " ## Deno -The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `deno` le muestra la versión instalada de [Deno](https://deno.land/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Opciones @@ -759,11 +787,11 @@ format = "via [🦕 $version](green bold) " ## 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. +El módulo `directory` muestra la ruta hasta el directorio actual, mostrando tres directorios padre como máximo. Tu directorio se truncará a la raíz del repositorio git en el que estés. -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. +Cuando usas el estilo fish de la opción pwd, en lugar de ocultar la ruta truncada, verás una versión acortada del nombre de cada directorio basada en el número que activa la opción. -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`. +Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repositorio y el valor de la opción es `1`. En ese caso, verás `~/D/N/nixpkgs/pkgs`, cuando antes hubiera sido `nixpkgs/pkgs`. ### Opciones @@ -782,7 +810,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |

-This module has a few advanced configuration options that control how the directory is displayed. +Este módulo tiene algunas opciones avanzadas de configuración que controlan cómo se muestra el directorio. | Opciones avanzadas | Por defecto | Descripción | | --------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -790,7 +818,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `fish_style_pwd_dir_length` | `0` | El número de caracteres a usar al aplicar la lógica de ruta pwd de la shell de fish. | | `use_logical_path` | `true` | Si `true` renderiza la ruta lógica originada desde el intérprete de comandos a través de `PWD` o `--logical-path`. Si `false` en su lugar renderiza la ruta física del sistema de archivos con enlaces simbólicos resueltos. | -`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. +`substitutions` permite definir reemplazos arbitrarios para cadenas literales que ocurren en la ruta, por ejemplo prefijos largos de red o directorios de desarrollo (p. ej. Java). Ten en cuenta que esto desactivará el estilo PWD de fish. ```toml [directory.substitutions] @@ -798,7 +826,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an "src/com/long/java/path" = "mypath" ``` -`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`. +`fish_style_pwd_dir_length` interactúa con las opciones de truncamiento estándar de una manera que puede sorprenderse primero: si no es cero, los componentes de la ruta que normalmente se truncarían se muestran con esa cantidad de caracteres. Por ejemplo, la ruta `/built/this/city/on/rock/and/roll`, que normalmente se mostraría como `rock/and/roll`, se mostraría como `/b/t/c/o/rock/and/roll` con `fish_style_pwd_dir_length = 1`--los componentes de ruta que normalmente se eliminarían se muestran con un solo carácter. Para `fish_style_pwd_dir_length = 2`, sería `/bu/th/ci/on/rock/and/roll`.
@@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | La ruta de directorio actual | | style\* | `"black bold dimmed"` | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -859,9 +887,9 @@ 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. +El módulo `dotnet` muestra la versión usada de .NET Core SDK para el directorio actual. Si el SDK ha sido anclado en el directorio actual, se mostrará la versión fijada. De lo contrario, el módulo muestra la última versión instalada del 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: +Por defecto, este módulo solo se mostrará en tu prompt cuando uno o más de de los siguientes archivos estén presentes en el directorio actual: - `global.json` - `project.json` @@ -872,11 +900,11 @@ By default this module will only be shown in your prompt when one or more of the - `*.fsproj` - `*.xproj` -You'll also need the .NET Core SDK installed in order to use it correctly. +También necesitará tener instalado .NET Core SDK para poder usarlo correctamente. -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. +Internamente, este módulo utiliza su propio mecanismo para la detección de versiones. Normalmente es el doble de rápido que ejecutar `dotnet --version`, pero puede mostrar una versión incorrecta si tu proyecto .NET tiene un diseño de directorio inusual. Si la precisión es más importante que la velocidad, puede desactivar el mecanismo estableciendo `heuristic = false` en las opciones del módulo. -The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. +El módulo también mostrará el Target Framework Moniker ([https://docs.microsoft. om/es/dotnet/standard/frameworks#supported-target-framework-versions](https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions)) cuando exista un archivo csproj en el directorio actual. ### Opciones @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( Nada se muestra. - 1 tarea -> `symbol` se muestra. @@ -1597,13 +1626,13 @@ The default functionality is: ::: aviso -This module is not supported on tcsh and nu. +Este módulo no está soportado por tcsh y nu. ::: ::: aviso -The `threshold` option is deprecated, but if you want to use it, 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. If `threshold` is set to 0, then the module will also show when there are 0 jobs running. +La opción `threshold` está obsoleta, pero si deseas usarla, el módulo mostrará el número de tareas en ejecución si hay más de 1 tarea, o más que el valor de configuración `threshold`, si existe. Si `threshold` se establece en 0, entonces el módulo también se mostrará cuando haya 0 tareas en ejecución. ::: @@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will | Opción | Por defecto | Descripción | | ------------------ | ----------------------------- | ---------------------------------------------------------------------------------- | -| `threshold`\* | `1` | Muestra el número de tareas si se exceden. | +| `threshold`* | `1` | Muestra el número de tareas si se exceden. | | `symbol_threshold` | `1` | Muestra `symbol` si el conteo de tareas es al menos `symbol_threshold`. | | `number_threshold` | `2` | Muestra el número de tareas si el conteo de tareas es al menos `symbol_threshold`. | | `format` | `"[$symbol$number]($style) "` | El formato del módulo. | | `symbol` | `"✦"` | La cadena utilizada para representar la variable `symbol`. | | `style` | `"bold blue"` | El estilo del módulo. | | `disabled` | `false` | Desactiva el módulo `jobs`. | - \*: This option is deprecated, please use the -`number_threshold` and `symbol_threshold` options instead. +*: Esta opción está desaprobada, por favor utiliza las opciones `number_threshold` y `symbol_threshold` en su lugar. ### Variables @@ -1630,7 +1658,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -1645,7 +1673,7 @@ symbol_threshold = 0 ## Julia -The `julia` module shows the currently installed version of [Julia](https://julialang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `julia` muestra la versión instalada de [Julia](https://julialang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `Project.toml` - El directorio actual contiene un archivo `Manifest.toml` @@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -1683,9 +1711,42 @@ The `julia` module shows the currently installed version of [Julia](https://juli symbol = "∴ " ``` +## localip + +The `localip` module shows the IPv4 address of the primary network interface. + +### Opciones + +| Opción | Por defecto | Descripción | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | El formato del módulo. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | ------------ | ------------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Refleja el valor de la opción `style` | + +*: Esta variable sólo puede ser usada como parte de una cadena de estilo + +### Ejemplo + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Kotlin -The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `kotlin` muestra la versión instalada de [Kotlin](https://kotlinlang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `.kt` o `.kts` @@ -1711,7 +1772,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -1726,17 +1787,17 @@ symbol = "🅺 " # ~/.config/starship.toml [kotlin] -# Uses the Kotlin Compiler binary to get the installed version +# Utiliza el binario del Compilador de Kotlin para obtener la versión instalada kotlin_binary = "kotlinc" ``` ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#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`. +Muestra el nombre actual del [contexto de Kubernetes](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) y, si se establece, el espacio de nombres del archivo kubeconfig. El espacio de nombres necesita establecerse en el archivo kubeconfig, esto puede hacerse mediante `kubectl config set-context starship-cluster --namespace astronaut`. Si se establece la variable de entorno `$KUBECONFIG`, el módulo usará eso si no usará el `~/.kube/config`. ::: consejo -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: @@ -1759,7 +1820,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -1777,28 +1838,28 @@ disabled = false #### Busqueda por Regex -Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions. +Adicional al alias simple, `context_aliases` también soporta coincidencias extendidas y renombradas usando expresiones regulares. -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. +La expresión regular debe coincidir en todo el contexto de kube. los grupos de captura pueden ser referenciados usando `$name` y `$N` en el reemplazo. Esto está más explicado en la documentación del [crate regex](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace). -Long and automatically generated cluster names can be identified and shortened using regular expressions: +Los nombres de cluster generados de forma larga y automática pueden ser identificados y abreviados usando expresiones regulares: ```toml [kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: +# los contextos de OpenShift llevan el espacio de nombres y el usuario en el contexto de kube: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: ".*/(?P[\\w-]+)/.*" = "$cluster" -# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. -# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) -# and renames every matching kube context into a more readable format (`gke-cluster-name`): +# Los contextos de GKE, AWS y otros proveedores de nube normalmente llevan información adicional, como la región/zona. +# La siguiente entrada coincide con el formato GKE (`gke_projectname_zone_cluster-name`) +# y renombra cada contexto de kube coincidente a un formato más legible (`gke-cluster-name`): "gke_.*_(?P[\\w-]+)" = "gke-$cluster" ``` ## Salto de línea -The `line_break` module separates the prompt into two lines. +El módulo `line_break` separa el indicador en dos líneas. ### Opciones @@ -1817,7 +1878,7 @@ disabled = true ## Lua -The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `lua` muestra la versión instalada de [Lua](http://www.lua.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `.lua-version` - El directorio actual contiene un directorio `lua` @@ -1845,7 +1906,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -1858,13 +1919,13 @@ format = "via [🌕 $version](bold blue) " ## Memoria utilizada -The `memory_usage` module shows current system memory and swap usage. +El módulo `memory_usage` muestra la memoria del sistema actual y el uso de memoria de intercambio. -By default the swap usage is displayed if the total system swap is non-zero. +Por defecto, el uso de swap se muestra si el intercambio total del sistema no es cero. ::: consejo -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: @@ -1889,7 +1950,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | `🐏` | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: This variable can only be used as a part of a style string \*\*: The SWAP file information is only displayed if detected on the current system +*: This variable can only be used as a part of a style string *\*: The SWAP file information is only displayed if detected on the current system ### Ejemplo @@ -1905,7 +1966,7 @@ style = "bold dimmed green" ## Mercurial Branch -The `hg_branch` module shows the active branch of the repo in your current directory. +El módulo `hg_branch` muestra la rama activa del repositorio en su directorio actual. ### Opciones @@ -1926,7 +1987,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -1941,7 +2002,7 @@ truncation_symbol = "" ## Nim -The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `nim` muestra la versión instalada de [Nim](https://nim-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `nim.cfg` - El directorio actual contiene un archivo con la extensión `.nim` @@ -1969,7 +2030,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -1983,7 +2044,7 @@ symbol = "🎣 " ## Nix-shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. +El módulo `nix_shell` muestra el entorno [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html). El módulo se mostrará dentro de un entorno nix-shell. ### Opciones @@ -2005,7 +2066,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2021,7 +2082,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' ## Node.js -The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `nodejs` muestra la versión instalada de [Node.js](https://nodejs.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `package.json` - El directorio actual contiene un archivo `.node-version` @@ -2036,7 +2097,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Una cadena de formato que representa el símbolo de Node.js. | +| `symbol` | `" "` | Una cadena de formato que representa el símbolo de Node.js. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["package.json", ".node-version"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `["node_modules"]` | Qué carpetas deberían activar este módulo. | @@ -2052,7 +2113,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2065,7 +2126,7 @@ format = "via [🤖 $version](bold green) " ## OCaml -The `ocaml` module shows the currently installed version of [OCaml](https://ocaml.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `ocaml` muestra la versión instalada de [OCaml](https://ocaml.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo con extensión `.opam` o directorio `_opam` - El directorio actual contiene un directorio `esy.lock` @@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2112,7 +2173,7 @@ format = "via [🐪 $version]($style) " ## OpenStack -The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. +El módulo `openstack` muestra la nube OpenStack actual y el proyecto. El módulo solo está activo cuando la variable env `OS_CLOUD` está definida en cuyo caso leerá el archivo `nubes. aml` desde cualquiera de las [ubicaciones por defecto](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files) para obtener el proyecto actual en uso. ### Opciones @@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2147,7 +2208,7 @@ symbol = "☁️ " ## Versión del paquete -The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. +El módulo `package` se muestra cuando el directorio actual es el repositorio de un paquete, y muestra su versión actual. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – La versión del paquete `npm` se extrae del `package.json` presente en el directorio actual - [**Cargo**](https://doc.rust-lang.org/cargo/) – La versión del paquete `cargo` se extrae del `Cargo.toml` presente en el directorio actual @@ -2187,7 +2248,7 @@ The `package` module is shown when the current directory is the repository for a | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2200,7 +2261,7 @@ format = "via [🎁 $version](208 bold) " ## Perl -The `perl` module shows the currently installed version of [Perl](https://www.perl.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `perl` muestra la versión instalada de [Perl](https://www.perl.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `Makefile.PL` o `Build.PL` - El directorio actual contiene un archivo `cpanfile` o `cpanfile.snapshot` @@ -2240,7 +2301,7 @@ format = "via [🦪 $version]($style) " ## PHP -The `php` module shows the currently installed version of [PHP](https://www.php.net/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `php` muestra la versión instalada de [PHP](https://www.php.net/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `composer.json` - El directorio actual contiene un archivo `.php-version` @@ -2267,7 +2328,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2280,11 +2341,11 @@ format = "via [🔹 $version](147 bold) " ## Pulumi -The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. +The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version. -::: tip +::: consejo -By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). +Por defecto la versión de Pulumi no se muestra, ya que toma un orden de magnitud más largo para cargar que la mayoría de los plugins (~70ms). Si aún deseas activarlo, [sigue el ejemplo que se muestra a continuación](#with-pulumi-version). ::: @@ -2295,24 +2356,25 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes ### Opciones -| Opción | Por defecto | Descripción | -| ---------------- | -------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$stack]($style) "` | La cadena de formato para el módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Una cadena de formato que se muestra antes de la pila de Pulumi. | -| `style` | `"bold 5"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `pulumi`. | +| Opción | Por defecto | Descripción | +| ---------------- | -------------------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($username@)$stack]($style) "` | La cadena de formato para el módulo. | +| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | Una cadena de formato que se muestra antes de la pila de Pulumi. | +| `style` | `"bold 5"` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `pulumi`. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ---------- | -------------------------------------- | -| version | `v0.12.24` | La versión de `pulumi` | -| stack | `dev` | La pila actual de Pulumi | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| ----------------- | ---------- | -------------------------------------- | +| version | `v0.12.24` | La versión de `pulumi` | +| stack | `dev` | La pila actual de Pulumi | +| nombre de usuario | `alice` | The current Pulumi username | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2332,12 +2394,11 @@ format = "[🛥 ($version )$stack]($style) " [pulumi] symbol = "🛥 " format = "[$symbol$stack]($style) " - ``` ## PureScript -The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `purescript` muestra la versión instalada de [PureScript](https://www.purescript.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `spago.dhall` - El directorio actual contiene un archivo con la extensión `.purs` @@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2376,9 +2437,9 @@ format = "via [$symbol$version](bold white)" ## Python -The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated. +El módulo `python` muestra la versión instalada de [Python](https://www.python.org/) y el entorno virtual actual [Python](https://docs.python.org/tutorial/venv.html) si uno está activado. -If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. +Si `pyenv_version_name` se establece en `true`, mostrará el nombre de la versión de pyenv. De lo contrario, se mostrará el número de versión de `python --version`. Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: @@ -2408,11 +2469,11 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes | `detect_folders` | `[]` | Qué carpetas deben activar este módulo | | `disabled` | `false` | Desactiva el módulo `python`. | -::: tip +::: consejo -The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. +La variable `python_binary` acepta una cadena o una lista de cadenas. Starship intentará ejecutar cada binario hasta que obtenga un resultado. Ten en cuenta que sólo puedes cambiar el binario que Starship ejecuta para obtener la versión de Python no los argumentos que se utilizan. -The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. +Los valores por defecto y el orden para `python_binary` fue elegido para identificar primero la versión de Python en un entorno virtualenv/conda (que actualmente añade un `python`, no importa si apunta a `pithon3` o `pithon2`). Esto tiene el efecto secundario que si todavía tienes un sistema de Python 2 instalado, puede ser recogido antes de cualquier Python 3 (al menos en las Distros de Linux que siempre enlazan `/usr/bin/python` a Python 2). Si ya no trabajas con Python 2 pero no puedes removerlo del sistema, cambiando esto a `"python3"` ocultará cualquier versión de Python 2, ver ejemplo a continuación. ::: @@ -2440,7 +2501,7 @@ pyenv_version_name = true # ~/.config/starship.toml [python] -# Only use the `python3` binary to get the version. +# Solo usa el binario `python3` para obtener la versión. python_binary = "python3" ``` @@ -2448,7 +2509,7 @@ python_binary = "python3" # ~/.config/starship.toml [python] -# Don't trigger for files with the py extension +# No se dispara con archivos con extensión py detect_extensions = [] ``` @@ -2456,16 +2517,16 @@ detect_extensions = [] # ~/.config/starship.toml [python] -# Display the version of python from inside a local venv. +# Muestra la versión de python desde dentro de un entorno virtual local. # -# 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? +# Ten en cuenta que esto solo funcionará cuando el venv esté dentro del proyecto y sólo +# funcionará en el directorio que contiene el directorio venv dir pero ¿tal vez esté bien? python_binary = ["./venv/bin/python", "python", "python3", "python2"] ``` ## R -The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met: +El módulo `rlang` muestra la versión instalada de [R](https://www.r-project.org/). El módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo con la extensión `.R`. - El directorio actual contiene un archivo con la extensión `.Rd`. @@ -2507,7 +2568,7 @@ format = "with [📐 $version](blue bold) " ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +Por defecto, el módulo `red` muestra la versión actualmente instalada de [Red](https://www.red-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un archivo con extensión `.red` o `.Red` @@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2545,7 +2606,7 @@ symbol = "🔴 " ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +Por defecto, el módulo `ruby` muestra la versión actualmente instalada de [Ruby](https://www.ruby-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un archivo `Gemfile` - El directorio actual contiene un archivo `.ruby-version` @@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`. | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2589,7 +2650,7 @@ symbol = "🔺 " ## Rust -By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +Por defecto, el módulo `rust` muestra la versión instalada de [Rust](https://www.rust-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un archivo `Cargo.toml` - El directorio actual contiene un archivo con la extensión `.rs` @@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2628,7 +2689,7 @@ format = "via [⚙️ $version](red bold)" ## Scala -The `scala` module shows the currently installed version of [Scala](https://www.scala-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `scala` muestra la versión actualmente instalada de [Scala](https://www.scala-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `build.sbt`, `.scalaenv` o `.sbtenv` - El directorio actual contiene un archivo con la extensión `.scala` o `.sbt` @@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2668,32 +2729,32 @@ symbol = "🌟 " ## Shell -The `shell` module shows an indicator for currently used shell. +El módulo `shell` muestra un indicador para el intérprete de comandos actualmente utilizado. -::: tip +::: consejo -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | Una cadena de formato usada para representar Bash. | -| `fish_indicator` | `fsh` | Una cadena de formato usada para representar Fish. | -| `zsh_indicator` | `zsh` | Una cadena de formato usada para representar Zsh. | -| `powershell_indicator` | `psh` | Una cadena de formato usada para representar Powershell. | -| `ion_indicator` | `ion` | Una cadena de formato usada para representar Ion. | -| `elvish_indicator` | `esh` | Una cadena de formato usada para representar Elvish. | -| `tcsh_indicator` | `tsh` | Una cadena de formato usada para representar tcsh. | -| `xonsh_indicator` | `xsh` | Una cadena de formato usada para representar xonsh. | -| `cmd_indicator` | `cmd` | A format string used to represent cmd. | -| `nu_indicator` | `nu` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | El formato del módulo. | -| `style` | `"white bold"` | El estilo del módulo. | -| `disabled` | `true` | Disables the `shell` module. | +| Opción | Por defecto | Descripción | +| ---------------------- | ------------------------- | -------------------------------------------------------------------- | +| `bash_indicator` | `bsh` | Una cadena de formato usada para representar Bash. | +| `fish_indicator` | `fsh` | Una cadena de formato usada para representar Fish. | +| `zsh_indicator` | `zsh` | Una cadena de formato usada para representar Zsh. | +| `powershell_indicator` | `psh` | Una cadena de formato usada para representar Powershell. | +| `ion_indicator` | `ion` | Una cadena de formato usada para representar Ion. | +| `elvish_indicator` | `esh` | Una cadena de formato usada para representar Elvish. | +| `tcsh_indicator` | `tsh` | Una cadena de formato usada para representar tcsh. | +| `xonsh_indicator` | `xsh` | Una cadena de formato usada para representar xonsh. | +| `cmd_indicator` | `cmd` | A format string used to represent cmd. | +| `nu_indicator` | `nu` | A format string used to represent nu. | +| `unknown_indicator` | | El valor por defecto que se mostrará cuando se desconoce el comando. | +| `format` | `"[$indicator]($style) "` | El formato del módulo. | +| `style` | `"white bold"` | El estilo del módulo. | +| `disabled` | `true` | Deshabilita el módulo `shell`. | ### Variables @@ -2702,7 +2763,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | indicator | | Ordena el valor de `indicator` para el intérprete de comandos actualmente utilizado. | | style\* | | Refleja el valor de la opción `style`. | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplos @@ -2719,7 +2780,7 @@ disabled = false ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +El módulo `shlvl` muestra la variable de entorno [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") actual, si está establecido en un número y reúne o supera el umbral especificado. ### Opciones @@ -2740,7 +2801,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2755,7 +2816,7 @@ threshold = 3 ## Singularity -The `singularity` module shows the current [Singularity](https://sylabs.io/singularity/) image, if inside a container and `$SINGULARITY_NAME` is set. +El módulo `singularity` muestra la imagen de [singularity](https://sylabs.io/singularity/) actual, si se encuentra dentro de un contenedor y `$SINGULARITY_NAME` está establecido. ### Opciones @@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2787,11 +2848,11 @@ format = '[📦 \[$env\]]($style) ' ## Status -The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. +El módulo `status` muestra el código de salida del comando anterior. El módulo se mostrará sólo si el código de salida no es `0`. The status code will cast to a signed 32-bit integer. -::: tip +::: consejo -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: @@ -2799,44 +2860,43 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Opciones -| Opción | Por defecto | Descripción | -| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | El formato del módulo | -| `symbol` | `"✖"` | El símbolo mostrado en error del programa | -| `success_symbol` | `"✔️"` | El símbolo mostrado en el éxito del programa | -| `not_executable_symbol` | `"🚫"` | El símbolo mostrado cuando el archivo no es ejecutable | -| `not_found_symbol` | `"🔍"` | El símbolo mostrado cuando no se encuentra el comando | -| `sigint_symbol` | `"🧱"` | El símbolo mostrado en SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | El símbolo mostrado en cualquier señal | -| `style` | `"bold red"` | El estilo del módulo. | -| `recognize_signal_code` | `true` | Activar mapeo de señales desde el código de salida | -| `map_symbol` | `false` | Activar mapeo de símbolos desde el código de salida | -| `pipestatus` | `false` | Habilita el reporte de pipstatus | -| `pipestatus_separator` | `|` | El símbolo que se separa en los códigos de salida del programa de tubería | -| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | El formato del módulo cuando el comando es un pipeline | -| `disabled` | `true` | Desactiva el módulo `status`. | +| Opción | Por defecto | Descripción | +| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------ | +| `format` | `"[$symbol$status]($style) "` | El formato del módulo | +| `symbol` | `"✖"` | El símbolo mostrado en error del programa | +| `success_symbol` | `"✔️"` | El símbolo mostrado en el éxito del programa | +| `not_executable_symbol` | `"🚫"` | El símbolo mostrado cuando el archivo no es ejecutable | +| `not_found_symbol` | `"🔍"` | El símbolo mostrado cuando no se encuentra el comando | +| `sigint_symbol` | `"🧱"` | El símbolo mostrado en SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | El símbolo mostrado en cualquier señal | +| `style` | `"bold red"` | El estilo del módulo. | +| `recognize_signal_code` | `true` | Activar mapeo de señales desde el código de salida | +| `map_symbol` | `false` | Activar mapeo de símbolos desde el código de salida | +| `pipestatus` | `false` | Habilita el reporte de pipstatus | +| `pipestatus_separator` | `|` | | +| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | El formato del módulo cuando el comando es un pipeline | +| `disabled` | `true` | Desactiva el módulo `status`. | ### Variables -| Variable | Ejemplo | Descripción | -| -------------- | ------- | ------------------------------------------------------------------------------------------- | -| status | `127` | El código de salida del último comando | -| hex_status | `0x7F` | The exit code of the last command in hex | -| int | `127` | El código de salida del último comando | -| common_meaning | `ERROR` | Meaning of the code if not a signal | -| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | -| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | -| maybe_int | `7` | Contains the exit code number when no meaning has been found | -| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| -------------- | ------- | ------------------------------------------------------------------------------------------------------------------ | +| status | `127` | El código de salida del último comando | +| hex_status | `0x7F` | The exit code of the last command in hex | +| int | `127` | El código de salida del último comando | +| common_meaning | `ERROR` | Comprobación del código si no es una señal | +| signal_number | `9` | Número de señal correspondiente al código de salida, sólo si está señalizada | +| signal_name | `KILL` | Nombre de la señal correspondiente al código de salida, sólo si está señalizada | +| maybe_int | `7` | Contiene el número de código de salida cuando no se ha encontrado ningún significado | +| pipestatus | | Renderizado en los códigos de salida de los programas del pipeline, esto sólo está disponible en pipestatus_format | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo ```toml - # ~/.config/starship.toml [status] @@ -2845,16 +2905,15 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: tip +::: consejo -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo ```toml - # ~/.config/starship.toml [sudo] @@ -2900,7 +2958,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +Por defecto, el módulo `swift` muestra la versión instalada de [Swift](https://swift.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un archivo `Package.swift` - El directorio actual contiene un archivo con la extensión `.swift` @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2939,11 +2997,11 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. +El módulo `Terraform` muestra el espacio de trabajo de [Terraform](https://www.terraform.io/docs/language/state/workspaces.html) y la versión seleccionados actualmente. -::: tip +::: consejo -By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). +Por defecto no se muestra la versión de Terraform, ya que esto es lento para las versiones actuales de Terraform cuando hay muchos complementos en uso. Si aún deseas activarlo, [sigue el ejemplo que se muestra a continuación](#with-terraform-version). ::: @@ -2974,7 +3032,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -2998,11 +3056,11 @@ format = "[🏎💨 $workspace]($style) " ## Hora -The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. +El módulo `time` muestra la hora **local** actual. El valor de configuración de `format` es usado por la caja de [`chrono`](https://crates.io/crates/chrono) para controlar cómo se muestra la hora. Echa un vistazo a [los documentos de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) para ver qué opciones están disponibles. -::: tip +::: consejo -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: @@ -3018,7 +3076,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `disabled` | `true` | Desactiva el módulo `time`. | | `time_range` | `"-"` | Establece el intervalo de tiempo durante el cual el módulo se mostrará. La hora debe ser especificada en formato de 24 horas | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +Si `use_12hr` es `true`, entonces `time_format` por defecto `"%r"`. De lo contrario, el valor por defecto es `"%T"`. Configurar manualmente `time_format` sobrescribirá la configuración `use_12hr`. ### Variables @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | tiempo | `13:08:10` | La hora actual. | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -3044,16 +3102,16 @@ time_range = "10:00:00-14:00:00" ## Nombre de usuario -The `username` module shows active user's username. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +El módulo `username` muestra el nombre de usuario activo. El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El usuario actual es root - El usuario actual no es el mismo que el que está conectado - El usuario está actualmente conectado como una sesión SSH - La variable `show_always` se establece en true -::: tip +::: consejo -SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. +La conexión SSH se detecta comprobando las variables de entorno `SSH_CONNECTION`, `SSH_CLIENT`, y `SSH_TTY`. Si su host SSH no configura estas variables, una solución es establecer una de ellas con un valor tonto. ::: @@ -3089,7 +3147,7 @@ show_always = true ## Vagrant -The `vagrant` module shows the currently installed version of [Vagrant](https://www.vagrantup.com/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `vagrant` muestra la versión instalada de [Vagrant](https://www.vagrantup.com/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `Vagrantfile` @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -3127,7 +3185,8 @@ format = "via [⍱ $version](bold white) " ## V -The `vlang` module shows you your currently installed version of [V](https://vlang.io/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `vlang` te muestra la versión instalada de [V](https://vlang.io/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: + - El directorio actual contiene un archivo con la extensión `.v` - El directorio actual contiene un archivo `v.mod`, `vpkg.json` o `.vpkg-lock.json` @@ -3162,7 +3221,7 @@ format = "via [V $version](blue bold) " ## VCSH -The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use. +El módulo `vcsh` muestra el repositorio activo [VCSH](https://github.com/RichiH/vcsh) actual. El módulo sólo se mostrará si un repositorio está actualmente en uso. ### Opciones @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Refleja el valor de la opción `symbol` | | style\* | `black bold dimmed` | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -3194,7 +3253,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +Por defecto, el módulo `zig` muestra la versión instalada de [Zig](https://ziglang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un archivo `.zig` @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo @@ -3232,9 +3291,9 @@ symbol = "⚡️ " ## Comandos personalizados -The `custom` modules show the output of some arbitrary commands. +Los módulos `personalizados` muestran la salida de algunos comandos arbitrarios. -These modules will be shown if any of the following conditions are met: +Estos módulos se mostrarán si se cumplen alguna de las siguientes condiciones: - El directorio actual contiene un archivo cuyo nombre está en `files` - El directorio actual contiene un directorio cuyo nombre está en `directories` @@ -3242,21 +3301,21 @@ These modules will be shown if any of the following conditions are met: - El comando `when` devuelve 0 - El sistema operativo actual (std::env::consts::OS) coincide con el campo `os` si está definido. -::: tip +::: consejo -Multiple custom modules can be defined by using a `.`. +Múltiples módulos personalizados pueden definirse usando una `.`. ::: -::: tip +::: consejo -The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. +El orden en el que se muestran los módulos personalizados se puede establecer individualmente incluyendo `${custom.foo}` en el `format` de nivel superior (ya que incluye un punto, necesita usar `${...}`). Por defecto, el módulo `custom` simplemente mostrará todos los módulos personalizados en el orden en que fueron definidos. ::: -::: tip +::: consejo -[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there! +[El issue #1252](https://github.com/starship/starship/discussions/1252) contiene ejemplos de módulos personalizados. Si tiene un ejemplo interesante no cubierto allí, no dude en compartirlo allí! ::: @@ -3293,34 +3352,34 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | Refleja el valor de la opción `symbol` | | style\* | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable sólo puede ser usada como parte de una cadena de estilo #### Comando personalizado del intérprete de comandos -`shell` accepts a non-empty list of strings, where: +`shell` acepta una lista no vacía de cadenas, donde: - La primera cadena es la ruta al intérprete de comandos a usar para ejecutar el comando. - Otros argumentos siguientes son pasados al shell. -If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. +Si no está activado, se retornará a STARSHIP_SHELL y luego a "sh" en Linux, y "cmd /C" en Windows. -The `command` will be passed in on stdin. +El `comando` será pasado en stdin. -If `shell` is not given or only contains one element and Starship detects PowerShell will be used, the following arguments will automatically be added: `-NoProfile -Command -`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. +Si no se da el `shell` o solo contiene un elemento y Starship detecta PowerShell los siguientes argumentos se añadirán automáticamente: `-NoProfile -Command -`. Este comportamiento puede evitarse pasando explícitamente argumentos al intérprete, p.ej. ```toml shell = ["pwsh", "-Command", "-"] ``` -::: warning Make sure your custom shell configuration exits gracefully +::: advertencia Asegúrate de que tu configuración personalizada de shell salga con éxito -If you set a custom command, make sure that the default Shell used by starship will properly execute the command with a graceful exit (via the `shell` option). +Si establece un comando personalizado, asegúrese de que el Shell por defecto usado por starship ejecutará correctamente el comando con una salida elgante (a través de la opción `shell`). -For example, PowerShell requires the `-Command` parameter to execute a one liner. Omitting this parameter might throw starship into a recursive loop where the shell might try to load a full profile environment with starship itself again and hence re-execute the custom command, getting into a never ending loop. +Por ejemplo, PowerShell requiere el parámetro `-Command` para ejecutar una sola línea. Omitir este parámetro puede arrojar a starchip a un bucle recursivo donde el shell podría intentar cargar un entorno de perfil completo con starship en sí misma y volver a ejecutar el comando personalizado, entrando en un bucle infinito. -Parameters similar to `-NoProfile` in PowerShell are recommended for other shells as well to avoid extra loading time of a custom profile on every starship invocation. +Se recomiendan parámetros similares a `-NoProfile` en PowerShell para otros shells para evitar tiempo extra de carga de un perfil personalizado en cada invocación de starship. -Automatic detection of shells and proper parameters addition are currently implemented, but it's possible that not all shells are covered. [Please open an issue](https://github.com/starship/starship/issues/new/choose) with shell details and starship configuration if you hit such scenario. +La detección automática de shells y la adición adecuada de parámetros están actualmente implementados, pero es posible que no todos los shells estén cubiertos. Por favor, [abre un issue](https://github.com/starship/starship/issues/new/choose) con los detalles del intérprete de comandos y la configuración de Starship si te encuentras en tal escenario. ::: @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/es-ES/faq/README.md b/docs/es-ES/faq/README.md index 6e1bd35d..d10ece4c 100644 --- a/docs/es-ES/faq/README.md +++ b/docs/es-ES/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## Veo símbolos que no entiendo ni espero, ¿qué significan? diff --git a/docs/es-ES/guide/README.md b/docs/es-ES/guide/README.md index 8598cc68..d297ae04 100644 --- a/docs/es-ES/guide/README.md +++ b/docs/es-ES/guide/README.md @@ -169,177 +169,245 @@ - Una [Nerd Font](https://www.nerdfonts.com/) instalada y habilitada en tu terminal (por ejemplo, prueba [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Comenzar +### Step 1. Install Starship -**Nota**: debido a la proliferación de diferentes plataformas, solo un subconjunto de plataformas soportadas se muestra a continuación. ¿No puedes ver el tuyo? Echa un vistazo a las [instrucciones adicionales de la plataforma](https://starship.rs/installing/). +Select your operating system from the list below to view installation instructions: -1. Instala el binario de **Starship**: +
+Android +Install Starship using any of the following package managers: - #### Instalar la última versión +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### Desde un binario preconstruido, con el intérprete de comandos: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - Para actualizar Starship, vuelve a ejecutar el guión anterior. Reemplazará la versión actual sin tocar la configuración de Starship. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Nota** - Los valores por defecto del guión de instalación se pueden anular (ver la ayuda incorporada). +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### Instalar con un gestor de paquetes +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### Con [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### Con [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Añade el guión de inicio al archivo de configuración de tu intérprete de comandos: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Añade el siguiente código al final de `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - Añade el siguiente código al final de `~/.config/fish/config.fish`: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Añade el siguiente código al final de `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Añade el siguiente código al final de `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Añade lo siguiente al final de `Microsoft.PowerShell_profile.ps1`. Puedes comprobar la ubicación de este archivo consultando la variable `$PROFILE` en PowerShell. Normalmente la ruta es `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` o `~/.config/powershell/Microsoft.PowerShell_profile.ps1` en -Nix. +Añade el siguiente código al final de `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- Añade el siguiente código al final de `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +Añade el siguiente código al final de `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. Añade el siguiente código al final de `~/.elvish/rc.elv`: +Añade el siguiente código al final de `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - Añade el siguiente código al final de `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Añade lo siguiente al final de `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Añade el siguiente código al final de `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Añade lo siguiente al final de `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Sólo se admite la versión nu v0.33 o superior. Add the following to your nu config file. Puedes comprobar la ubicación de este archivo ejecutando `ruta de configuración` en nu. +Añade el siguiente código al final de `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 Colaborando -¡Siempre estamos buscando colaboradores de **todos los niveles y habilidades**! Si estas buscando una manera fácil de ayudar este proyecto, puedes intentar resolver un problema con la etiqueta "[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)". +¡Siempre estamos buscando colaboradores de **todos los niveles y habilidades**! Si estás interesado en empezar en el proyecto con algo sencillo, prueba con un problema etiquetado como [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). Si hablas con fluidez en un idioma que no sea inglés, agradecemos mucho cualquier ayuda para mantener nuestros documentos traducidos y actualizados en otros idiomas. Si quieres ayudar, puedes contribuir con las traducciones en el [Crowdin de Starship](https://translate.starship.rs/). -Si quieres ayudar a colaborar a Starship, por favor mira nuestra [Guía de Colaboradores](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Además, siéntete libre de entrar en nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y di "¡Hola!". 👋 +Si estás interesado en ayudar contribuyendo a starship, por favor échale un vistazo a [Guía de Colaboración](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). También siéntete libre de pasarte por nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y saludarnos. 👋 ## 💭 Inspirado por -Por favor, revisa estos proyectos previos que inspiraron la creación de Starship. 🙏 +Por favor, revisa estos proyectos que inspiraron la creación de Starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt ZSH para astronautas. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - robbyrussel, tema multi-intérprete de comandos escrito en JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - Un prompt multi-intérprete de comandos personalizable, basada en Powerline con iconos. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


@@ -348,4 +416,4 @@ Por favor, revisa estos proyectos previos que inspiraron la creación de Starshi ## 📝 Licencia -Derechos de autor © 2019-presente, [Colaboradores de Starship](https://github.com/starship/starship/graphs/contributors).
Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE). +Copyright © 2019-actualidad, [Creadores de Starship](https://github.com/starship/starship/graphs/contributors).
Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE). diff --git a/docs/es-ES/migrating-to-0.45.0/README.md b/docs/es-ES/migrating-to-0.45.0/README.md index 3c1748f0..92564b0d 100644 --- a/docs/es-ES/migrating-to-0.45.0/README.md +++ b/docs/es-ES/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ Para configurar el prompt para usar la configuración anterior `use_symbol_for_s error_symbol = "[✖](bold red)" ``` -*Nota:* El elemento `character` añade automáticamente un espacio, así que a diferencia del otras cadenas `format`, no añadimos uno en los ejemplos anteriores. +_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. #### Tiempo de Ejecución diff --git a/docs/es-ES/presets/README.md b/docs/es-ES/presets/README.md index fd177a1e..a3ae3098 100644 --- a/docs/es-ES/presets/README.md +++ b/docs/es-ES/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/fr-FR/README.md b/docs/fr-FR/README.md index 6c6d731f..17776598 100644 --- a/docs/fr-FR/README.md +++ b/docs/fr-FR/README.md @@ -147,9 +147,9 @@ description: Starship est une invite minimaliste, ultra-rapide et hautement pers ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` @@ -168,7 +168,7 @@ description: Starship est une invite minimaliste, ultra-rapide et hautement pers #### Cmd - You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: + Vous devez utiliser [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) avec Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: ```lua -- starship.lua diff --git a/docs/fr-FR/advanced-config/README.md b/docs/fr-FR/advanced-config/README.md index 52c6f94e..8782275c 100644 --- a/docs/fr-FR/advanced-config/README.md +++ b/docs/fr-FR/advanced-config/README.md @@ -32,11 +32,11 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## Commandes pré-commande et pré-exécution personnalisées en Bash -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt : +Bash n'a pas de structure officielle préexec/précmd comme la plupart des autres shells. C'est pourquoi il est difficile de fournir des hooks entièrement personnalisables dans `bash`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt : -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- Pour exécuter une fonction personnalisée juste avant que le prompt ne soit dessiné, définissez une nouvelle fonction et assignez son nom à `starship_precmd_user_func`. Par exemple, pour dessiner une fusée avant la commande, vous feriez ```bash function blastoff(){ @@ -45,21 +45,23 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- Pour exécuter une fonction personnalisée juste avant l'exécution d'une commande, vous pouvez utiliser le [ mécanisme d'interruption du signal ` DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Cependant, vous **devez** piéger le signal DEBUG _avant_ l'initialisation de Starship ! Starship peut préserver la valeur du piège DEBUG, mais si le piège est écrasé après le démarrage de Starship, certaines fonctionnalités vont casser. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` -## Custom pre-prompt and pre-execution Commands in PowerShell +## Commandes pré-invite et pré-exécution personnalisées dans PowerShell -PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt : +Powershell n'a pas de système de préexec/précmd officiel comme la plupart des autres shells. C'est pourquoi il est difficile de fournir des hooks entièrement personnalisables dans `powershell`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt : -Create a function named `Invoke-Starship-PreCommand` +Créez une fonction nommée `Invoke-Starship-PreCommand` ```powershell function Invoke-Starship-PreCommand { @@ -67,35 +69,35 @@ function Invoke-Starship-PreCommand { } ``` -## Change Window Title +## Changer le titre de la fenêtre -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +Certaines commandes du shell changeront automatiquement le titre de la fenêtre (par exemple, pour refléter votre répertoire de travail). Fish le fait même par défaut. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. -First, define a window title change function (identical in bash and zsh): +Tout d'abord, définissez une fonction de changement de titre de fenêtre (identique en bash et zsh) : ```bash -function set_win_title(){ - echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +function set_titre_fenetre(){ + echo -ne "\033]0; VOTRE_TITRE_ICI\007" } ``` -You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). +Vous pouvez utiliser des variables pour personnaliser ce titre (`$USER`, `$HOSTNAME`, et `$PWD` sont des choix populaires). -In `bash`, set this function to be the precmd starship function: +Dans `bash`, définissez cette fonction comme la fonction précommande Starship : ```bash -starship_precmd_user_func="set_win_title" +starship_precmd_user_func="set_titre_fenetre" ``` -In `zsh`, add this to the `precmd_functions` array: +Dans `zsh`, ajoutez ceci au tableau `precmd_functions` : ```bash -precmd_functions+=(set_win_title) +precmd_functions+=(set_titre_fenetre) ``` -If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. +Si vous aimez le résultat, ajoutez ces lignes à votre fichier de configuration shell (`~/.bashrc` ou `~/.zshrc`) pour le rendre permanent. -For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: +Par exemple, si vous voulez afficher votre répertoire actuel dans le titre de l'onglet de votre terminal, ajoutez le code suivant à votre `~/.bashrc` ou `~/.zshrc`: ```bash function set_win_title(){ @@ -125,7 +127,7 @@ function Invoke-Starship-PreCommand { Invoke-Expression (&starship init powershell) ``` -## Enable Right Prompt +## Mettre l’invite à droite 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`. @@ -138,20 +140,20 @@ Note: The right prompt is a single line following the input location. To right a ```toml # ~/.config/starship.toml -# A minimal left prompt +# Une invite minimale à gauche format = """$character""" -# move the rest of the prompt to the right +# déplace le reste de l’invite à droite right_format = """$all""" ``` -Produces a prompt like the following: +Génère l’invite suivante: ``` ▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s ``` -## Continuation Prompt +## Invite de continuation Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote). @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Exemple @@ -176,26 +178,26 @@ continuation_prompt = "▶▶" ## Chaînes de style -Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: +Les chaînes de style sont une liste de mots, séparés par des espaces blancs. Les mots ne sont pas sensibles à la casse (` bold ` et ` boLd ` sont considérés comme la même string). Chaque mot peut être l'un des suivants : - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic (italique)` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +où `` est un spécificateur de couleur (discuté ci-dessous). `fg:` et `` font actuellement la même chose, bien que cela puisse changer dans le futur. `inverted` permute les couleurs de fond et de premier plan. L'ordre des mots dans le string n'a pas d'importance. -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +La valeur `none` remplace toutes les autres valeurs si elle n'est pas incluse dans un spécificateur `bg:`, de sorte que par exemple `fg: red none fg:blue` créera une chaîne sans style. `bg:none` définit l'arrière plan sur la couleur par défaut, donc `fg:red bg:none` est équivalent à `red` ou `fg:red` et `bg:green fg:red bg:none` est aussi équivalent à `fg:red` ou `red`. Il peut devenir une erreur d'utiliser `none` en conjonction avec d'autres jetons dans le futur. -A color specifier can be one of the following: +Un spécificateur de couleur peut être l'un des éléments suivants : - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- Un `#` suivi d'un nombre hexadécimal de six chiffres. Ceci spécifie un [ Code hexadécimal de couleur RVB ](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- Un nombre entre 0 et 255. Ceci spécifie un [code de couleur ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png). -If multiple colors are specified for foreground/background, the last one in the string will take priority. +Si plusieurs couleurs sont spécifiées pour le premier plan/arrière-plan, la dernière dans le string prendra la priorité. diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md index 94ca10c2..6581c702 100644 --- a/docs/fr-FR/config/README.md +++ b/docs/fr-FR/config/README.md @@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Toute la configuration de starship est faite dans ce fichier [TOML](https://github.com/toml-lang/toml): ```toml -# Insérer une ligne vide entre deux invites +# Inserts a blank line between shell prompts add_newline = true -# Remplacer le "❯" dans l'invite par "➜" -[character] # On configure le module appelé "character" -success_symbol = "[➜](bold green)" # Le segment "success_symbol" est configuré sur la valeur "➜" avec la couleur "bold green" (vert, gras) +# Replace the "❯" symbol in the prompt with "➜" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" -# Désactiver le module "package", pour le supprimer totalement de l'invite +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` @@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### Journalisation -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +Par défaut, Starship enregistre les avertissements et les erreurs dans un fichier nommé `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, où la clé de session correspond à une instance de votre terminal. Ceci peut cependant être modifié en utilisant la variable d'environnement `STARSHIP_CACHE`: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### Terminologie -**Module**: A component in the prompt giving information based on contextual information from your OS. 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**: Un composant dans l'invite donnant des informations basées sur des informations contextuelles à propos de votre Système d'Exploitation. Par exemple, le module "nodejs" montre la version de Node.js qui est actuellement installée sur votre ordinateur, si votre répertoire actuel est un projet 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**: Petits sous-composants qui contiennent des informations fournies par le module. Par exemple, la variable "version" dans le module "nodejs" contient la version actuelle de 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. +Par convention, la plupart des modules ont un préfixe de la couleur par défaut du terminal (par exemple `via` dans "nodejs") et un espace vide comme suffixe. ### Chaîne de formatage -Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. +Les chaînes de formatage sont le format avec lequel un module affiche toutes ses variables. La plupart des modules ont une entrée appelée `format` qui configure le format d'affichage du module. Vous pouvez utiliser des textes, des variables et des groupes de texte dans une chaîne de format. #### Variable -A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. +Une variable contient un symbole `$` suivi du nom de la variable. Le nom d’une variable peut seulement container des lettres, des nombres et `_`. -For example: +Par exemple : - `$version` est une chaîne de formatage avec une variable nommée `version`. - `$git_branch$git_commit` est une chaîne de formatage avec deux variables appelées `git_branch` et `git_commit`. @@ -83,13 +83,13 @@ For example: #### Groupe de texte -A text group is made up of two different parts. +Un groupe de texte se compose de deux parties différentes. -The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. +La première partie, qui est entourée dans un `[]`, est une [chaîne de formatage](#format-strings). Vous pouvez y ajouter des textes, des variables, ou même des groupes de texte imbriqués. -In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. +La deuxième partie, qui est entourée par `()`, est une [chaîne de style](#style-strings). Elle peut être utilisée pour styliser la première partie. -For example: +Par exemple : - `[on](red bold)` affichera une chaîne de caractères `on` avec un texte gras de couleur rouge. - `[⌘ $version](bold green)` affichera le symbole `⌘` suivi par le contenu de la variable `version`, en texte gras de couleur verte. @@ -97,7 +97,7 @@ For example: #### Chaînes de style -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +La plupart des modules de Starship vous permettent de configurer leurs styles d'affichage. Cela se fait avec une entrée (généralement appelée `style`) qui est une chaîne de caractères spécifiant la configuration. Voici quelques exemples de chaînes de style avec ce qu'elles font. Pour plus de détails sur la syntaxe complète, consultez le [guide de configuration avancé](/advanced-config/). - `"fg:green bg:blue"` définit un texte vert sur un fond bleu - `"bg:blue fg:bright-green"` définit un texte vert clair sur un fond bleu @@ -106,13 +106,13 @@ Most modules in starship allow you to configure their display styles. This is do - `"bold italic fg:purple"` définit le texte en italique et gras sur un fond violet - `""` désactive explicitement tous les styles -Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. +Notez que ce style sera contrôlé par votre émulateur de terminal. Par exemple, certains émulateurs de terminal éclairciront les couleurs au lieu de mettre le texte en gras, et certains thèmes de couleurs utilisent les mêmes valeurs pour les couleurs normales et claires. De plus, pour obtenir du texte italique, votre terminal doit prendre en charge l'italique. #### Chaînes de formatage conditionnel -A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. +Une chaîne de formatage conditionnel enveloppée dans `(` et `)` ne sera pas rendue si toutes les variables à l'intérieur sont vides. -For example: +Par exemple : - `(@$region)` n’affichera rien si la variable `region` est `None` or une chaine vide, sinon `@` suivi par la valeur de region. - `(some text)` ne montrera toujours rien puisqu'il n'y a pas de variables enveloppées dans les accolades. @@ -120,22 +120,22 @@ For example: #### Caractères spéciaux -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. +Les caractères suivants ont une utilisation spéciale dans les chaines de formatage et doivent être échappées : `$ \ [ ] ( )`. -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). +Notez que TOML a [à la fois des chaines basiques et des chaines littérales](https://toml.io/en/v1.0.0#string). Il est recommandé d'utiliser une chaine littérale (entourée de guillemets simples) dans votre configuration. Si vous voulez utiliser une chaîne basique (entourée de guillemets doubles), vous devez échapper l'antislash lui-même (c-à-d. utiliser `\\`). -For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: +Par exemple, lorsque vous voulez imprimer un symbole `$` sur une nouvelle ligne, les configurations suivantes pour le `formatage` sont équivalentes : ```toml -# with basic string +# avec la chaîne de base format = "\n\\$" -# with multiline basic string +# avec la chaîne de caractères de base multiligne format = """ \\$""" -# with literal string +# avec la chaîne littérale format = ''' \$''' @@ -143,7 +143,7 @@ format = ''' ## Invite -This is the list of prompt-wide configuration options. +Voici la liste des options de configuration de l'invite en lui-même. ### Options @@ -155,28 +155,27 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Délai maximal pour les commandes exécutées par starship (en millisecondes). | | `add_newline` | `true` | Insère une ligne vide entre les invites du shell. | - ### Exemple ```toml -# ~/.config/starship.toml +# ~/.config/starship. oml -# Use custom format +# Utilisez un format personnalisé format = """ [┌───────────────────>](bold green) [│](bold green)$directory$rust$package [└─>](bold green) """ -# Wait 10 milliseconds for starship to check files under the current directory. +# Attendez 10 millisecondes pour que starship vérifie les fichiers dans le répertoire de travail. scan_timeout = 10 -# Disable the blank line at the start of the prompt +# Désactive la nouvelle ligne au début de l'invite add_newline = false ``` ### Format par Défaut -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: +Le `format` par défaut est utilisé pour définir le format de l'invite, si il est vide ou mal `formaté`. La valeur par défaut est la suivante : ```toml format = "$all" @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -251,22 +252,22 @@ $shell\ $character""" ``` -If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Eg. +Si vous voulez étendre le format par défaut, pour pouvoir utiliser `$all` ; les modules que vous ajouter explicitement au format ne seront pas dupliqués. Par ex. ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +Le module `aws` affiche la région et le profil AWS courant. Ces informations sont basées sur les variables d'environnement `AWS_REGION`, `AWS_DEFAULT_REGION`, et `AWS_PROFILE` ainsi que le fichier `~/.aws/config`. Ce module affiche également un minuteur d'expiration lorsque vous utilisez des identifiants temporaires. -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. +Lorsque vous utilisez [aws-vault](https://github.com/99designs/aws-vault) le profil est lu à partir de la variable d'environnement `AWS_VAULT` et la date d'expiration des identifiants est lue à partir de la variable d'environnement `AWS_SESSION_EXPIRATION`. -When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. +Lorsque vous utilisez [awsu](https://github.com/kreuzwerker/awsu) le profil est lu depuis la variable d'environnement `AWSU_PROFILE`. -When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +Lorsque vous utilisez [AWSume](https://awsu.me) le profil est lu à partir de la variable d'environnement `AWSUME_PROFILE` et la date d'expiration des identifiants est lue à partir de la variable d'environnement `AWSUME_EXPIRATION`. ### Options @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemples @@ -359,7 +360,7 @@ style = "blue bold" ## Battery -The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. +Le module `battery` montre à quel point la batterie de l'appareil est chargée et son état de charge actuel. Ce module n'est visible que lorsque la batterie de l'appareil est inférieure à 10%. ### Options @@ -387,7 +388,7 @@ discharging_symbol = "💀 " ### Indicateur de batterie -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown: +L'option de configuration `display` est utilisée pour définir quand l'indicateur de batterie doit être affiché (threshold), quel symbole doit être utilisé (symbol) et à quoi il ressemble (style). Si aucun `display` n'est fourni. La valeur par défaut est la suivante : ```toml [[battery.display]] @@ -395,11 +396,11 @@ threshold = 10 style = "bold red" ``` -The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. +La valeur par défaut pour les options `charging_symbol` et `discharging_symbol` est respectivement la valeur des options `charging_symbol` et `discharging_symbol` du module `battery`. #### Options -The `display` option is an array of the following table. +L'option `display` est une array de la table suivante. | Option | Défaut | Description | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------- | @@ -411,29 +412,28 @@ The `display` option is an array of the following table. #### Exemple ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +Le module `character` affiche un caractère (habituellement une flèche) à côté de l'endroit où le texte est entré dans votre terminal. -The character will tell you whether the last command was successful or not. It can do this in two ways: +Le caractère vous dira si la dernière commande a été réussie ou pas. Cela peut être fait de deux manières: - changement de couleur (`red`/`green`) - changement de forme (`❯`/`✖`) -By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +Par défaut, il ne change que la couleur. Si vous désirez également changer sa forme, jetez un œil à [cet exemple](#with-custom-error-shape). ::: warning @@ -496,7 +496,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: +Le module `cmake` affiche la version actuellement installée de [CMake](https://cmake.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire actuel contient un fichier `CMakeLists.txt` - Le répertoire actuel contient un fichier ` CMakeCache.txt` @@ -522,11 +522,11 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ## COBOL / GNUCOBOL -The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met: +Le module `cobol` affiche la version de COBOL installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie : - Le répertoire courant contient un fichier finissant par `.cob` ou `.COB` - Le répertoire courant contiens un fichier finissant par `.cbl` ou `.CBL` @@ -552,37 +552,32 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ## Temps d'exécution -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. +Le module `cmd_duration` montre le temps qu'a pris la dernière commande a pris pour s'exécuter. Le module ne sera affiché que si la commande a pris plus de deux secondes, ou si la valeur de configuration `min_time` existe. -::: warning Do not hook the DEBUG trap in Bash +::: attention, n'accrochez pas la trappe DEBUG en Bash -If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. +Si vous utilisez starship en `bash`, n'accrochez pas `DEBUG` après avoir exécuté `eval $(starship init $0)`, ou ce module **cassera**. ::: -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. +Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent utiliser [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Définissez simplement les array `preexec_functions` et `precmd_functions` avant d'éxécuter `eval $(starship init $0)`, puis procédez comme d'habitude. ### Options -| Option | Défaut | Description | -| -------------------- | ----------------------------- | ------------------------------------------------------------------------- | -| `min_time` | `2_000` | Durée la plus courte quand afficher le temps (en millisecondes). | -| `show_milliseconds` | `false` | Afficher les millisecondes en plus des secondes pendant la durée. | -| `format` | `"took [$duration]($style) "` | Format du module. | -| `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Désactive le module `cmd_duration`. | -| `show_notifications` | `false` | Afficher les notifications du bureau lorsque la commande est terminée. | -| `min_time_to_notify` | `45_000` | Durée minimale après laquelle activer la notification (en millisecondes). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Option | Défaut | Description | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Durée la plus courte quand afficher le temps (en millisecondes). | +| `show_milliseconds` | `false` | Afficher les millisecondes en plus des secondes pendant la durée. | +| `format` | `"took [$duration]($style) "` | Format du module. | +| `style` | `"bold yellow"` | Le style du module. | +| `disabled` | `false` | Désactive le module `cmd_duration`. | +| `show_notifications` | `false` | Afficher les notifications du bureau lorsque la commande est terminée. | +| `min_time_to_notify` | `45_000` | Durée minimale après laquelle activer la notification (en millisecondes). | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | Le temps nécessaire pour exécuter la commande | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -605,11 +600,11 @@ format = "underwent [$duration](bold yellow)" ## Conda -The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. +Le module `conda` affiche l’environnement [Conda](https://docs.conda.io/en/latest/) courant, si `$CONDA_DEFAULT_ENV` est définie. ::: tip -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `conda config --set changeps1 False`. ::: @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -643,9 +638,41 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Options + +| Option | Défaut | Description | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | Le style du module. | +| `format` | "[$symbol \\[$name\\]]($style) " | Format du module. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| Variable | Exemple | Description | +| --------- | ------------------- | -------------------------------------- | +| name | `fedora-toolbox:35` | The name of the container | +| symbol | | Reflète la valeur de l'option `symbol` | +| style\* | | Reflète la valeur de l'option `style` | + +*: Cette variable peut uniquement être utilisée dans une chaine de style + +### Exemple + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal -The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `crystal` affiche la version actuellement installée de [Crystal](https://crystal-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `shard.yml` - Le répertoire courant contient un fichier `.cr` @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -684,7 +711,7 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `dart` affiche la version actuellement installée de [Dart](https://dart.dev/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `.dart` - Le répertoire courant contient un répertoire `.dart_tool` @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -724,7 +751,8 @@ format = "via [🔰 $version](bold red) " ## Deno -The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `deno` affiche la version actuellement installée de [Deno](https://deno.land/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Options @@ -759,11 +787,11 @@ format = "via [🦕 $version](green bold) " ## Dossier -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. +Le mode `directory` montre le chemin de votre dossier actuel, tronqué aux 3 dossiers parents. Votre répertoire sera également tronqué à la racine du repo git dans lequel vous vous trouvez actuellement. -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. +Quand vous utilisez le style pwd de fish, au lieu de cacher le chemin qui est tronqué, vous verrez un nom raccourci de chaque dossier basé sur le nombre établi pour l'option. -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`. +Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo, et l'option définie à `1`. Vous verrez maintenant `~/D/N/nixpkgs/pkgs`, alors que vous auriez vu `nixpkgs/pkgs` avant. ### Options @@ -782,7 +810,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |

-This module has a few advanced configuration options that control how the directory is displayed. +Ce module possède quelques options de configuration avancées qui contrôlent l'affichage du répertoire. | Options avancées | Défaut | Description | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -790,7 +818,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `fish_style_pwd_dir_length` | `0` | Le nombre de caractères à utiliser lors de l'application de la logique de troncature du pwd de fish. | | `use_logical_path` | `true` | Si `true` affiche le chemin logique issu du shell via `PWD` ou `--logical-path`. Si `false` renvoie plutôt le chemin du système de fichiers physique avec les liens symboliques résolus. | -`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. +`substitutions` vous permet de définir des remplacements arbitraires pour les chaînes littérales qui apparaissent dans le chemin, par exemple pour de longs préfixes de réseau ou des répertoires de développement (ex. Java). Notez que cela désactivera la PWD de style fish. ```toml [directory.substitutions] @@ -798,7 +826,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an "src/com/long/java/path" = "mypath" ``` -`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`. +`fish_style_pwd_dir_leng` interagit avec les options de troncature d'une manière qui peut être surprenante au début : si elle n'est pas nulle, les composantes du chemin qui seraient normalement tronquées sont affichées à la place avec autant de caractères. Par exemple, le chemin `/built/this/city/on/rock/and/roll`, qui devrait normalement être affiché comme `rock/and/roll`, sera affiché sous la forme de `/b/t/c/o/rock/and/roll` avec `fish_style_pwd_dir_length = 1`--les composants de chemin qui seraient normalement supprimés sont affichés avec un caractère unique. Pour `fish_style_pwd_dir_length = 2`, ce serait `/bu/th/ci/on/rock/and/roll`.
@@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | Le chemin du répertoire courant | | style\* | `"black bold dimmed"` | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -859,9 +887,9 @@ 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. +Le module `dotnet` montre la version pertinente du [SDK .NET Core](https://dotnet.microsoft.com/) pour le répertoire courant. Si le SDK a été épinglé dans le répertoire courant, la version épinglée est affichée. Sinon, le module affiche la dernière version installée du 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: +Par défaut, ce module ne sera affiché dans votre invite que lorsqu'un ou plusieurs des fichiers suivants sont présents dans le répertoire courant : - `global.json` - `project.json` @@ -872,9 +900,9 @@ By default this module will only be shown in your prompt when one or more of the - `*.fsproj` - `*.xproj` -You'll also need the .NET Core SDK installed in order to use it correctly. +Vous aurez également besoin du SDK .NET Core pour pouvoir l'utiliser correctement. -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. +En interne, ce module utilise son propre mécanisme de détection de version. Généralement, il est deux fois plus rapide que d'exécuter `dotnet --version`, mais il peut afficher une version incorrecte si votre projet .NET a une arborescence inhabituelle. Si la précision est plus importante que la vitesse, vous pouvez désactiver le mécanisme en définissant `heuristic = false` dans les options du module. The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Désactiver le module `status`. | @@ -2831,12 +2893,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2906,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2854,7 +2914,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. ::: @@ -2875,12 +2935,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple ```toml - # ~/.config/starship.toml [sudo] @@ -2890,7 +2949,7 @@ disabled = false ``` ```toml -# On windows +# Sous Windows # $HOME\.starship\config.toml [sudo] @@ -2900,7 +2959,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Le module est affiché si l'une de ces conditions est remplie : +Par défaut, le module `swift` affiche la version actuellement installée de [Swift](https://swift.org/). Le module est affiché si l'une de ces conditions est remplie : - Le répertoire courant contient un fichier `Package.swift` - Le répertoire actuel contient un fichier avec l'extension `.swift` @@ -2926,7 +2985,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -2974,7 +3033,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -2998,11 +3057,11 @@ format = "[🏎💨 $workspace]($style) " ## Date et Heure -The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. +Le module `time` affiche l'heure actuelle **localement**. La valeur de `format` est utilisée par le package [`chrono`](https://crates.io/crates/chrono) pour contrôler la façon dont l'heure est affichée. Consultez la [doc de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) pour découvrir les options disponibles. ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. ::: @@ -3018,7 +3077,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `disabled` | `true` | Désactiver le module `time`. | | `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Sinon, il est défini comme `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. ### Variables @@ -3027,7 +3086,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -3044,7 +3103,7 @@ time_range = "10:00:00-14:00:00" ## Nom d'utilisateur -The `username` module shows active user's username. Le module est affiché si l'une de ces conditions est remplie : +Le module `username` affiche le nom d'utilisateur de l'utilisateur actif. Le module est affiché si l'une de ces conditions est remplie : - L'utilisateur courant est root - L'utilisateur courant est différent de celui connecté @@ -3089,7 +3148,7 @@ show_always = true ## Vagrant -The `vagrant` module shows the currently installed version of [Vagrant](https://www.vagrantup.com/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `vagrant` affiche la version actuellement installée de [Vagrant](https://www.vagrantup.com/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `Vagrantfile` @@ -3114,7 +3173,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -3127,7 +3186,8 @@ format = "via [⍱ $version](bold white) " ## V -The `vlang` module shows you your currently installed version of [V](https://vlang.io/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `vlang` affiche la version de [V](https://vlang.io/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: + - Le répertoire courant contient un fichier avec l'extension `.v` - Le répertoire courant contient un fichier `v.mod`, `vpkg.json` ou `.vpkg-lock.json` @@ -3181,7 +3241,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Reflète la valeur de l'option `symbol` | | style\* | `black bold dimmed` | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -3194,7 +3254,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Le module est affiché si l'une de ces conditions est remplie : +Par défaut, le module `zig` affiche la version actuellement installée de [Zig](https://ziglang.org/). Le module est affiché si l'une de ces conditions est remplie : - Le répertoire courant contient un fichier `.zig` @@ -3219,7 +3279,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style ### Exemple @@ -3293,11 +3353,11 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | Reflète la valeur de l'option `symbol` | | style\* | Reflète la valeur de l'option `style` | -\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style +*: Cette variable peut uniquement être utilisée dans une chaine de style #### Commandes shell personnalisées -`shell` accepts a non-empty list of strings, where: +`shell` accepte une liste de chaînes non vide, où: - La première chaîne est le chemin vers le shell à utiliser pour exécuter la commande. - Other following arguments are passed to the shell. @@ -3330,13 +3390,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/fr-FR/faq/README.md b/docs/fr-FR/faq/README.md index 6cb3333a..48602395 100644 --- a/docs/fr-FR/faq/README.md +++ b/docs/fr-FR/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Pourquoi je vois des avertissements `Executing command "..." timed out.`? -Starship exécute différentes commandes pour obtenir les informations à afficher dans l'invite, par exemple la version d'un programme ou l'état actuel de git. Pour s’assurer que starship ne soit pas bloqué par l’exécution de ces commandes, nous mettons une limite de temps. Si une commande dépasse cette limite, starship va arrêter l’exécution de la commande et afficher l’avertissement ci-dessus, c’est un comportement attendu. Cette limite de temps est configurable en utilisant la [clé `command_timeout`](/config/#prompt) si vous souhaitez l’augmenter. Vous pouvez également suivre les étapes de débogage ci-dessous pour voir quelle commande est lente et voir si vous pouvez l’optimiser. Enfin, vous pouvez définir la variable `STARSHIP_LOG` à `error` pour masquer ces avertissements. +Starship exécute différentes commandes pour obtenir les informations à afficher dans l'invite, par exemple la version d'un programme ou l'état actuel de git. Pour s’assurer que starship ne soit pas bloqué par l’exécution de ces commandes, nous mettons une limite de temps. Si une commande dépasse cette limite, starship va arrêter l’exécution de la commande et afficher l’avertissement ci-dessus, c’est un comportement attendu. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. Vous pouvez également suivre les étapes de débogage ci-dessous pour voir quelle commande est lente et voir si vous pouvez l’optimiser. Enfin, vous pouvez définir la variable `STARSHIP_LOG` à `error` pour masquer ces avertissements. ## Je vois des symboles que je ne comprends pas et auxquels je ne m'attendais pas, que signifient-t-ils ? diff --git a/docs/fr-FR/guide/README.md b/docs/fr-FR/guide/README.md index 040ed913..3bc4a0e6 100644 --- a/docs/fr-FR/guide/README.md +++ b/docs/fr-FR/guide/README.md @@ -155,7 +155,7 @@ - **Universel:** fonctionne avec n'importe quel shell, sur n'importe quel système d'exploitation. - **Intelligent:** affiche les informations utiles en un coup d'œil. - **Riche en fonctionnalités:** supporte tous vos outils favoris. -- **Facile:** rapide à installer - commencez à l'utiliser en quelques minutes. +- **Facile:** rapide à installer – commencez à l'utiliser en quelques minutes.

Consultez la documentation de Starship  ▶ @@ -169,183 +169,251 @@ - Une police [Nerd Font](https://www.nerdfonts.com/) installée et activée dans votre terminal (Par exemple, essayez [Fira Code](https://www.nerdfonts.com/font-downloads)). -### Démarrage rapide +### Étape 1. Installer Starship -**Remarque**: en raison de la prolifération des plates-formes, seul un sous ensemble des plates-formes prises en charge sont montrées ci-dessous. Vous ne trouvez pas la vôtre? Jetez un œil aux [instructions pour les autres plates-formes](https://starship.rs/installing/). +Sélectionnez votre système d'exploitation dans la liste ci-dessous pour voir les instructions d'installation: -1. Installer l'exécutable **starship** : +

+Android +Install Starship using any of the following package managers: - #### Installer la dernière version +| Dépôt | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### Depuis une version pré-compilée, depuis le shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - Pour mettre à jour Starship, relancez le script ci-dessus. Cela remplacera la version actuelle sans toucher à la configuration de Starship. +| Distribution | Dépôt | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Note** - Les valeurs par défaut du script d'installation peuvent être remplacées, voir l'aide intégrée. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### Installer via le gestionnaire de paquets +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### Avec [Homebrew](https://brew.sh/): +| Distribution | Dépôt | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### Avec [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Ajoutez le script d’initialisation au fichier de configuration de votre shell: +Alternatively, install Starship using any of the following package managers: +| Dépôt | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Ajoutez ce qui suit à la fin de `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Dépôt | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Étape 2. Configurer votre shell pour Starship - Ajoutez ce qui suit à la fin de `~/.config/fish/config.fish`: +Configurez votre shell pour initialiser starship. Sélectionnez le vôtre dans la liste ci-dessous : - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Ajouter ce qui suit à la fin de `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Ajoutez ce qui suit à la fin de `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +Vous devez utiliser [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) avec Cmd. Créez un fichier avec le chemin `%LocalAppData%\clink\starship.lua` et le contenu suivant: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Ajoutez ce qui suit à la fin de `Microsoft.PowerShell_profile.ps1`. Vous pouvez vérifier l'emplacement de ce fichier en regardant la variable `$PROFILE` dans PowerShell. Habituellement, son chemin est `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` ou `~/.config/powershell/Microsoft.PowerShell_profile.ps1` sur -Nix. +Ajoutez ce qui suit à la fin de `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note : Seul Elvish v0.17+ est supporté - #### Ion +
- Ajoutez ce qui suit à la fin de `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +Ajoutez le code suivant à la fin de `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Attention** Seul elvish v0.17 et supérieur est pris en charge. Ajoutez ce qui suit à la fin de `~/.elvish/rc.elv`: +Ajouter ce qui suit à la fin de `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Ajoutez le code suivant à la fin de votre configuration de Nushell (trouvez-la en exécutant `config path`) : - Ajoutez ce qui suit à la fin de `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Ajoutez ce qui suit à la fin de votre configuration PowerShell (trouvez-la en exécutant `$PROFILE`) : - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Ajouter ce qui suit à la fin de `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Ajoutez ce qui suit à la fin de `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Ajouter ce qui suit à la fin de `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Seule la version nu v0.33 ou supérieure est prise en charge. Add the following to your nu config file. Vous pouvez vérifier l'emplacement de ce fichier en exécutant `config path` dans 'nu'. +Ajouter ce qui suit à la fin de `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Étape 3. Configurer Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 Contribuer -Nous sommes toujours à la recherche de contributeurs de **tous niveaux de compétence**! Si vous cherchez à faciliter votre entrée dans le projet, essayez un [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). +Nous sommes toujours à la recherche de contributeurs de **tous les niveaux de compétence**! Si vous cherchez à faciliter votre entrée dans le projet, essayez un [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). Si vous parlez couramment une langue autre que l'anglais, nous apprécions grandement toute aide pour que nos documents soient traduits et mis à jour dans d'autres langues. Si vous souhaitez nous aider, les traductions peuvent êtres suggérées sur le [Crowdin de Starship](https://translate.starship.rs/). -Si vous êtes intéressé pour aider et contribuer à Starship, veuillez jeter un coup d'œil à notre [Guide de contribution](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Aussi, n'hésitez pas à vous rendre sur notre [serveur Discord](https://discord.gg/8Jzqu3T) pour dire bonjour. 👋 +Si vous êtes intéressé à aider à contribuer à Starship, veuillez jeter un coup d'oeil à notre [Guide de contribution](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Aussi, n'hésitez pas à vous rendre sur notre [serveur Discord](https://discord.gg/8Jzqu3T) pour dire bonjour. 👋 ## 💭Inspiré par Jetez un œil aux précédents projets qui ont inspiré la création de starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Une invite de commande ZSH pour les astronautes. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Thème multi-shell robbyrussell écrit en JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - Un shell multi-plateformes de type powerline personnalisable avec des icônes. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


- Icône de fusée de Starship + Icône de roquette de Starship

## 📝 License -Copyright © 2019-présent, [Contributeurs Starship](https://github.com/starship/starship/graphs/contributors).
Ce projet est sous licence [ISC](https://github.com/starship/starship/blob/master/LICENSE). +Copyright © 2019-présent, [contributeurs de Starship](https://github.com/starship/starship/graphs/contributors).
Ce projet est sous licence [ISC](https://github.com/starship/starship/blob/master/LICENSE). diff --git a/docs/fr-FR/migrating-to-0.45.0/README.md b/docs/fr-FR/migrating-to-0.45.0/README.md index 7905621c..ce833b3b 100644 --- a/docs/fr-FR/migrating-to-0.45.0/README.md +++ b/docs/fr-FR/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ Pour que l'invite utilise l'ancienne configuration `use_symbol_for_status = true error_symbol = "[✖](bold red)" ``` -*Note:* L'élément `character` est automatiquement suivi d'un espace, donc à la différence des autres valeurs `format`, nous n'en ajoutons pas dans les exemples précédents. +_Note :_ L’élément `character` ajoute automatiquement une espace après lui, donc contrairement aux autres chaines `format`, nous n’en ajoutons pas une exprès dans les exemples de dessus. #### Temps d'exécution diff --git a/docs/fr-FR/presets/README.md b/docs/fr-FR/presets/README.md index 5ec6f496..ee1cc2f4 100644 --- a/docs/fr-FR/presets/README.md +++ b/docs/fr-FR/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/id-ID/README.md b/docs/id-ID/README.md index d6497f00..68e76ed2 100644 --- a/docs/id-ID/README.md +++ b/docs/id-ID/README.md @@ -18,7 +18,7 @@ features: footer: Berlisensi ISC | Hak Cipta © 2019-sekarang Kontributor Starship #Used for the description meta tag, for SEO metaTitle: "Starship: Prompt Lintas Shell" -description: Starship merupakan sebuah prompt yang minimal, super cepat, dan sangat bisa untuk dikustomisasi untuk shell apapun! Bisa menampilkan informasi yang kamu butuhkan, namun tetap bisa tampil dengan ramping dan minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell. +description: Starship merupakan sebuah prompt yang minimal, super cepat, dan sangat bisa untuk dikustomisasi untuk shell apapun! Bisa menampilkan informasi yang kamu butuhkan, namun tetap bisa tampil dengan ramping dan minimal. Pemasangan singkat tersedia untuk Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, dan PowerShell. ---
@@ -119,7 +119,7 @@ description: Starship merupakan sebuah prompt yang minimal, super cepat, dan san #### Elvish - ::: warning Only elvish v0.17 or higher is supported. ::: + ::: warning Hanya elvish v0.17 atau versi yang lebih baru yang mendapat dukungan pengembangan. ::: Tambahkan skrip berikut pada baris akhir `~/.elvish/rc.elv`: @@ -147,9 +147,9 @@ description: Starship merupakan sebuah prompt yang minimal, super cepat, dan san ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/id-ID/advanced-config/README.md b/docs/id-ID/advanced-config/README.md index 1d8fa808..f46f4939 100644 --- a/docs/id-ID/advanced-config/README.md +++ b/docs/id-ID/advanced-config/README.md @@ -32,11 +32,11 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## Kustomisasi Perintah pre-prompt dan pre-execution Pada Bash -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering: +Bash tidak memiliki framework preexec/precmd yang tetap seperti kebanyakan shell pada umumnya. Oleh karena itu, sulit halnya untuk membuat hook yang dapat dikustomisasi sepenuhnya di dalam `bash`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering: -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- Untuk menjalankan fungsi yang dikustomisasi tepat sebelum prompt, buatlah sebuah fungsi baru lalu berikan nama `starship_precmd_user_func` ke fungsi tersebut. Sebagai contoh, untuk menampilkan gambar roket sebelum prompt, kamu bisa melakukannya dengan cara ```bash function blastoff(){ @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- Untuk menjalankan fungsi yang dikustomisasi tepat sebelum commands berjalan, kamu bisa menggunakan [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Akan tetapi, kamu **harus** melakukan proses trap pada DEBUG signal _sebelum_ menjalankan Starship! Starship bisa menyimpan nilai dari DEBUG trap, tapi jika trap diganti setelah starship berjalan, beberapa fungsi akan rusak. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -67,35 +69,35 @@ function Invoke-Starship-PreCommand { } ``` -## Change Window Title +## Mengubah Judul Window -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +Beberapa prompt shell dengan otomatis akan mengubah judul window-nya untukmu (mis. untuk merefleksikan direktori kerjamu). Fish bahkan mengaturnya sebagai bawaan. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. -First, define a window title change function (identical in bash and zsh): +Pertama, buatlah fungsi untuk mengubah judul window (bekerja pada bash dan zsh): ```bash function set_win_title(){ - echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" + echo -ne "\033]0; JUDUL_WINDOW_MU \007" } ``` -You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). +Kamu bisa menggunakan variabel untuk mengkustomisasi judulnya (`$USER`, `$HOSTNAME`, dan `$PWD` adalah opsi yang populer). -In `bash`, set this function to be the precmd starship function: +Di dalam `bash`, atur fungsi berikut menjadi fungsi precmd untuk starship: ```bash starship_precmd_user_func="set_win_title" ``` -In `zsh`, add this to the `precmd_functions` array: +Dalam `zsh`, pada array `precmd_functions`, tambahkan: ```bash precmd_functions+=(set_win_title) ``` -If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. +Kalau kamu suka hasilnya, tambahkan baris (`~/.bashrc` or `~/.zshrc`) ke dalam file konfigurasi shell milikmu untuk membuatnya permanen. -For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: +Sebagai contoh, kalau kamu mau menampilkan lokasi direktori pada judul label terminalmu, tambahkan bagian berikut ke dalam `~/.bashrc` atau `~/.zshrc`: ```bash function set_win_title(){ @@ -145,7 +147,7 @@ format = """$character""" right_format = """$all""" ``` -Produces a prompt like the following: +Menghasilkan prompt seperti berikut: ``` ▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Contoh @@ -176,26 +178,26 @@ continuation_prompt = "▶▶" ## Menata String -Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: +Style strings are a list of words, separated by whitespace. Kumpulan katanya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +yang mana `` merupakan sebuah penentu warna (dibahas di bawah). `fg:` dan `` untuk saat ini memiliki fungsi yang sama, meskipun bisa berubah di kemudian hari. `inverted` menggantikan warna pada latar depan dan belakang. Urutan kata pada string tidak jadi masalah. -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +`none` bisa menimpa nilai token lainnya di dalam string jika Ia tidak termaksud dalam penentu warna pada `bg:` sebagai contoh, `fg:red none fg:blue` akan tetap menjadi string yang tidak memiliki penataan. `bg:none` menjadikan warna pada latar belakang sebagai warna bawaan. Jadi, nilai `fg:red bg:none` sama dengan `red` atau `fg:red` dan nilai `bg:green fg:red bg:none` juga sama dengan `fg:red` ataupun `red`. Mungkin akan jadi masalah untuk menggunakan `none` dengan token lainnya di kemudian hari. -A color specifier can be one of the following: +Penentuan warna bisa dilakukan dengan salah satu cara berikut: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- Menuliskannya dengan menggunakan `#` dan diikuti oleh enam digit angka hexadesimal. Spesifikasi [kode heksadesimal pada warna RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- Menggunakan bilangan antara 0-255. Spesifikasi [8-bit Kode Warna ANSI](https://i.stack.imgur.com/KTSQa.png). -If multiple colors are specified for foreground/background, the last one in the string will take priority. +Jika warna yang dipakai pada latar depan/latar belakang banyak, maka warna yang terbaru pada string yang akan diprioritaskan. diff --git a/docs/id-ID/config/README.md b/docs/id-ID/config/README.md index a9ad1b29..1eb77e06 100644 --- a/docs/id-ID/config/README.md +++ b/docs/id-ID/config/README.md @@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Seluruh konfigurasi starship dilakukan dalam file [TOML](https://github.com/toml-lang/toml) berikut: ```toml -# Menambahkan baris kosong antar prompt shell +# Inserts a blank line between shell prompts add_newline = true -# Mengganti simbol "❯" pada prompt dengan simbol "➜" -[character] # Nama modul yang dikonfigurasi adalah "character" -success_symbol = "[➜](bold green)" # Segmen "success_symbol" diganti menjadi "➜" dengan warna "bold green" +# Replace the "❯" symbol in the prompt with "➜" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" -# Menonaktifkan paket modul, menyembunyikannya dari prompt seutuhnya +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` @@ -41,10 +41,10 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### Logging -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +Secara bawaan, starship mencatat peringatan dan eror ke dalam sebuah file bernama `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, yang mana session key file tersebut sama dengan instance terminalmu. Namun, hal tersebut dapat diubah dengan menggunakan environment variable dari `STARSHIP_CACHE` berikut: ```sh -export STARSHIP_CACHE=~/.starship/cache +export STARSHIP_CONFIG=~/.starship/cache ``` Ekuivalen dalam PowerShell (Windows), tambahkan baris berikut pada `$PROFILE`: @@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### Terminologi -**Module**: A component in the prompt giving information based on contextual information from your OS. 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. +**Modul**: Sebuah komponen pada prompt yang memberikan informasi berdasarkan info kontekstual sistem operasimu. Sebagai contoh, modul "nodejs" menampilkan versi Node.js yang tengah terpasang pada komputermu, jika direktorimu sedang berada pada proyek 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. +**Variabel**: Sub-komponen yang terdiri dari informasi yang disediakan oleh modul. Sebagai contoh, variabel "version" dalam modul "nodejs" memuat versi terikini dari 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. +Secara konvensi, sebagian modul memiliki prefiks bawaan pada warna terminal (mis. `via` pada "nodejs") dan juga sebuah ruang kosong sebagai sufiks. ### Format String -Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. +Format string merupakan format yang sebuah modul gunakan untuk menampilkan semua variabelnya. Sebagian besar modul memiliki sebuah entri yang disebut `format` yang mengkonfigurasi format tampilan pada modul. Kamu bisa menggunakan teks, variabel, dan grup teks di dalam sebuah format string. #### Variabel -A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. +Variabel memilki simbol `$` yang diikuti dengan nama variabelnya. The name of a variable can only contain letters, numbers and `_`. -For example: +Sebagai contoh: - `$version` adalah format string dengan sebuah nama variabel `version`. - `$git_branch$git_commit` merupakan sebuah format string dengan dua variabel bernama `git_branch` dan `git_commit`. @@ -83,13 +83,13 @@ For example: #### Grup Teks -A text group is made up of two different parts. +Grup teks dibuat dengan dua bagian yang berbeda. -The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. +Bagian pertama, yang mana diapit dalam sebuah `[]`, merupakan sebuah [format string](#format-strings). Kamu bisa menambahkan teks, variabel, atau bahkan grup teks bercabang di dalamnya. -In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. +Pada bagian kedua, yang mana diapit dalam sebuah `()`, merupakan sebuah [penataan string](#style-strings). This can be used to style the first part. -For example: +Sebagai contoh: - `[on](red bold)` akan menampilkan string `on` dengan teks merah tebal. - `[⌘ $version](bold green)` akan menampilkan simbol `⌘` yang diikuti oleh variabel yang berisikan `version`, dengan teks tebal berwarna hijau. @@ -97,7 +97,7 @@ For example: #### Menata String -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +Sebagian besar modul starship memungkinkan kamu untuk mengkonfigurasi gaya tampilannya. Hal ini dilakukan dengan sebuah entri (biasanya `style`) yang konfigurasinya ditentukan oleh string. Berikut adalah beberapa contoh penataan pada string dan kegunaannya. Untuk detail sintaksis yang lebih lengkap, lihat [panduan konfigurasi lanjutan](/advanced-config/). - `"fg:green bg:blue"` mengeset teks berwana hijau pada latar biru - `"bg:blue fg:bright-green"` mengeset teks hijau terang pada latar biru @@ -106,13 +106,13 @@ Most modules in starship allow you to configure their display styles. This is do - `"bold italic fg:purple"` mengeset teks ungu miring tebal - `""` secara eksplisit menonaktifkan semua penataan gaya -Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. +Perhatikan bagaimana nantinya penataanmu akan terlihat pada emulator terminalmu. Sebagai contoh, beberapa terminal emulator alih-alih membuat warnanya lebih terang, malah menebalkan teksnya, dan sebagian palet warna ada yang menggunakan nilai yang sama untuk warna normal dan terangnya. Dan juga, untuk memakai teks miring, terminalmu harus menunjang teks miring. #### Format String Bersyarat (Conditional) -A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. +Sebuah string dengan format bersyarat dibungkus dengan `(` dan `)` tidak akan dijalankan jika variabel di dalamnya kosong. -For example: +Sebagai contoh: - `(@$region)` tidak akan menampilkan apapun jika nilai variabel `region` adalah `None` atau berupa string kosong, jika tidak, `@` diikuti dengan nilai dari region. - `(sembarang)` akan selalu tidak menampilkan apapun karena tidak ada variabel yang dibungkus dalam kurung kurawal. @@ -124,18 +124,18 @@ The following symbols have special usage in a format string and must be escaped: Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). -For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: +Sebagai contoh, ketika kamu ingin menampilkan simbol `$` pada sebuah baris baru, konfigurasi berikut sama halnya pada `format`: ```toml -# with basic string +# dengan string standar format = "\n\\$" -# with multiline basic string +# dengan string standar multibaris format = """ \\$""" -# with literal string +# dengan string literal format = ''' \$''' @@ -143,7 +143,7 @@ format = ''' ## Prompt -This is the list of prompt-wide configuration options. +Berikut adalah opsi konfigurasi dari list yang bersifat prompt-wide. ### Opsi @@ -155,28 +155,27 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Batas waktu untuk perintah yang dijalankan starship (dalam milidetik). | | `add_newline` | `true` | Memasukkan baris kosong antara prompt shell. | - ### Contoh ```toml # ~/.config/starship.toml -# Use custom format +# Menggunakan format yang dikustomisasi format = """ [┌───────────────────>](bold green) [│](bold green)$directory$rust$package [└─>](bold green) """ -# Wait 10 milliseconds for starship to check files under the current directory. +# Menunggu 10 milidetik untuk starship mencek file pada direktori terkini. scan_timeout = 10 -# Disable the blank line at the start of the prompt +# Menonaktifkan baris kosong di awal prompt add_newline = false ``` ### Format Prompt Bawaan -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: +Aturan `format` bawaan digunakan untuk mendefinisikan format pada prompt, apabila kosong atau tidak ada `format` yang diberikan. Aturannya seperti yang ditunjukkan: ```toml format = "$all" @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,18 +256,18 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +Module `aws` menampilkan region dan profil AWS terkini. Diperoleh dari variabel environment `AWS_REGION`, `AWS_DEFAULT_REGION`, dan `AWS_PROFILE` pada file `~/.aws/config`. Modul ini juga menampilkan penghitung waktu mundur kedaluwarsa ketika menggunakan temporer kredensial. -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. +Ketika menggunakan [aws-vault](https://github.com/99designs/aws-vault), profil dibaca dari variabel environment `AWS_VAULT` dan tanggal kedaluwarsanya dibaca dari variabel environment `AWS_SESSION_EXPIRATION`. -When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. +Ketika menggunakan [awsu](https://github.com/kreuzwerker/awsu) profil dibaca dari variabel environment `AWSU_PROFILE`. -When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +Ketika menggunakan [AWSume](https://awsu.me) profil dibaca dari variabel environment `AWSUME_PROFILE` dan tanggal kedaluwarsanya dibaca dari variabel environment `AWSUME_EXPIRATION`. ### Opsi @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -359,7 +360,7 @@ style = "blue bold" ## Baterai -The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. +Modul `battery` menampilkan seberapa penuh baterai perangkat terisi dan status pengisiannya. Modulnya hanya dapat terlihat ketika baterai perangkat di bawah 10%. ### Opsi @@ -387,7 +388,7 @@ discharging_symbol = "💀 " ### Tampilan Baterai -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown: +Opsi konfigurasi `display` digunakan untuk menentukan kapan indikator baterai harus ditampilkan (threshold), simbol mana yang akan digunakan (symbol), dan bagaimana seharusnya itu terlihat (style). Jika tidak ada `display` yang diberikan. Aturannya seperti yang ditunjukkan: ```toml [[battery.display]] @@ -395,11 +396,11 @@ threshold = 10 style = "bold red" ``` -The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. +Nilai bawaan untuk opsi `charging_symbol` dan `discharging_symbol` adalah nilai dari masing-masing opsi `charging_symbol` dan `discharging_symbol` dari nilai `battery`. #### Opsi -The `display` option is an array of the following table. +Opsi dari `display` merupakan sebuah array dari tabel berikut. | Opsi | Bawaan | Deskripsi | | -------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------- | @@ -411,29 +412,28 @@ The `display` option is an array of the following table. #### Contoh ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Karakter -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +Modul `character` menampilkan sebuah karakter (biasanya anak panah) di samping teks pada terminalmu. -The character will tell you whether the last command was successful or not. It can do this in two ways: +Karakter dapat memberitahu kamu apakah perintah terakhir berhasil atau tidak. Karakter dapat memberitahumu dengan dua cara ini: - mengganti warna (`red`/`green`) - mengganti bentuk (`❯`/`✖`) -By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +Secara bawaan karakter hanya dapat mengganti warna. Jika kamu juga ingin mengganti bentuknya, perhatikan [contoh](#with-custom-error-shape) berikut. ::: peringatan @@ -496,7 +496,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: +Modul `cmake` menampilkan versi terkini dari [CMake](https://cmake.org/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: - Direktori terkini yang berisikan sebuah file `CMakeLists.txt` - Direktori terkini yang berisikan sebuah file `CMakeCache.txt` @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ## COBOL / GNUCOBOL @@ -552,37 +552,32 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ## Durasi Perintah -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. +Modul `cmd_duration` menampilkan seberapa lama perintah sebelumnya membutuhkan waktu untuk dilaksanakan. Modulnya hanya akan ditampilkan jika perintahnya membutuhkan waktu lebih dari dua detik, atau ada nilai dari konfigurasi `min_time`. -::: warning Do not hook the DEBUG trap in Bash +::: jangan lakukan hook DEBUG trap dalam Bash -If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. +Jia kamu menjalankan Starship di `bash`, jangan lakukan hook DEBUG trap setelah menjalankan `eval $(starship init $0)`, atau modulnya **akan** rusak. ::: -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. +Pengguna Bash yang membutuhkan fungsi seperti preexec dapat menggunakan [kerangka kerja bash_preexec dari rcaloras](https://github.com/rcaloras/bash-preexec). Cukup dengan membuat array `preexec_functions` dan `precmd_functions` sebelum menjalankan `eval $(starship init $0)`, lalu lanjutkan seperti biasa. ### Opsi -| Opsi | Bawaan | Deskripsi | -| -------------------- | ----------------------------- | ---------------------------------------------------------------- | -| `min_tim` | `2_000` | Durasi terpendek untuk menampilkan waktu (dalam milidetik). | -| `show_milliseconds` | `false` | Tampilkan milidetik sebagai ganti detik untuk durasinya. | -| `format` | `"took [$duration]($style) "` | Format dari modul. | -| `style` | `"bold yellow"` | Gaya penataan untuk modul. | -| `disabled` | `false` | Menonaktifkan modul `cmd_duration`. | -| `show_notifications` | `false` | Menampilkan notifikasi layar ketika perintah selesai. | -| `min_time_to_notify` | `45_000` | Durasi terpendek untuk menampilkan notifikasi (dalam milidetik). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Opsi | Bawaan | Deskripsi | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_tim` | `2_000` | Durasi terpendek untuk menampilkan waktu (dalam milidetik). | +| `show_milliseconds` | `false` | Tampilkan milidetik sebagai ganti detik untuk durasinya. | +| `format` | `"took [$duration]($style) "` | Format dari modul. | +| `style` | `"bold yellow"` | Gaya penataan untuk modul. | +| `disabled` | `false` | Menonaktifkan modul `cmd_duration`. | +| `show_notifications` | `false` | Menampilkan notifikasi layar ketika perintah selesai. | +| `min_time_to_notify` | `45_000` | Durasi terpendek untuk menampilkan notifikasi (dalam milidetik). | +| `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. | ### Variabel @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | Waktu yang dibutuhkan untuk menyelesaikan perintah | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -607,9 +602,9 @@ format = "underwent [$duration](bold yellow)" The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. -::: tip +::: saran -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Hal ini tidak menahan pengubah (modifier) prompt dari conda sendiri, kamu mungkin bisa menjalankan `conda config --set changeps1 False`. ::: @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -643,9 +638,41 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Opsi + +| Opsi | Bawaan | Deskripsi | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | Gaya penataan untuk modul. | +| `format` | "[$symbol \\[$name\\]]($style) " | Format dari modul. | +| `disabled` | `false` | Disables the `container` module. | + +### Variabel + +| Variabel | Contoh | Deskripsi | +| --------- | ------------------- | --------------------------------- | +| name | `fedora-toolbox:35` | The name of the container | +| symbol | | Menyalin nilai dari opsi `symbol` | +| style\* | | Menyalin nilai dari opsi `style` | + +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string + +### Contoh + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal -The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: +Modul `crystal` menampilkan versi terkini dari [Crystal](https://crystal-lang.org/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: - Direktori terkini yang berisikan sebuah file `shard.yml` - Direktori terkini yang berisikan sebuah file `.cr` @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -684,7 +711,7 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: +Modul `dart` menampilkan versi terkini dari [Dart](https://dart.dev/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: - Direktori terkini yang berisikan sebuah file berekstensi `.dart` - Direktori terkini yang berisikan sebuah direktori `dart_tool` @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -724,7 +751,8 @@ format = "via [🔰 $version](bold red) " ## Deno -The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: +Modul `deno` menampilkan versi terkini dari [Deno](https://deno.land/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Opsi @@ -759,11 +787,11 @@ format = "via [🦕 $version](green bold) " ## Direktori -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. +Modul `directory` menampilkan arah ke direkori terkinimu, disingkat ke tiga folder induk. Direkrotimu juga akan disingkat ke root dari git repo di tempatmu berada saat ini. -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. +Ketika kamu menggunakan penataan pwd option fish, alih-alih menyembunyikan jalur yang disingkat, kamu akan melihat nama yang disingkat untuk tiap-tiap direktori berdasarkan dari jumlah nomor yang kamu aktifkan untuk opsi tersebut. -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`. +Sebagai contoh, untuk `~/Dev/Nix/nixpkgs/pkgs` dimana `nixpkgs` merupakan root repo-nya, dan lalu opsinya diset menjadi `1`. Kamu akan melihat `~/D/N/nixpkgs/pkgs`, sedangkan sebelumnya direktori tersebut harusnya `nixpkgs/pkgs`. ### Opsi @@ -782,7 +810,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |
-This module has a few advanced configuration options that control how the directory is displayed. +Modul ini memilki beberapa opsi konfigurasi lanjutan yang mengontrol bagaimana direktori ditampilkan. | Advanced Option | Bawaan | Deskripsi | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | Direktori terkini | | style\* | `"black bold dimmed"` | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -859,9 +887,9 @@ 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. +Modul `dotnet` menampilkan informasi terkait versi dari [.NET Core SDK](https://dotnet.microsoft.com/) pada direktori terkini. Apabila SDK telah disematkan pada direktori terkni, maka veri yang telah disematkan tersebutlah yang ditampilkan. Jika tidak, maka modul akan menampilkan versi SDK terkini. -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: +Secara bawaan, modul ini hanya akan ditampilkan ke prompt kamu ketika teradapat satu atau lebih file berikut di dalam direktorimu saat ini: - `global.json` - `project.json` @@ -872,11 +900,11 @@ By default this module will only be shown in your prompt when one or more of the - `*.fsproj` - `*.xproj` -You'll also need the .NET Core SDK installed in order to use it correctly. +Kamu juga perlu memasang .NET Core SDK untuk menggunakannya dengan baik. -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. +Secara internal, modul ini menggunakan mekenasimenya sendiri untuk melakukan pendeteksian versi. Biasanya, hal ini dua kali lebih cepat seperti untuk menjalankan `dotnet --version`, tetapi ada kemungkinan hal ini akan menampilkan versi yang salah jika proyek .NET milikmu memiliki tata letak direktori yang tidak biasa. Jika menurutmu akurasi lebih penting dari kecepatan, kamu dapat menonaktifkan mekanisme tersebut dengan mengatur `heuristic = false` di dalam opsi modul. -The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. +Modul ini juga akan menampilkan Target Framework Moniker () ketika terdapat sebuah file csproj di dalam direktori terkini. ### Opsi @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh ```toml - # ~/.config/starship.toml [status] @@ -2845,14 +2905,13 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: tip +::: saran This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2941,7 +2999,7 @@ format = "via [🏎 $version](red bold)" The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. -::: tip +::: saran By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). @@ -2974,7 +3032,7 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -3000,7 +3058,7 @@ format = "[🏎💨 $workspace]($style) " The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. -::: tip +::: saran This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -3051,7 +3109,7 @@ The `username` module shows active user's username. The module will be shown if - The user is currently connected as an SSH session - The variable `show_always` is set to true -::: tip +::: saran SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | `black bold dimmed` | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -3189,7 +3248,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = "via [✨ $repo](bold blue) " ``` ## Zig @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -3242,19 +3301,19 @@ These modules will be shown if any of the following conditions are met: - The `when` command returns 0 - The current Operating System (std::env::consts::OS) matchs with `os` field if defined. -::: tip +::: saran Multiple custom modules can be defined by using a `.`. ::: -::: tip +::: saran The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. ::: -::: tip +::: saran [Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there! @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | Menyalin nilai dari opsi `symbol` | | style\* | Menyalin nilai dari opsi `style` | -\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/id-ID/faq/README.md b/docs/id-ID/faq/README.md index ccae2c21..ffe94b22 100644 --- a/docs/id-ID/faq/README.md +++ b/docs/id-ID/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## I see symbols I don't understand or expect, what do they mean? diff --git a/docs/id-ID/guide/README.md b/docs/id-ID/guide/README.md index eb29c5ba..b98fe001 100644 --- a/docs/id-ID/guide/README.md +++ b/docs/id-ID/guide/README.md @@ -2,7 +2,7 @@ Starship – Cross-shell prompt

@@ -10,12 +10,12 @@ GitHub Actions workflow status Crates.io version Chat on Discord Follow @StarshipPrompt on Twitter

- Website + Situs Web · - Installation + Pemasangan · - Configuration + Konfigurasi

@@ -150,202 +150,270 @@ **Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!** -- **Fast:** it's fast – _really really_ fast! 🚀 +- **Cepat:** Starship itu cepat – _sangat sangat_ cepat! 🚀 - **Customizable:** configure every aspect of your prompt. -- **Universal:** works on any shell, on any operating system. -- **Intelligent:** shows relevant information at a glance. -- **Feature rich:** support for all your favorite tools. -- **Easy:** quick to install – start using it in minutes. +- **Universal:** bekerja pada shell apapun, pada sistem operasi apa saja. +- **Cerdas:** menampilkan sekilas informasi yang relevan. +- **Kaya akan fitur:** dukungan untuk semua alat favoritmu. +- **Mudah:** pemasangan singkat – mulai menggunakannya dalam hitungan menit.

-Explore the Starship docs  ▶ +Jelajahi dokumentasi Starship  ▶

-## 🚀 Installation +## 🚀 Pemasangan ### Prasyarat -- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). +- Sebuah [Nerd Font](https://www.nerdfonts.com/) terpasang dan aktif pada terminal (contohnya, coba [Nerd Font Fira Code](https://www.nerdfonts.com/font-downloads)). -### Getting Started +### Langkah 1. Pasang Starship -**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/). +Select your operating system from the list below to view installation instructions: -1. Instalasi dengan menggunakan binary **starship**: +
+Android +Install Starship using any of the following package managers: - #### Pasang Versi Terbaru +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### From prebuilt binary, with Shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - Untuk memperbarui Starship, jalankan kembali skrip di atas. Hal ini dapat memperbarui versi yang terpasang tanpa menyentuh konfigurasi Starship. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Note** - The defaults of the install script can be overridden see the built-in help. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### Pasang Melalui Package Manager +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### Dengan [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### Dengan [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Tambahkan skrip init ke file konfigurasi Shell: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Tambahkan skrip berikut pada baris akhir `~/.bashrc:`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Langkah 2. Setup your shell to use Starship - Tambahkan skrip berikut pada baris akhir `~/.config/fish/config.fish`: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Tambahkan skrip berikut pada baris akhir `~/.bashrc:`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Tambahkan skrip berikut pada baris akhir `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Tambahkan skrip berikut pada baris akhir `Microsoft.PowerShell_profile.ps1`. Kamu dapat mengecek lokasi file tersebut dengan mencari tahu keberadaan variabel `$PROFILE` di dalam PowerShell. Biasanya, lokasi file tersebut berada di `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` atau `~/.config/powershell/Microsoft.PowerShell_profile.ps1` pada -Nix. +Tambahkan skrip berikut pada baris akhir `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- Tambahkan skrip berikut pada baris akhir `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +Tambahkan skrip berikut pada baris akhir `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. Tambahkan skrip berikut pada baris akhir `~/.elvish/rc.elv`: +Tambahkan skrip berikut pada baris akhir `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - Tambahkan skrip berikut pada baris akhir `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Tambahkan skrip berikut pada baris akhir `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Tambahkan skrip berikut pada baris akhir `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Tambahkan skrip berikut pada baris akhir `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Hanya nu versi v0.33 atau versi terbaru yang mendapat dukungan pengembangan. Add the following to your nu config file. Lokasi dari file ini dapat dicek dengan menjalankan `config path` pada nu. +Tambahkan skrip berikut pada baris akhir `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` -## 🤝 Contributing +
+ +### Langkah 3. Konfigurasi Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +Jika kamu ingin mengkustomisasi Starship lebih jauh: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others + +## 🤝 Berkontribusi We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). -If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋 +Jika kamu tertarik untuk membantu berkontribusi ke starship, silakan lihat [Pedoman Berkontribusi](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) kami. Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋 -## 💭 Inspired By +## 💭 Terinspirasi Oleh Please check out these previous works that helped inspire the creation of starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


- Starship rocket icon + Ikon roket Starship

-## 📝 License +## 📝 Lisensi Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed. diff --git a/docs/id-ID/migrating-to-0.45.0/README.md b/docs/id-ID/migrating-to-0.45.0/README.md index 89589729..5f5feda6 100644 --- a/docs/id-ID/migrating-to-0.45.0/README.md +++ b/docs/id-ID/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ Untuk mengkonfigurasi prompt agar menggunakan konfigurasi `use_symbol_for_status error_symbol = "[✖](bold red)" ``` -*Catatan:* Element `character` secara otomatis menambahkan sebuah spasi setelahnya, jadi tidak seperti `format` string yang lain, kami secara spesifik tidak menambahkannya pada contoh di atas. +_Catatan:_ Element `character` secara otomatis menambahkan sebuah spasi setelahnya, jadi tidak seperti `format` string yang lain, kami secara spesifik tidak menambahkannya pada contoh di atas. #### Durasi Perintah diff --git a/docs/id-ID/presets/README.md b/docs/id-ID/presets/README.md index 13891c39..9f47c889 100644 --- a/docs/id-ID/presets/README.md +++ b/docs/id-ID/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/it-IT/README.md b/docs/it-IT/README.md index 71e3cbdd..aa7df175 100644 --- a/docs/it-IT/README.md +++ b/docs/it-IT/README.md @@ -119,7 +119,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per #### Elvish - ::: warning Only elvish v0.17 or higher is supported. ::: + ::: warning È supportato solo elvish v0.17 o superiore. ::: Aggiungi quanto segue alla fine di `~/.elvish/rc.elv`: @@ -147,9 +147,9 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/it-IT/advanced-config/README.md b/docs/it-IT/advanced-config/README.md index a944c2db..2a864db8 100644 --- a/docs/it-IT/advanced-config/README.md +++ b/docs/it-IT/advanced-config/README.md @@ -32,11 +32,11 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## Comandi personalizzati di pre-prompt e pre-esecuzione per Bash -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Tuttavia, Starship dà la limitata possibilità di inserire le tue funzioni nella procedura prompt-rendering: +Bash non ha un framework preexec/precmd formale come la maggior parte delle altre shell. Per questo motivo, è difficile fornire hook completamente personalizzabile in `bash`. Tuttavia, Starship dà la limitata possibilità di inserire le tue funzioni nella procedura prompt-rendering: -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- Per eseguire una funzione personalizzata a destra del prompt prima che venga disegnato, definisci una nuova funzione e assegna il suo nome a `starship_precmd_user_func`. Per esempio, per visualizzare l'icona di un razzo prima del prompt, si può usare il codice seguente ```bash function blastoff(){ @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- Per eseguire una funzione personalizzata prima dell'esecuzione di un comando, è possibile utilizzare il meccanismo trappola [`DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Tuttavia, **devi** intrappolare il segnale DEBUG _prima di_ inizializzare Starship! Starship può preservare il valore trappola di DEBUG, ma se la trappola viene sovrascritta dopo l'avvio di Starship, alcune funzionalità non funzioneranno. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -67,35 +69,35 @@ function Invoke-Starship-PreCommand { } ``` -## Change Window Title +## Cambia il titolo della finestra -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +Alcune shell prompt cambieranno automaticamente il titolo della finestra (ad esempio per riflettere la directory di lavoro). Fish lo fa per impostazione predefinita. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. -First, define a window title change function (identical in bash and zsh): +Innanzitutto, bisogna definire una funzione per il cambio del titolo della finestra (identica sia per bash che zsh): ```bash function set_win_title(){ - echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" + echo -ne "\033]0; IL_TUO_TITOLO_QUI \007" } ``` -You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). +Puoi usare delle variabili per personalizzare questo titolo (`$USER`, `$HOSTNAME`, e `$PWD` sono le scelte più popolari). -In `bash`, set this function to be the precmd starship function: +In `bash`, impostare questa funzione per essere la precmd Starship function: ```bash starship_precmd_user_func="set_win_title" ``` -In `zsh`, add this to the `precmd_functions` array: +In `zsh`, aggiungi questo `precmd_functions` all'array: ```bash precmd_functions+=(set_win_title) ``` -If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. +Se ti piace il risultato, aggiungi queste righe al tuo file shell di configurazione (`~/.bashrc` o `~/.zshrc`) per renderlo permanente. -For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: +Ad esempio, se desideri visualizzare la directory corrente nel titolo della scheda del terminale, aggiungi la seguente snippet al tuo `~/.bashrc` or `~/.zshrc`: ```bash function set_win_title(){ @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Esempio @@ -176,26 +178,26 @@ continuation_prompt = "▶▶" ## Stile delle Stringhe -Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: +Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le parole non sono sensibili alle maiuscole (cioè `grassetto` e `BoLd` sono considerate la stessa stringa). Ogni parola può essere una delle seguenti: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +dove `` è un colore specifico (discusso in seguito). `fg:` e `` attualmente fanno la stessa cosa, anche se questo potrebbe cambiare in futuro. `inverted` scambia lo sfondo e i colori in primo piano. L'ordine delle parole nella stringa non conta. -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +Il token `none` sovrascrive tutti gli altri token in una stringa se non fa parte di uno specificatore `bg:`, così ad esempio `fg:red none fg:blue` creerà una stringa senza stile. `bg:none` imposta come colore di sfondo quello predefinito così `fg:red bg:none` è equivalente a `red` o `fg:red` e `bg:green fg:red bg:none` è equivalente a `fg:red` o `red`. Potrà diventare un errore usare `none` in combinazione con altri token in futuro. -A color specifier can be one of the following: +Uno colore specifico può essere uno di questi: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- Un `#` seguito da un valore esadecimale a sei cifre. Questo specifica un [colore esagesimale in RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- Un numero compreso tra 0-255. Specifica un [codice colore ANSI a 8 bit](https://i.stack.imgur.com/KTSQa.png). -If multiple colors are specified for foreground/background, the last one in the string will take priority. +Se sono specificati più colori per il primo piano/sfondo, l'ultimo nella stringa avrà la priorità. diff --git a/docs/it-IT/config/README.md b/docs/it-IT/config/README.md index d585e171..7feea0f2 100644 --- a/docs/it-IT/config/README.md +++ b/docs/it-IT/config/README.md @@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Tutta la configurazione per starship è fatta in questo file [TOML](https://github.com/toml-lang/toml): ```toml -# Inserisce una riga vuota tra gli prompt della shell +# Inserts a blank line between shell prompts add_newline = true -# Sostituisci il simbolo "❯" nel prompt con "➜" -[character] # Il nome del modulo che stiamo configurando è "character" -success_symbol = "[➜](grassetto)" # Il segmento "success_symbol" è impostato a "➜" con il colore "bold green" +# Replace the "❯" symbol in the prompt with "➜" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" -# Disabilita il modulo del pacchetto, nasconderlo dal prompt completamente +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` @@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### Logging -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +Per impostazione predefinita, starship salva i warning e gli errori in un file chiamato `~/.cache/starship/session_${STARSHIP_SESSION_KEY}. og`, dove la chiave di sessione è corrispondente a un'istanza del tuo terminale. Questo, tuttavia, può essere modificato utilizzando la variabile di ambiente `STARSHIP_CACHE`: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### Terminologia -**Module**: A component in the prompt giving information based on contextual information from your OS. 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. +**Modulo**: Un componente nel prompt che dà informazioni basate su informazioni contestuali dal tuo sistema operativo. Ad esempio, il modulo "nodejs" mostra la versione di Node.js attualmente installata sul computer, se la directory corrente è un progetto 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**: Sotto-componenti più piccoli che contengono informazioni fornite dal modulo. Per esempio, la variabile "version" nel modulo "nodejs" contiene la versione corrente di 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. +Per convenzione, la maggior parte dei moduli ha un prefisso di colore predefinito del terminale (ad esempio `via` in "nodejs") e uno spazio vuoto come suffisso. ### Formato Stringhe -Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. +Le stringhe di formato sono il formato con cui un modulo stampa tutte le sue variabili. La maggior parte dei moduli ha una voce chiamata `formato` che configura il formato di visualizzazione del modulo. È possibile utilizzare testi, variabili e gruppi di testo in una stringa di formato. #### Variable -A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. +Una variabile contiene un simbolo `$` seguito dal nome della variabile. The name of a variable can only contain letters, numbers and `_`. -For example: +Per esempio: - `$version` è una stringa di formato con una variabile chiamata `version`. - `$git_branch$git_commit` è una stringa di formato con due variabili denominate `git_branch` e `git_commit`. @@ -83,13 +83,13 @@ For example: #### Gruppo Testo -A text group is made up of two different parts. +Un gruppo di testo è composto da due parti diverse. -The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. +La prima parte, che è racchiusa tra `[]`, è una [format string](#format-strings). È possibile aggiungere testi, variabili o anche gruppi annidati di testo. -In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. +Nella seconda parte, che è racchiusa tra `()`, è presente una [style string](#style-strings). Questa può essere usata per modificare lo stile della prima parte. -For example: +Per esempio: - `[on](rosso grassetto)` stamperà una stringa `on` con testo in grassetto di colore rosso. - `[⌘ $version](grassetto verde)` stamperà un simbolo `⌘` seguito dal contenuto della variabile `version`, con testo grassetto di colore verde. @@ -97,7 +97,7 @@ For example: #### Stile delle Stringhe -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +La maggior parte dei moduli in starship ti permettono di configurare i loro stili di visualizzazione. Questo viene fatto con una voce (solitamente chiamata `style`) che è una stringa che specifica la configurazione. Ecco alcuni esempi di stringhe di stile per quello che fanno. Per maggiori dettagli sulla sintassi completa, consulta la [guida di configurazione avanzata](/advanced-config/). - `"fg:green bg:blue"` imposta il testo verde su uno sfondo blu - `"bg:blue fg:bright-green"` imposta un testo verde brillante su uno sfondo blu @@ -106,13 +106,13 @@ Most modules in starship allow you to configure their display styles. This is do - `"bold italic fg:purple"` imposta il testo viola in corsivo e grassetto - `""` disabilita esplicitamente tutti gli stili -Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. +Nota che quello che assomiglia allo stile sarà controllato dal tuo emulatore terminale. Ad esempio, alcuni emulatori di terminale renderanno luminosi i colori invece del testo in grassetto, e alcuni temi colorati useranno gli stessi valori per i colori normali e luminosi. Inoltre, per ottenere il testo in corsivo, il tuo terminale deve supportare il corsivo. #### Formattazione condizionale delle stringhe -A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. +Una stringa di formato condizionale inserita in `(` e `)` non verrà presentata se tutte le variabili interne sono vuote. -For example: +Per esempio: - `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. - `(some text)` will always show nothing since there are no variables wrapped in the braces. @@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Timeout per i comandi eseguiti da starship (in millisecondi). | | `add_newline` | `true` | Inserisce una riga vuota tra i prompt della shell. | - ### Esempio ```toml @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | 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 +*: This variable can only be used as a part of a style string ### Examples @@ -411,17 +412,16 @@ The `display` option is an array of the following table. #### Esempio ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 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 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 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 +*: This variable can only be used as a part of a style string ## Durata del comando @@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Opzioni -| Opzione | Default | Descrizione | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | -| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `cmd_duration` module. | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Opzione | Default | Descrizione | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Esempio @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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 +*: This variable can only be used as a part of a style string ### Esempio @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Opzioni + +| Opzione | Default | Descrizione | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | Lo stile per il modulo. | +| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| Variable | Esempio | Descrizione | +| --------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| 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 + +### Esempio + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 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 +*: This variable can only be used as a part of a style string ### Esempio @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 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 +*: This variable can only be used as a part of a style string ### Esempio @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Opzioni @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Esempio @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | 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 +*: This variable can only be used as a part of a style string ### Esempio @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Esempio ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2905,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Esempio ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | 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 +*: This variable can only be used as a part of a style string ### Esempio @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | 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 +*: This variable can only be used as a part of a style string ### Esempio @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | ora | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Esempio @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 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 +*: This variable can only be used as a part of a style string ### Esempio @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Mirrors the value of option `symbol` | | style\* | `black bold dimmed` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Esempio @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | 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 +*: This variable can only be used as a part of a style string ### Esempio @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 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 +*: This variable can only be used as a part of a style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/it-IT/faq/README.md b/docs/it-IT/faq/README.md index 21fbfc7b..d5d9deef 100644 --- a/docs/it-IT/faq/README.md +++ b/docs/it-IT/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## Vedo simboli che non capisco o mi aspetto, cosa significano? diff --git a/docs/it-IT/guide/README.md b/docs/it-IT/guide/README.md index 6db39f9d..9670e8b6 100644 --- a/docs/it-IT/guide/README.md +++ b/docs/it-IT/guide/README.md @@ -103,7 +103,7 @@ >Português do Brasil   Русский   +Android +Install Starship using any of the following package managers: - #### Installa l'ultima Versione +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### Da un binario precompilato, con Shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - Per aggiornare Starship stesso, riavviare lo script sopra. Sostituirà la versione corrente senza toccare la configurazione di Starship. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Nota** - I valori predefiniti dello script di installazione possono essere sovrascritti, vedi la guida integrata. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### Installa via Package Manager +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### Con [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### Con [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Aggiungi lo script di inizializzazione al file di configurazione della shell: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Aggiungi quanto segue alla fine di `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - Aggiungi quanto segue alla fine di `~/.config/fish/config.fish`: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Aggiungi quanto segue alla fine di `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Aggiungi quanto segue alla fine di `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Aggiungi quanto segue alla fine di `Microsoft.PowerShell_profile.ps1`. Puoi controllare la posizione di questo file interrogando la variabile `$PROFILE` in PowerShell. Tipicamente il percorso è `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oppure `~/.config/powershell/Microsoft.PowerShell_profile.ps1` su -Nix. +Aggiungi quanto segue alla fine di `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- Aggiungi quanto segue alla fine di `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +Aggiungi quanto segue alla fine di `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. Aggiungi quanto segue alla fine di `~/.elvish/rc.elv`: +Aggiungi quanto segue alla fine di `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - Aggiungi quanto segue alla fine di `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Aggiungi quanto segue alla fine di `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Aggiungi quanto segue alla fine di `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Aggiungi quanto segue alla fine di `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. È supportata solo la versione v0.33 o superiore. Add the following to your nu config file. Puoi controllare la posizione di questo file eseguendo `percorso di configurazione` in nu. +Aggiungi quanto segue alla fine di `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 Contribuire @@ -335,11 +403,11 @@ Se sei interessato ad aiutare a contribuire a Starship, dai un'occhiata alla nos Ti invito di controllare questi lavori precedenti che hanno contribuito a ispirare la creazione di Starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt ZSH per astronauti. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Tema robbyrussell Cross-shell scritto in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - Un prompt multi-shell personalizzabile powerline-like con icone. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/it-IT/migrating-to-0.45.0/README.md b/docs/it-IT/migrating-to-0.45.0/README.md index e5b891e7..58174af1 100644 --- a/docs/it-IT/migrating-to-0.45.0/README.md +++ b/docs/it-IT/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ Per configurare il prompt al fine di usare la vecchia configurazione `use_symbol error_symbol = "[✖](bold red)" ``` -*Nota:* L'elemento `carattere` aggiunge dopo automaticamente uno spazio, quindi a differenza delle altre stringhe `formato`, non ne aggiungiamo uno specificamente agli esempi di cui sopra. +_Nota:_ L'elemento `carattere` aggiunge dopo automaticamente uno spazio, quindi a differenza delle altre stringhe `formato`, non ne aggiungiamo uno specificamente agli esempi di cui sopra. #### Durata del comando diff --git a/docs/it-IT/presets/README.md b/docs/it-IT/presets/README.md index 9d83b13e..9c547521 100644 --- a/docs/it-IT/presets/README.md +++ b/docs/it-IT/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/ja-JP/README.md b/docs/ja-JP/README.md index d34bfe51..2c87ebcb 100644 --- a/docs/ja-JP/README.md +++ b/docs/ja-JP/README.md @@ -119,7 +119,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ #### Elvish - ::: warning Only elvish v0.17 or higher is supported. ::: + ::: warning elvish v0.17以上のみサポートされています。 ::: `~/.elvish/rc.elv` の最後に以下を追記してください。 @@ -147,9 +147,9 @@ description: Starship はミニマルで、非常に高速で、カスタマイ ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/ja-JP/advanced-config/README.md b/docs/ja-JP/advanced-config/README.md index d6a5279f..bd4cf2b4 100644 --- a/docs/ja-JP/advanced-config/README.md +++ b/docs/ja-JP/advanced-config/README.md @@ -32,11 +32,11 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## Bashのカスタムの事前プロンプトおよび事前実行コマンド -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. ただし、Starship はプロンプトを描画する一連の流れに、限定的に独自の関数を挿入することができます。 +Bashには、他のほとんどのシェルとは違い、正式な preexec / precmd フレームワークを持っていません。 そのため、 `bash`で完全にカスタマイズ可能なフックを提供することは困難です。 ただし、Starship はプロンプトを描画する一連の流れに、限定的に独自の関数を挿入することができます。 -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- 関数をプロンプトが描画される直前に実行するためには、新しい関数を定義して `starship_precmd_user_func` に割り当ててください。 例として、ロケットをプロンプトの前に表示させたければ、下記のようにしてください。 ```bash function blastoff(){ @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- コマンドの直前に関数を実行するために、[`DEBUG` トラップの仕組み](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/)を使うことができます。 However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship は DEBUGトラップの値を保護できますが、 starship の起動後にトラップが上書きされると、いくつかの機能は壊れてしまうでしょう。 ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -67,11 +69,11 @@ function Invoke-Starship-PreCommand { } ``` -## Change Window Title +## ウィンドウのタイトルの変更 -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +いくつかのシェルプロンプトはあなたのためにウィンドウのタイトルを自動的に変更します(例えば、カレントディレクトリを反映するために)。 特に Fish はデフォルトで変更を行います。 Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. -First, define a window title change function (identical in bash and zsh): +まず、ウィンドウのタイトルを変更する関数を定義してください( bash も zsh も同様に) ```bash function set_win_title(){ @@ -79,23 +81,23 @@ function set_win_title(){ } ``` -You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). +タイトルをカスタマイズするために変数を利用することができます (`$USER` 、 `$HOSTNAME`、 `$PWD` が一般的です)。 -In `bash`, set this function to be the precmd starship function: +`bash` では関数を starship の precmd 関数としてセットしてください。 ```bash starship_precmd_user_func="set_win_title" ``` -In `zsh`, add this to the `precmd_functions` array: +`zsh`では関数を `precmd_functions` の配列に追加してください。 ```bash precmd_functions+=(set_win_title) ``` -If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. +もし結果に満足したら、永続化のためそれぞれの行をシェルの設定ファイル (`~/.bashrc` もしくは `~/.zshrc`) に追加してください。 -For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: +たとえば、現在のディレクトリをターミナルタブのタイトルに表示したい場合は、 `~/.bashrc`または`~/.zshrc`に以下のスニペットを追加します。 ```bash function set_win_title(){ @@ -125,11 +127,11 @@ function Invoke-Starship-PreCommand { Invoke-Expression (&starship init powershell) ``` -## Enable Right Prompt +## 右プロンプトの有効化 -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`. +シェルによっては、入力と同じ行にレンダリングされる右プロンプトをサポートしています。 Starship では `right_format` オプションを使って右プロンプトの内容を設定できます。 `format`で使用できるモジュールはすべて`right_format`でも使用できます。 変数`$all`には、`format`や`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). +注意: 右プロンプトは入力の場所に続く単一の行です。 複数行のプロンプトで入力行の上を右寄せにするには、[fillモジュール](/config/#fill)を参照してください。 `right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. @@ -145,7 +147,7 @@ format = """$character""" right_format = """$all""" ``` -Produces a prompt like the following: +次のようなプロンプトが生成されます: ``` ▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### 設定例 @@ -176,26 +178,26 @@ continuation_prompt = "▶▶" ## スタイルの設定 -Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: +スタイル文字列は空白で区切られた単語のリストです。 大文字小文字を区別しません(例えば、 `bold` と`BoLd` は同じだとみなされます)。 それぞれ以下のいずれか一つが該当します。 - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +ここで、 `` は色を指定します(以下で述べます)。 現在 `fg:` と `` は同様の動作ですが、将来変更される可能性があります。 `inverted` は背景と前景の色を交換します。 文字列中の単語の順序は関係ありません。 -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +`none` トークンは、文字列中の`bg:` 指定子の一部でない場合、他のすべてのトークンをオーバーライドします。そのため、たとえば、`fg:red none fg:blue` と指定した場合、スタイルなしの文字列が作られます。 `bg:none` は背景色をデフォルトの色にセットするので、`fg:red bg:none` は `red` や `fg:red` と同じ意味になり、`bg:green fg:red bg:none` も `fg:red` や `red` と同じ意味になります。 将来 `none` を他の単語と一緒に使用することはエラーになるかもしれません。 -A color specifier can be one of the following: +色は以下のいずれか1つを指定できます。 - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- 標準的なターミナルカラーの `black`、 `red`、 `green`、 `blue`、 `yellow`、 `purple`、 `cyan`、 `white`。 必要に応じて、より明るい色を得るために `bright-` を前につけることができます。(例えば、 `bright-white` ) +- `#` に続く16進数。 [RGB の16進数カラーコード](https://www.w3schools.com/colors/colors_hexadecimal.asp)を表します。 +- 0-255 までの間の数字。 [8-bit ANSI カラーコード](https://i.stack.imgur.com/KTSQa.png) を表します。 -If multiple colors are specified for foreground/background, the last one in the string will take priority. +複数の色が文字色/背景色に指定された際には、最後の指定が優先して選ばれます。 diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md index 2f13517d..ef449848 100644 --- a/docs/ja-JP/config/README.md +++ b/docs/ja-JP/config/README.md @@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Starshipのすべての設定は、この[TOML](https://github.com/toml-lang/toml)ファイルで行われます。 ```toml -# シェルプロンプトの間に空行を追加します +# Inserts a blank line between shell prompts add_newline = true -# "❯" 記号を "➜" 記号に置き換えます -[character] # 設定しようとしているモジュールの名前は "character" です。 -success_symbol = "[➜](bold green)" # "success_symbol" セグメントが「太字の緑色」スタイルの "➜" に設定されています +# Replace the "❯" symbol in the prompt with "➜" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" -# packageモジュールを無効にし、プロンプトから完全に隠します +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` @@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### ロギング -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +デフォルトでは、Starship は警告やエラーログを `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log` という名前のファイルに出力します。このセッションキーはターミナルのインスタンスに相当します。 しかし、これは `STARSHIP_CACHE` という環境変数を使って変更できます: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### 用語 -**Module**: A component in the prompt giving information based on contextual information from your OS. 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. +**モジュール**: OSのコンテキスト情報に基づいて情報を提供するプロンプト内のコンポーネントです。 例えば、現在のディレクトリが Node.js のプロジェクトの場合、現在コンピュータにインストールされている 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. +**変数**: モジュールが提供する情報を含むサブコンポーネントを小さくする。 例えば、"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. +慣例により、ほとんどのモジュールにはデフォルトの端末色の接頭辞(「nodejs」の`via` など)と接尾辞として空のスペースがあります。 ### 文字列のフォーマット -Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. +文字列の書式は、モジュールがすべての変数を出力する書式です。 ほとんどのモジュールには、モジュールの表示形式を設定する `format` というエントリがあります。 テキスト、変数、およびテキストグループをフォーマット文字列で使用できます。 #### 変数 -A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. +変数には、 `$` 記号と、その変数の名前が続きます。 The name of a variable can only contain letters, numbers and `_`. -For example: +例: - `$version` は、`version` という名前の変数を持つフォーマット文字列です。 - `$git_branch$git_commit` は `git_branch` と `git_commit` という2つの変数を持つフォーマット文字列です。 @@ -83,13 +83,13 @@ For example: #### テキストグループ -A text group is made up of two different parts. +テキストグループは二つの異なる部分で構成されています。 -The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. +`[]`で囲まれている最初の部分は、 [フォーマット文字列](#format-strings) です。 テキスト、変数、または入れ子になったテキストグループを追加できます。 -In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. +2 番目の部分では、 `()`で囲まれている [スタイル文字列](#style-strings) です。 This can be used to style the first part. -For example: +例: - `[on](red bold)` は文字列 `on` に太字のテキストを赤色で表示します。 - `[⌘ $version](bold green)` は `⌘` 記号とその後に続く変数 `version` の値を、太字の緑色で表示します。 @@ -97,7 +97,7 @@ For example: #### スタイルの設定 -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +Starshipのほとんどのモジュールでは、表示スタイルを設定できます。 これは、設定を指定する文字列であるエントリ(`style`)で行われます。 スタイル文字列の例とその機能を次に示します。 完全な構文の詳細については、詳細は [高度な設定](/advanced-config/)を参照してください 。 - `"fg:green bg:blue"` は、青色の背景に緑色のテキストを設定します - `"bg:blue fg:bright-green"` は、青色の背景に明るい緑色のテキストを設定します @@ -106,13 +106,13 @@ Most modules in starship allow you to configure their display styles. This is do - `"bold italic fg:purple"`は、紫色の太字斜体のテキストを設定します - `""` はすべてのスタイルを明示的に無効にします -Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. +スタイリングがどのように見えるかは、端末エミュレータによって制御されることに注意してください。 たとえば、一部の端末エミュレータはテキストを太字にする代わりに色を明るくします。また、一部のカラーテーマは通常の色と明るい色と同じ値を使用します。また、斜体のテキストを取得するには、端末で斜体をサポートする必要があります。スタイリングがどのように見えるかは、端末エミュレータによって制御されることに注意してください。たとえば、一部の端末エミュレータはテキストを太字にする代わりに色を明るくします。また、一部のカラーテーマは通常の色と明るい色と同じ値を使用します。 また、斜体のテキストを取得するには、端末で斜体をサポートする必要があります。 #### 条件付きフォーマット設定 -A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. +`(` と `)` 内のすべての変数が空の場合、条件付き書式文字列はレンダリングされません。 -For example: +例: - `(@$region)` は`region`が`None`または空だった場合表示されませんが、値がある場合は`@` に続いてregionの値が表示されます。 - `(some text)` は括弧の中に変数がないので、常に何も表示しません。 @@ -124,18 +124,18 @@ The following symbols have special usage in a format string and must be escaped: Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). -For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: +例えば、新しい行に `$` 記号を表示したい場合、以下の `format` の設定が等価です。 ```toml -# with basic string +# 基本文字列と format = "\n\\$" -# with multiline basic string +# 複数行の基本文字列と format = """ \\$""" -# with literal string +# リテラル文字列と format = ''' \$''' @@ -143,7 +143,7 @@ format = ''' ## プロンプト -This is the list of prompt-wide configuration options. +これは、プロンプト全体のオプションのリストです。 ### オプション @@ -155,28 +155,28 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Starshipによって実行されたコマンドのタイムアウト時間 (milliseconds) です。 | | `add_newline` | `true` | シェルプロンプトの間に空行を挿入します。 | - ### 設定例 ```toml # ~/.config/starship.toml -# Use custom format +# カスタムフォーマットを利用します format = """ [┌───────────────────>](bold green) [│](bold green)$directory$rust$package [└─>](bold green) """ -# Wait 10 milliseconds for starship to check files under the current directory. +# starshipが現在のディレクトリ下のファイルをチェックするまで10ミリ秒待ちます + scan_timeout = 10 -# Disable the blank line at the start of the prompt +# プロンプトの先頭の空行を無効にします add_newline = false ``` ### デフォルトのプロンプトフォーマット -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: +デフォルトの `format` は、空または `format` が指定されていない場合、プロンプトのフォーマットを定義するために使用されます。 デフォルトは次のとおりです。 ```toml format = "$all" @@ -185,6 +185,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +201,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,16 +257,16 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +`aws` モジュールは現在のAWSプロファイルが表示されます。 これは `~/.aws/config` に記述されている `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` 環境変数に基づいています。 This module also shows an expiration timer when using temporary credentials. 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. -When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. +[awsu](https://github.com/kreuzwerker/awsu) を使う場合、そのプロファイルは環境変数 `AWSU_PROFILE` から読まれます。 When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. @@ -289,7 +291,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -359,7 +361,7 @@ style = "blue bold" ## バッテリー -The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. +`battery`モジュールは、デバイスのバッテリー残量と現在の充電状態を示します。 モジュールは、デバイスのバッテリー残量が10%未満の場合にのみ表示されます。 ### オプション @@ -387,7 +389,7 @@ discharging_symbol = "💀 " ### バッテリーの表示 -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown: +`display`オプションを使用して、バッテリーインジケーターを表示するタイミング(threshold)、どのシンボルが使われるか(symbol) と外観(style)を定義します。 `display` が提供されない場合、 デフォルトは次のとおりです。 ```toml [[battery.display]] @@ -395,11 +397,11 @@ threshold = 10 style = "bold red" ``` -The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. +`charging_symbol`と`discharging_symbol`オプションのデフォルト値はそれぞれ`battery`の `charging_symbol`と`discharging_symbol`になります。 #### オプション -The `display` option is an array of the following table. +`display`オプションは、次の表の通りです。 | オプション | デフォルト | 説明 | | -------------------- | ---------- | -------------------------------------------------------------------------------------- | @@ -411,29 +413,28 @@ The `display` option is an array of the following table. #### 設定例 ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character -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: +文字は、最後のコマンドが成功したかどうかを示します。 表し方は下記の2つです。 - 色の変更 (`赤`/`緑`) - プロンプトの表示の変更 (`❯`/`✖`) -By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +デフォルトでは、色だけが変更されます。 形も変えてみたい場合は[このサンプル](#with-custom-error-shape)も参考にしてください。 ::: warning @@ -496,7 +497,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: +`cmake`モジュールは、現在インストールされている[Cmake](https://cmake.org/)のバージョンを表示します。 デフォルトでは次のいずれかの条件が満たされると、モジュールがアクティブになります。 - カレントディレクトリに `CMakeLists.txt` ファイルが含まれている - カレントディレクトリに `CMakeCache.txt` ファイルが含まれている @@ -522,11 +523,11 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ## COBOL / GNUCOBOL -The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met: +`COBOL` モジュールは、現在インストールされているCOBOLのバージョンを表示します。 By default, the module will be shown if any of the following conditions are met: - The current directory contains any files ending in `.cob` or `.COB` - The current directory contains any files ending in `.cbl` or `.CBL` @@ -552,37 +553,32 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ## Command Duration -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`モジュールは、最後のコマンドの実行にかかった時間を示します。 モジュールが表示されるのは、コマンドが2秒以上かかった場合、または`min_time`値が存在する場合のみです。 -::: warning Do not hook the DEBUG trap in Bash +::: warning BashでDEBUGトラップをhookしない -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`トラップをフックしないでください。そうしないと、このモジュールが**おそらくですが**壊れます。 ::: -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`定義するだけで、通常どおり続行します。 ### オプション -| オプション | デフォルト | 説明 | -| -------------------- | ----------------------------- | --------------------------- | -| `min_time` | `2_000` | 実行時間を表示する最短期間(ミリ秒単位)です。 | -| `show_milliseconds` | `false` | 実行時間の秒に加えてミリ秒を表示します。 | -| `format` | `"took [$duration]($style) "` | moduleのフォーマットです。 | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | -| `disabled` | `false` | `cmd_duration`モジュールを無効にします。 | -| `show_notifications` | `false` | コマンドが完了したらデスクトップ通知を表示します。 | -| `min_time_to_notify` | `45_000` | 通知を持続する最短期間(ミリ秒単位) | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| オプション | デフォルト | 説明 | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | 実行時間を表示する最短期間(ミリ秒単位)です。 | +| `show_milliseconds` | `false` | 実行時間の秒に加えてミリ秒を表示します。 | +| `format` | `"took [$duration]($style) "` | moduleのフォーマットです。 | +| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `disabled` | `false` | `cmd_duration`モジュールを無効にします。 | +| `show_notifications` | `false` | コマンドが完了したらデスクトップ通知を表示します。 | +| `min_time_to_notify` | `45_000` | 通知を持続する最短期間(ミリ秒単位) | +| `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. | ### 変数 @@ -591,7 +587,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | コマンドの実行時間 | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -609,7 +605,7 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e ::: tip -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Note: これはconda自身の プロンプト修飾子 を抑制しません。`conda config --set changeps1 False` で実行することができます。 ::: @@ -632,7 +628,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -643,9 +639,41 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### オプション + +| オプション | デフォルト | 説明 | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | モジュールのスタイルです。 | +| `format` | "[$symbol \\[$name\\]]($style) " | moduleのフォーマットです。 | +| `disabled` | `false` | Disables the `container` module. | + +### 変数 + +| 変数 | 設定例 | 説明 | +| --------- | ------------------- | ------------------------- | +| name | `fedora-toolbox:35` | The name of the container | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | + +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 + +### 設定例 + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal -The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 +`crystal`モジュールは、現在インストールされている[Crystal](https://crystal-lang.org/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 - カレントディレクトリに`shard.yml`ファイルが含まれている - カレントディレクトリに`.cr`の拡張子のファイルが含まれている @@ -671,7 +699,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -684,7 +712,7 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of [Dart](https://dart.dev/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 +`dart`モジュールは、現在インストールされている[Dart](https://dart.dev/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 - カレントディレクトリに`.dart`の拡張子のファイルが含まれている - カレントディレクトリに`.dart_tool`ディレクトリが含まれている @@ -711,7 +739,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -724,7 +752,8 @@ format = "via [🔰 $version](bold red) " ## Deno -The `deno` module shows you your currently installed version of [Deno](https://deno.land/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 +`deno`モジュールは、現在インストールされている[Deno](https://deno.land/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### オプション @@ -759,11 +788,11 @@ format = "via [🦕 $version](green bold) " ## 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`モジュールには、現在のディレクトリへのパスが表示され、3つの親フォルダは切り捨てられます。 ディレクトリは、現在の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`に設定されている場合を挙げます。 以前は`nixpkgs/pkgs`でしたが、`~/D/N/nixpkgs/pkgs`が表示されます。 ### オプション @@ -782,7 +811,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |

-This module has a few advanced configuration options that control how the directory is displayed. +このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。 | Advanced Option | デフォルト | 説明 | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -809,7 +838,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | カレントディレクトリのパス | | style\* | `"black bold dimmed"` | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -846,7 +875,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -859,9 +888,9 @@ 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. +`dotnet`モジュールはカレントディレクトリに関係する[.NET Core SDK](https://dotnet.microsoft.com/)のバージョンを表示します。 もし 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: +デフォルトでは、このモジュールは現在のディレクトリに以下のファイルが 存在する場合にのみプロンプトで表示されます: - `global.json` - `project.json` @@ -874,7 +903,7 @@ 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` を実行するより2倍速く実行できますが、.NET project一般的でないディレクトリlayoutの場合は間違ったバージョンが示されてしまうことがあります。 速度よりも精度が重要な場合は、次の方法でメカニズムを無効にできます。 モジュールオプションで`heuristic = false `を設定します。 The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. @@ -901,7 +930,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2893,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2906,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2854,7 +2914,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 ::: @@ -2875,12 +2935,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2985,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -2939,26 +2998,26 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. +`terraform` モジュールは、現在選択されている[Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) とバージョンを表示します。 ::: tip -By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). +Terraformのバージョンはデフォルトでは表示されません。多くのプラグインが使用されている場合、現在のTerraformのバージョンでは遅くなるからです。 それでも有効にしたい場合は、 [以下の例に従ってください](#with-terraform-version). ::: デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 - カレントディレクトリに`.terraform`フォルダが含まれている -- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions +- 現在のディレクトリに `.tf`, `.tfplan` または `.tfstate` のいずれかの拡張子を持つファイルがある。 ### オプション | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `format` | `"via [$symbol$workspace]($style) "` | モジュールのフォーマット文字列。 | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | +| `symbol` | `"💠"` | ワークスペースの前に表示されるフォーマット文字列。 | | `detect_extensions` | `["tf", "tfplan", "tfstate"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[".terraform"]` | どのフォルダーがこのモジュールをアクティブにするか | @@ -2967,18 +3026,18 @@ By default the Terraform version is not shown, since this is slow for current ve ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ---------- | ------------------------------- | -| version | `v0.12.24` | The version of `terraform` | -| workspace | `default` | The current Terraform workspace | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ---------- | ---------------------- | +| version | `v0.12.24` | `terraform` のバージョン | +| workspace | `default` | 現在のTerraformワークスペース | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 -#### With Terraform Version +#### Terraform バージョン表示あり ```toml # ~/.config/starship.toml @@ -2987,7 +3046,7 @@ By default the Terraform version is not shown, since this is slow for current ve format = "[🏎💨 $version$workspace]($style) " ``` -#### Without Terraform version +#### Terraform バージョン表示なし ```toml # ~/.config/starship.toml @@ -2998,11 +3057,11 @@ format = "[🏎💨 $workspace]($style) " ## Time -The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. +`time`モジュールは、現在の**現地**時間を示します。 `format`設定は、時間の表示方法を制御するために[`chrono`](https://crates.io/crates/chrono)クレートによって使用されます。 使用可能なオプションを確認するには、[chrono strftimeのドキュメント](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)をご覧ください。 ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 ::: @@ -3010,7 +3069,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | オプション | デフォルト | 説明 | | ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `format` | `"at [$time]($style) "` | モジュールのフォーマット文字列。 | | `use_12hr` | `false` | 12時間のフォーマットを有効にします。 | | `time_format` | この表の下を参照してください | 時刻のフォーマットに使用される[クロノフォーマット文字列](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) です。 | | `style` | `"bold yellow"` | モジュールのスタイルです。 | @@ -3018,7 +3077,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `disabled` | `true` | `time`モジュールを無効にします。 | | `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. それ以外の場合、デフォルトは`"%T"`です。 Manually setting `time_format` will override the `use_12hr` setting. ### 変数 @@ -3027,7 +3086,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | 時刻 | `13:08:10` | The current time. | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -3044,7 +3103,7 @@ time_range = "10:00:00-14:00:00" ## ユーザー名 -The `username` module shows active user's username. 次の条件のいずれかが満たされると、モジュールが表示されます: +`username`モジュールには、アクティブなユーザーのユーザー名が表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます: - カレントユーザーがroot - カレントユーザーが、ログインしているユーザーとは異なる @@ -3114,7 +3173,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -3128,6 +3187,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3241,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | オプション `記号` の値をミラーする | | style\* | `black bold dimmed` | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -3219,7 +3279,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 ### 設定例 @@ -3293,7 +3353,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | オプション `記号` の値をミラーする | | style\* | オプション `style` の値をミラーする | -\*: この変数はスタイル文字列の一部としてのみ使用できます +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 #### Custom command shell @@ -3330,13 +3390,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/ja-JP/faq/README.md b/docs/ja-JP/faq/README.md index 747d5bb9..5f4489ce 100644 --- a/docs/ja-JP/faq/README.md +++ b/docs/ja-JP/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## よくわからない記号を見つけました。これはどういった意味ですか? diff --git a/docs/ja-JP/guide/README.md b/docs/ja-JP/guide/README.md index 9c64f315..e06e78b0 100644 --- a/docs/ja-JP/guide/README.md +++ b/docs/ja-JP/guide/README.md @@ -169,159 +169,227 @@ - [Nerd Font](https://www.nerdfonts.com/)がインストールされ、端末にて有効になっている(例えば、[Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)を試してみてください)。 -### 入門 +### Step 1. Install Starship -**注意**: さまざまなプラットフォームが急増しているため、ここでは対応プラットフォームの一部だけを挙げています。 自分が使っているシェルがありませんか? [extra platform instructions](https://starship.rs/installing/) を確認してください。 +Select your operating system from the list below to view installation instructions: -1. **Starship** のバイナリをインストール +
+Android +Install Starship using any of the following package managers: - #### 最新版のインストール +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### ビルド済みのバイナリをインストール +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - Starship自体を更新するには、上記のスクリプトを再度実行してください。 最新のバージョンに置き換わり、設定ファイルには変更を加えません。 +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **※**インストールスクリプトのデフォルト値は上書きすることができます。詳しくはヘルプを参照してください。 +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### パッケージマネージャー経由でインストール +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### [ Homebrew ](https://brew.sh/)の場合: +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### [ Scoop ](https://scoop.sh)の場合: +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. 初期化のためのスクリプトをシェルの設定ファイルに追加 +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- `~/.bashrc` の最後に以下を追記してください +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - `~/.config/fish/config.fish` の最後に以下を追記してください +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +`~/.bashrc` の最後に以下を追記してください +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- `~/.zshrc` の最後に以下を追記してください +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - `Microsoft.PowerShell_profile.ps1` の最後に以下を追記してください。 PowerShell 上で `$PROFILE` 変数を問い合わせると、ファイルの場所を確認できます。 通常、パスは `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` または -Nix 上では `~/.config/powershell/Microsoft.PowerShell_profile.ps1` です。 +`~/.elvish/rc.elv` の最後に以下を追記してください。 - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- `~/.config/ion/initrc `の最後に次を追加してください +
+Fish - ```sh - # ~/.config/ion/initrc +`~/.config/fish/config.fish` の最後に以下を追記してください - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. `~/.elvish/rc.elv` の最後に以下を追記してください。 +`~/.config/ion/initrc `の最後に次を追加してください - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - `~/.tcshrc` の最後に以下を追加します: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - `~/.xonshrc` の最後に以下を追加してください: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +`~/.tcshrc` の最後に以下を追加します: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +`~/.xonshrc` の最後に以下を追加してください: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. nu バージョン 0.33 以降のみサポートされます。 Add the following to your nu config file. nu で`config path`を実行することで、設定ファイルの場所を確認できます。 +`~/.zshrc` の最後に以下を追記してください - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 貢献 @@ -335,11 +403,11 @@ よければStarship の作成に影響を与えた、これまでのプロジェクトをチェックしてください 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 宇宙飛行士のための ZSH プロンプト。 +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - 多くの shell に対応した JavaScript で書かれた robbyrussell テーマ。 +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - 多くの shell に対応しているカスタマイズ可能でアイコンを表示できる powerline のようなプロンプト。 +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/ja-JP/migrating-to-0.45.0/README.md b/docs/ja-JP/migrating-to-0.45.0/README.md index ba9b939a..e2ffa955 100644 --- a/docs/ja-JP/migrating-to-0.45.0/README.md +++ b/docs/ja-JP/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ v0.45.0 のリリースでは、ステータスコードがゼロでないとき error_symbol = "[✖](bold red)" ``` -*注意:* `character` 要素は自動的にスペースを後ろに追加するため、他の `format` 文字列とは異なり、上記の例では特にスペースを追加していません。 +_注意:_ `character` 要素は自動的にスペースを後ろに追加するため、他の `format` 文字列とは異なり、上記の例では特にスペースを追加していません。 #### Command Duration diff --git a/docs/ja-JP/presets/README.md b/docs/ja-JP/presets/README.md index 7a643cf1..1316ae27 100644 --- a/docs/ja-JP/presets/README.md +++ b/docs/ja-JP/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/ko-KR/README.md b/docs/ko-KR/README.md index 3d2b382b..871fff57 100644 --- a/docs/ko-KR/README.md +++ b/docs/ko-KR/README.md @@ -28,13 +28,13 @@ description: Starship is the minimal, blazing fast, and extremely customizable p

-### Prerequisites +### 준비 사항 -- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal. +- 터미널에 [Nerd Font](https://www.nerdfonts.com/)가 설치되어 있고 사용 가능해야 합니다. ### 빠른 설치 -1. **starship** 바이러니 설치: +1. **starship** 바이너리 설치: #### 최근 버전 설치 @@ -44,7 +44,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" ``` - To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration. + Starship을 업데이트하고 싶은 경우에도 위의 스크립트를 실행시키면 됩니다. Starship의 설정은 변경되지 않고 버전만 최근 버전으로 대체될 것입니다. #### 패키지 매니저를 이용한 설치 @@ -55,18 +55,18 @@ description: Starship is the minimal, blazing fast, and extremely customizable p brew install starship ``` - With [Scoop](https://scoop.sh): + [Scoop](https://scoop.sh)을 통한 설치: ```powershell scoop install starship ``` -1. 쉘 설정에 시동 스크립트를 추가: +1. 쉘 설정 파일에 init 스크립트 추가: #### Bash - `~/.bashrc`에 아래 라인을 추가 + `~/.bashrc`의 끝부분에 아래 라인을 추가: ```sh # ~/.bashrc @@ -77,7 +77,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Fish - `~/.config/fish/config.fish`에 아래 라인을 추가 + `~/.config/fish/config.fish`의 끝부분에 아래 라인을 추가: ```sh # ~/.config/fish/config.fish @@ -88,7 +88,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Zsh - `~/.zshrc`에 아래 라인을 추가 + `~/.zshrc`의 끝부분에 아래 라인을 추가 ```sh # ~/.zshrc @@ -99,7 +99,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Powershell - `Microsoft.PowerShell_profile.ps1`의 끝부분에 아래 내용을 추가. 해당 설정파일은 파워쉘에서 `$PROFILE` 변수 확인을 통해 확인 가능. 일반적으로 해당 파일은 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 혹은 -Nix의 경우 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`에 위치. + `Microsoft.PowerShell_profile.ps1`의 끝부분에 아래 내용을 추가합니다. 해당 설정파일은 파워쉘에서 `$PROFILE` 변수 확인을 통해 확인 가능합니다. 일반적으로 해당 파일은 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 혹은 -Nix의 경우 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`에 있습니다. ```sh Invoke-Expression (&starship init powershell) @@ -108,7 +108,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Ion - 아래의 라인을 `~/.config/ion/initrc` 마지막에 추가: + `~/.config/ion/initrc` 의 끝부분에 아래 라인을 추가: ```sh # ~/.config/ion/initrc @@ -119,9 +119,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Elvish - ::: warning Only elvish v0.17 or higher is supported. ::: + ::: 주의 elvish 버전 v0.17 이상에서만 지원됩니다. ::: - 아래의 라인을 `~/.elvish/rc.elv` 마지막에 추가: + `~/.elvish/rc.elv` 의 끝부분에 아래 라인을 추가: ```sh # ~/.elvish/rc.elv @@ -132,7 +132,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Tcsh - 아래의 라인을 `~/.tcshrc` 마지막에 추가: + `~/.tcshrc` 의 끝부분에 아래 라인을 추가: ```sh # ~/.tcshrc @@ -143,13 +143,13 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Nushell - ::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu. + ::: 주의 이는 추후 변경될 예정입니다. 버전 v0.33 이상에서만 지원됩니다. ::: 새로운 설정 파일에 아래의 내용을 추가하세요. `config path`를 실행시키면 파일의 위치를 확인할 수 있습니다. ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` @@ -157,7 +157,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Xonsh - Add the following to the end of `~/.xonshrc`: + `~/.xonshrc` 의 끝부분에 아래 라인을 추가: ```sh # ~/.xonshrc @@ -168,7 +168,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Cmd - You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: + Cmd를 이용하려면 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) 를 사용해야 합니다. `starship.lua` 파일에 아래의 라인을 추가하고 파일을 Clink scripts 폴더에 저장합니다. ```lua -- starship.lua diff --git a/docs/ko-KR/advanced-config/README.md b/docs/ko-KR/advanced-config/README.md index 0a2b2ddd..ff39cf7c 100644 --- a/docs/ko-KR/advanced-config/README.md +++ b/docs/ko-KR/advanced-config/README.md @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `파워셀` +- `bash` +- `zsh` +- `파워셀` ### Example @@ -178,15 +180,15 @@ continuation_prompt = "▶▶" Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. @@ -194,8 +196,8 @@ The `none` token overrides all other tokens in a string if it is not part of a ` A color specifier can be one of the following: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/ko-KR/config/README.md b/docs/ko-KR/config/README.md index 2565504e..9c4407f4 100644 --- a/docs/ko-KR/config/README.md +++ b/docs/ko-KR/config/README.md @@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la add_newline = true # Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" # Disable the package module, hiding it from the prompt completely [package] @@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | - ### Example ```toml @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | 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 +*: This variable can only be used as a part of a style string ### Examples @@ -411,17 +412,16 @@ The `display` option is an array of the following table. #### Example ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 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 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 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 +*: This variable can only be used as a part of a style string ## Command Duration @@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Options -| Option | Default | Description | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | -| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `cmd_duration` module. | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Option | Default | Description | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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 +*: This variable can only be used as a part of a style string ### Example @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | The style for the module. | +| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| 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 + +### Example + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 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 +*: This variable can only be used as a part of a style string ### Example @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Options @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Example ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2905,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Example ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | 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 +*: This variable can only be used as a part of a style string ### Example @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Mirrors the value of option `symbol` | | style\* | `black bold dimmed` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 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 +*: This variable can only be used as a part of a style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/ko-KR/faq/README.md b/docs/ko-KR/faq/README.md index 99dd6bcc..89ffc1ac 100644 --- a/docs/ko-KR/faq/README.md +++ b/docs/ko-KR/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## I see symbols I don't understand or expect, what do they mean? diff --git a/docs/ko-KR/guide/README.md b/docs/ko-KR/guide/README.md index 740c5349..3132ddbc 100644 --- a/docs/ko-KR/guide/README.md +++ b/docs/ko-KR/guide/README.md @@ -150,178 +150,246 @@ **The minimal, blazing-fast, and infinitely customizable prompt for any shell!** -- **Fast:** it's fast – _really really_ fast! 🚀 -- **Customizable:** configure every aspect of your prompt. -- **Universal:** works on any shell, on any operating system. -- **Intelligent:** shows relevant information at a glance. -- **Feature rich:** support for all your favorite tools. -- **Easy:** quick to install – start using it in minutes. +- ** Fast:** 빨라요 – _엄청 엄청_ 빠릅니다! 🚀 +- ** Customizable:** 프롬프트의 모든 측면을 커스텀 가능합니다. +- **Universal:** 어떤 쉘 위에서도, 어떤 운영체제 위에서도 동작합니다. +- **Intelligent:** 관련 정보를 한눈에 보여줍니다. +- **Feature rich:** 원하는 모든 도구를 지원합니다. +- **Easy:** 빠른 설치 - 몇 분 안에 사용할 수 있습니다.

-Explore the Starship docs  ▶ +Starship 문서 보기  ▶

## 🚀 설치 -### Prerequisites +### 준비 사항 -- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). +- 터미널에 [Nerd Font](https://www.nerdfonts.com/)가 설치되어 있고 사용 가능해야 합니다. (ex. [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)) -### 시작하기 +### Step 1. Starship 설치하기 -**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/). +아래의 목록 중 해당하는 운영체제를 골라 설치 지침을 확인하세요: -1. **starship** 바이러니 설치: +
+Android +Install Starship using any of the following package managers: - #### 최근 버전 설치 +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### From prebuilt binary, with Shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Note** - The defaults of the install script can be overridden see the built-in help. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### 패키지 매니저를 이용한 설치 +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### [Homebrew](https://brew.sh/)를 통한 설치: +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### With [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. 쉘 설정에 시동 스크립트를 추가: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- `~/.bashrc`에 아래 라인을 추가 +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. 쉘에 Starship 적용하기 - `~/.config/fish/config.fish`에 아래 라인을 추가 +쉘에 Starship 초기 설정을 합니다. 아래의 리스트 중에 해당하는 것을 고르세요: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +`~/.bashrc`의 끝부분에 아래 라인을 추가: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- `~/.zshrc`에 아래 라인을 추가 +
+Cmd - ```sh - # ~/.zshrc +Cmd를 이용하려면 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) 를 사용해야 합니다. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### 파워셀 +
+Elvish - `Microsoft.PowerShell_profile.ps1`의 끝부분에 아래 내용을 추가. 해당 설정파일은 파워쉘에서 `$PROFILE` 변수 확인을 통해 확인 가능. 일반적으로 해당 파일은 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 혹은 -Nix의 경우 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`에 위치. +`~/.elvish/rc.elv` 의 끝부분에 아래 라인을 추가: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- 아래의 라인을 `~/.config/ion/initrc` 마지막에 추가: +
+Fish - ```sh - # ~/.config/ion/initrc +`~/.config/fish/config.fish`의 끝부분에 아래 라인을 추가: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. 아래의 라인을 `~/.elvish/rc.elv` 마지막에 추가: +`~/.config/ion/initrc` 의 끝부분에 아래 라인을 추가: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - 아래의 라인을 `~/.tcshrc` 마지막에 추가: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+Powershell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Add the following to the end of `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +`~/.tcshrc` 의 끝부분에 아래 라인을 추가: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +`~/.xonshrc` 의 끝부분에 아래 라인을 추가: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu. +`~/.zshrc`의 끝부분에 아래 라인을 추가 - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Starship 설정하기 + +새로운 쉘 인스턴스를 시작하면 아름다운 새 쉘 프롬프트를 볼 수 있습니다. 기본 설정에 만족한다면, 즐기세요! + +Starship을 추가로 커스터마이징 하고싶다면: + +- **[Configuration](https://starship.rs/config/)** – 원하는대로 프롬프트를 수정할 수 있도록 Starship 설정을 배울 수 있습니다. + +- **[Presets](https://starship.rs/presets/)** – 다른 사람들이 만들어둔 설정들을 보고 영감을 받을 수 있습니다. ## 🤝 기여 @@ -335,11 +403,11 @@ If you are interested in helping contribute to starship, please take a look at o Please check out these previous works that helped inspire the creation of starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/ko-KR/installing/README.md b/docs/ko-KR/installing/README.md index 305af749..83f46ec6 100644 --- a/docs/ko-KR/installing/README.md +++ b/docs/ko-KR/installing/README.md @@ -11,7 +11,7 @@ There are so many platforms out there that they didn't fit into the main README. ## [Chocolatey](https://chocolatey.org) -### Prerequisites +### 준비 사항 Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey. @@ -23,7 +23,7 @@ choco install starship ## [termux](https://termux.com) -### Prerequisites +### 준비 사항 ```sh pkg install getconf diff --git a/docs/ko-KR/migrating-to-0.45.0/README.md b/docs/ko-KR/migrating-to-0.45.0/README.md index 95a847bf..18661c3b 100644 --- a/docs/ko-KR/migrating-to-0.45.0/README.md +++ b/docs/ko-KR/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur 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. +_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. #### Command Duration diff --git a/docs/ko-KR/presets/README.md b/docs/ko-KR/presets/README.md index f60cc19b..95e716a5 100644 --- a/docs/ko-KR/presets/README.md +++ b/docs/ko-KR/presets/README.md @@ -8,7 +8,7 @@ This preset doesn't change anything except for the symbols used for each module. ![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png) -### Prerequisites +### 준비 사항 - A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font) @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/nl-NL/README.md b/docs/nl-NL/README.md index 24a21d99..d54da445 100644 --- a/docs/nl-NL/README.md +++ b/docs/nl-NL/README.md @@ -147,9 +147,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/nl-NL/advanced-config/README.md b/docs/nl-NL/advanced-config/README.md index f0f682a8..23d7282e 100644 --- a/docs/nl-NL/advanced-config/README.md +++ b/docs/nl-NL/advanced-config/README.md @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Example @@ -178,15 +180,15 @@ continuation_prompt = "▶▶" Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. @@ -194,8 +196,8 @@ The `none` token overrides all other tokens in a string if it is not part of a ` A color specifier can be one of the following: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/nl-NL/config/README.md b/docs/nl-NL/config/README.md index 2565504e..9c4407f4 100644 --- a/docs/nl-NL/config/README.md +++ b/docs/nl-NL/config/README.md @@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la add_newline = true # Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" # Disable the package module, hiding it from the prompt completely [package] @@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | - ### Example ```toml @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | 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 +*: This variable can only be used as a part of a style string ### Examples @@ -411,17 +412,16 @@ The `display` option is an array of the following table. #### Example ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 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 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 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 +*: This variable can only be used as a part of a style string ## Command Duration @@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Options -| Option | Default | Description | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | -| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `cmd_duration` module. | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Option | Default | Description | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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 +*: This variable can only be used as a part of a style string ### Example @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | The style for the module. | +| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| 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 + +### Example + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 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 +*: This variable can only be used as a part of a style string ### Example @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Options @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Example ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2905,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Example ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | 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 +*: This variable can only be used as a part of a style string ### Example @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Mirrors the value of option `symbol` | | style\* | `black bold dimmed` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 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 +*: This variable can only be used as a part of a style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/nl-NL/faq/README.md b/docs/nl-NL/faq/README.md index 99dd6bcc..89ffc1ac 100644 --- a/docs/nl-NL/faq/README.md +++ b/docs/nl-NL/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## I see symbols I don't understand or expect, what do they mean? diff --git a/docs/nl-NL/guide/README.md b/docs/nl-NL/guide/README.md index c174a8e9..662a92a4 100644 --- a/docs/nl-NL/guide/README.md +++ b/docs/nl-NL/guide/README.md @@ -167,159 +167,227 @@ - Een [Nerd Font](https://www.nerdfonts.com/) is geïnstalleerd en ingeschakeld in je terminal (bijvoorbeeld probeer het [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Aan de slag +### Step 1. Install Starship -**Opmerking:** als gevolg van de groei van verschillende platforms, worden slechts bepaalde ondersteunde platforms hieronder weergegeven. Staat de jouwe er niet tussen? Neem een kijkje in de [extra platforminstructies](https://starship.rs/installing/). +Select your operating system from the list below to view installation instructions: -1. Installeer de **Starship** binary: +

+Android +Install Starship using any of the following package managers: - #### Installeer de nieuwste versie +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### Vooraf gebouwde binary, met shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - Om Starship zelf bij te werken, voer je het bovenstaande script opnieuw uit. Deze vervangt de huidige versie zonder de configuratie van Starship aan te passen. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Opmerking** - De standaardinstellingen van het installatiescript kunnen overschreven worden; zie de ingebouwde hulp. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### Installeren via pakketbeheerder +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### With [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### Met [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Voeg het initscript toe aan het configuratiebestand van uw shell: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Voeg het volgende toe aan het einde van `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - Add the following to the end of `~/.config/fish/config.fish`: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Voeg het volgende toe aan het einde van `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Add the following to the end of `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. +Add the following to the end of `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- Add the following to the end of `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +Add the following to the end of `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`: +Add the following to the end of `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - Add the following to the end of `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Add the following to the end of `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Add the following to the end of `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Add the following to the end of `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Add the following to your nu config file. De locatie van hiervan kunt u vinden door `config path` uit te voeren in nushell. +Add the following to the end of `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 Contributing @@ -333,11 +401,11 @@ If you are interested in helping contribute to starship, please take a look at o Please check out these previous works that helped inspire the creation of starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/nl-NL/migrating-to-0.45.0/README.md b/docs/nl-NL/migrating-to-0.45.0/README.md index 95a847bf..18661c3b 100644 --- a/docs/nl-NL/migrating-to-0.45.0/README.md +++ b/docs/nl-NL/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur 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. +_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. #### Command Duration diff --git a/docs/nl-NL/presets/README.md b/docs/nl-NL/presets/README.md index c7190dca..02ebc547 100644 --- a/docs/nl-NL/presets/README.md +++ b/docs/nl-NL/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/pl-PL/README.md b/docs/pl-PL/README.md index 949690b1..19f1c5e1 100644 --- a/docs/pl-PL/README.md +++ b/docs/pl-PL/README.md @@ -147,9 +147,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/pl-PL/advanced-config/README.md b/docs/pl-PL/advanced-config/README.md index 2ceee55c..e2c7a3b9 100644 --- a/docs/pl-PL/advanced-config/README.md +++ b/docs/pl-PL/advanced-config/README.md @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Example @@ -178,15 +180,15 @@ continuation_prompt = "▶▶" Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. @@ -194,8 +196,8 @@ The `none` token overrides all other tokens in a string if it is not part of a ` A color specifier can be one of the following: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md index a452ec6e..d1250044 100644 --- a/docs/pl-PL/config/README.md +++ b/docs/pl-PL/config/README.md @@ -13,8 +13,8 @@ Cała konfiguracja starship jest wykonywana w tym pliku [TOML](https://github.co add_newline = true # Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" # Disable the package module, hiding it from the prompt completely [package] @@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### Logi -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +Starship domyślnie loguje ostrzeżenia i błędy do pliku o nazwie`~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, gdzie klucz sesji odpowiada twojej instancji terminala. Można to zmienić za pomocą zmiennej środowiskowej `STARSHIP_CACHE`: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### Glosariusz -**Module**: A component in the prompt giving information based on contextual information from your OS. 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. +**Moduł**: Komponent wiersza poleceń, który dostarcza informacji opartych na kontekście twojego systemu operacyjnego. Przykładowo, moduł "nodejs" pokazuje wersję Node.js, która jest obecnie zainstalowana na twoim komputerze, jeżeli znajdujesz się w folderze zawierającym projekt 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. +**Zmienna**: Mniejszy podkomponent zawierający informacje dostarczane przez moduł. Przykładowo, zmienna "version" w module "nodejs" zawiera obecną wersję 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. +W ramach konwencji większość modułów posiada przedrostek w domyślnym kolorze terminala (n.p. `via` w "nodejs") oraz pojedynczy odstęp za treścią modułu. ### Formatowanie -Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. +Moduły wypisują swoje zmienne przy użyciu ciągów formatujących. Większość modułów posiada wpis o nazwie `format`, który konfiguruje format wyświetlania modułu. W ciągach formatujących można używać tekstu, zmiennych oraz grup tekstowych. #### Zmienne -A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. +Zmienna zawiera symbol `$`, po którym następuje nazwa zmiennej. The name of a variable can only contain letters, numbers and `_`. -For example: +Na przykład: - `$version` to ciąg formatujący ze zmienną o nazwie `version`. - `$git_branch$git_commit` zawiera dwie zmienne: `git_branch` i `git_commit`. @@ -83,13 +83,13 @@ For example: #### Grupy tekstowe -A text group is made up of two different parts. +Grupa tekstowa składa się z dwóch oddzielnych części. -The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. +Pierwsza część, otoczona `[]`, to [ciąg formatujący](#format-strings). You can add texts, variables, or even nested text groups in it. In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. -For example: +Na przykład: - `[on](red bold)` will print a string `on` with bold text colored red. - `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. @@ -112,7 +112,7 @@ Note that what styling looks like will be controlled by your terminal emulator. A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. -For example: +Na przykład: - `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. - `(some text)` will always show nothing since there are no variables wrapped in the braces. @@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | - ### Example ```toml @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | 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 +*: This variable can only be used as a part of a style string ### Examples @@ -411,17 +412,16 @@ The `display` option is an array of the following table. #### Example ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 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 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 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 +*: This variable can only be used as a part of a style string ## Command Duration @@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Options -| Option | Default | Description | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | -| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `cmd_duration` module. | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Option | Default | Description | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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 +*: This variable can only be used as a part of a style string ### Example @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | The style for the module. | +| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| Zmienne | Example | Description | +| --------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| 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 + +### Example + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 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 +*: This variable can only be used as a part of a style string ### Example @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Options @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Example ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2905,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Example ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | 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 +*: This variable can only be used as a part of a style string ### Example @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Mirrors the value of option `symbol` | | style\* | `black bold dimmed` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 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 +*: This variable can only be used as a part of a style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/pl-PL/faq/README.md b/docs/pl-PL/faq/README.md index d02917b2..845a62b6 100644 --- a/docs/pl-PL/faq/README.md +++ b/docs/pl-PL/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## W wierszu poleceń zauważyłem symbole których się nie spodziewałem bądź nie rozumiem. Co one oznaczają? diff --git a/docs/pl-PL/guide/README.md b/docs/pl-PL/guide/README.md index f64b98be..af7c468f 100644 --- a/docs/pl-PL/guide/README.md +++ b/docs/pl-PL/guide/README.md @@ -169,159 +169,227 @@ - Czcionka typu [Nerd Font](https://www.nerdfonts.com/) zainstalowana i ustawiona w twoim terminalu (wypróbuj na przykład [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Pierwsze kroki +### Step 1. Install Starship -**Uwaga**: z powodu szybko rosnącej liczby platform poniżej pokazano wybrane platformy spośród obecnie obsługiwanych. Nie widzisz swojej? Sprawdź w [dodatkowych instrukcjach dla platform](https://starship.rs/installing/). +Select your operating system from the list below to view installation instructions: -1. Zainstaluj plik programu **starship**: +

+Android +Install Starship using any of the following package managers: - #### Instalacja najnowszej wersji +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### Z wstępnie zbudowanego pliku wykonywalnego, za pomocą powłoki Shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - Aby zaktualizować Starship, uruchom ponownie powyższy skrypt. Obecna wersja zostanie zastąpiona nową, bez modyfikowania konfiguracji Starship. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Uwaga** - Domyślne ustawienia skryptu instalacyjnego można zmienić - szczegóły znajdziesz we wbudowanym poleceniu pomocy. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### Instalacja za pomocą menedżera pakietów +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### With [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### Za pomocą [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Dodaj skrypt inicjalizacyjny do konfiguracji twojej powłoki: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Dodaj na koniec pliku `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - Dodaj na koniec pliku `~/.config/fish/config.fish`: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Dodaj na koniec pliku `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Dodaj na koniec pliku `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Dodaj na koniec pliku `Microsoft.PowerShell_profile.ps1`. Możesz sprawdzić lokalizację tego pliku odczytując zmienną środowiskową `$PROFILE` w PowerShell. Zazwyczaj jest to `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` lub `~/.config/powershell/Microsoft.PowerShell_profile.ps1` na -Nixie. +Dodaj na koniec pliku `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- Dodaj na koniec pliku `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +Dodaj na koniec pliku `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. Dodaj na koniec pliku `~/.elvish/rc.elv`: +Dodaj na koniec pliku `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - Dodaj na koniec pliku `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Dodaj na koniec pliku `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Dodaj na koniec pliku `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Dodaj na koniec pliku `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Działa tylko dla wersji powłoki nu v0.33 lub wyższej. Add the following to your nu config file. Możesz sprawdzić lokalizację tego pliku wywołując polecenie `config path` w powłoce nu. +Dodaj na koniec pliku `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝Wspomóż nas @@ -335,11 +403,11 @@ Jeżeli chcesz wspomóc tworzenie starship, zapoznaj się z naszym [Poradnikiem Zapoznaj się z wcześniejszymi projektami które zainspirowały nas do stworzenia starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Wiersz poleceń ZSH dla astronautów. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Motyw robyrussell dla wielu powłok, napisany w JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - Wiersz polecenia typu Powerline z ikonami, działa na wielu różnych powłokach. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/pl-PL/migrating-to-0.45.0/README.md b/docs/pl-PL/migrating-to-0.45.0/README.md index 1f64546a..7325a878 100644 --- a/docs/pl-PL/migrating-to-0.45.0/README.md +++ b/docs/pl-PL/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur 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. +_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. #### Command Duration diff --git a/docs/pl-PL/presets/README.md b/docs/pl-PL/presets/README.md index d1d0ab0c..e63fa4b7 100644 --- a/docs/pl-PL/presets/README.md +++ b/docs/pl-PL/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/pt-BR/README.md b/docs/pt-BR/README.md index 57e9ae68..4597101e 100644 --- a/docs/pt-BR/README.md +++ b/docs/pt-BR/README.md @@ -18,7 +18,7 @@ features: footer: Licenciado pelo ISC | Todos os direitos reservados © 2019-Presente | Contribuidores Starship #Used for the description meta tag, for SEO metaTitle: "Starship: Cross-Shell Prompt" -description: O Starship é o prompt minimalista, extremamente rápido e extremamente personalizável para qualquer shell! Mostra as informações que você precisa, mantendo-se elegante e minimalista. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell. +description: O Starship é o prompt minimalista, extremamente rápido e extremamente personalizável para qualquer shell! Mostra as informações que você precisa, mantendo-se elegante e minimalista. Instalação rápida disponível para Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd e PowerShell. ---

@@ -147,9 +147,9 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` @@ -168,7 +168,7 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam #### Cmd - You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: + Você precisa do [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) com Cmd. Adicione o seguinte num arquivo `starship.lua` e coloque este arquivo no diretório scripts do Clink: ```lua -- starship.lua diff --git a/docs/pt-BR/advanced-config/README.md b/docs/pt-BR/advanced-config/README.md index 27567d7d..df09878f 100644 --- a/docs/pt-BR/advanced-config/README.md +++ b/docs/pt-BR/advanced-config/README.md @@ -1,18 +1,18 @@ # Configuração avançada -Ainda que Starship se`ja um shell versátil, às vezes você precisará fazer algumas outras coisas além de editar o arquivo starship.toml`. Esta página detalha algumas das configurações mais avançadas usadas em starship. +Ainda que Starship seja um shell versátil, às vezes você precisará fazer algumas outras coisas além de editar o arquivo `starship.toml`. Esta página detalha algumas das técnicas de configuração avançadas utilizadas no starship. -::: warning +::: atenção As configurações nesta seção estão sujeitas a alterações em futuras versões do Starship. ::: -## Custom pre-prompt and pre-execution Commands in Cmd +## Comandos personalizados de pré-prompt e pré-execução no Cmd -Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: +O Clink fornece APIs extremamente flexíveis para executar comandos pré-prompt e pré-execução em Cmd shell. É bastante simples de usar com o Starship. Faça as seguintes alterações no seu arquivo `starship.lua` conforme suas necessidades: -- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do +- Para executar uma função personalizada logo antes do prompt ser inicializado, defina um novo função chamada `starship_preprompt_user_func`. Esta função recebe o prompt atual como uma string que você pode utilizar. Por exemplo, para exibir um foguete antes do prompt, você faria ```lua function starship_preprompt_user_func(prompt) @@ -22,7 +22,7 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do +- Para executar uma função personalizada logo antes de um comando ser executado, defina um novo função chamada `starship_precmd_user_func`. Esta função recebe a linha de comando atual como uma string que você pode utilizar. Por exemplo, para imprimir o comando que está prestes a ser executado, você faria ```lua function starship_precmd_user_func(line) @@ -32,11 +32,11 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## Comandos personalizados de pré-prompt e pré-execução no Bash -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering: +Bash não possui uma estrutura formal pré-prompt/pré-execução como a maioria dos outros shells. Por causa disso, é difícil fornecer ganchos totalmente personalizáveis no `bash`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering: -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- Para executar uma função personalizada logo antes de o prompt ser inicializado, define uma nova função e, em seguida, atribui seu nome a `starship_precmd_user_func`. Por exemplo, para exibir um foguete antes do prompt, você faria ```bash function blastoff(){ @@ -45,21 +45,23 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- Para executar uma função personalizada logo antes de um comando ser executado, você pode usar o [`DEBUG` mecanismo de captura](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No entanto, você **deve** capturar o sinal DEBUG _antes_ de inicializar o Starship! Starship pode preservar o valor da captura do DEBUG, mas se a captura for substituída após a inicialização do starship, algumas funcionalidades serão interrompidas. ```bash function blastoff(){ echo "🚀" } -trap blastoff DEBUG # Trap DEBUG *before* running starship +trap blastoff DEBUG # Captura o DEBUG *antes* de executar a nave estelar +set -o functrace eval $(starship init bash) +set +o functrace ``` -## Custom pre-prompt and pre-execution Commands in PowerShell +## Comandos personalizados de pré-prompt e pré-execução no PowerShell -PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering: +PowerShell não possui uma estrutura formal pré-prompt/pré-execução como a maioria dos outros shells. Por causa disso, é difícil fornecer ganchos totalmente personalizáveis no `powershell`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering: -Create a function named `Invoke-Starship-PreCommand` +Crie uma função chamada `Invoke-Starship-PreCommand` ```powershell function Invoke-Starship-PreCommand { @@ -67,11 +69,11 @@ function Invoke-Starship-PreCommand { } ``` -## Change Window Title +## Alterar Título da Janela -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +Alguns prompts do shell alterarão automaticamente o título da janela para você (ex., para refletir no seu diretório de trabalho). Fish ainda faz isso por padrão. Starship não faz isso, mas é bastante simples adicionar essa funcionalidade para `bash`, `zsh`, `cmd` ou `powershell`. -First, define a window title change function (identical in bash and zsh): +Primeiro, defina uma função de mudança de título da janela (idêntica em bash e zsh): ```bash function set_win_title(){ @@ -79,23 +81,23 @@ function set_win_title(){ } ``` -You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). +Você pode usar variáveis para personalizar este título (`$USER`, `$HOSTNAME` e `$PWD` são escolhas populares). -In `bash`, set this function to be the precmd starship function: +No `bash`, defina esta função como a função precmd da nave estelar: ```bash starship_precmd_user_func="set_win_title" ``` -In `zsh`, add this to the `precmd_functions` array: +No `zsh`, adicione isso ao array `precmd_functions`: ```bash precmd_functions+=(set_win_title) ``` -If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. +Se você gostar do resultado, adicione estas linhas ao seu arquivo de configuração do shell (`~/.bashrc` ou `~/.zshrc`) para torná-lo permanente. -For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: +Por exemplo, se você deseja exibir seu diretório atual no título da guia do terminal, adicione o seguinte trecho ao seu `~/.bashrc` ou `~/.zshrc`: ```bash function set_win_title(){ @@ -104,7 +106,7 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` -For Cmd, you can change the window title using the `starship_preprompt_user_func` function. +Para Cmd, você pode alterar o título da janela usando a função `starship_preprompt_user_func`. ```lua function starship_preprompt_user_func(prompt) @@ -114,88 +116,88 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. +Você também pode definir uma saída semelhante com o PowerShell criando uma função chamada `Invoke-Starship-PreCommand`. ```powershell -# edit $PROFILE +# editar $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") } -Invoke-Expression (&starship init powershell) +Invoke-Expression (& starship init powershell) ``` -## Enable Right Prompt +## Ativando o Prompt Direito -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`. +Alguns shells suportam um prompt direito que é renderizado na mesma linha que a entrada. Starship pode definir o conteúdo do prompt correto usando a opção `right_format`. Qualquer módulo que pode ser usado no `format` também é compatível com `right_format`. A variável `$all` conterá apenas módulos não usado explicitamente em `format` ou `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). +Nota: O prompt direito é uma única linha após o local de entrada. Para alinhar à direita os módulos acima a linha de entrada em um prompt de várias linhas, consulte o [módulo fill](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` é atualmente compatível com os seguintes shells: elvish, fish, zsh, xonsh, cmd. ### Exemplo ```toml # ~/.config/starship.toml -# A minimal left prompt +# Um prompt mínimo à esquerda format = """$character""" -# move the rest of the prompt to the right +# movw o restante do prompt para a direita right_format = """$all""" ``` -Produces a prompt like the following: +Produz um prompt como o seguinte: ``` ▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s ``` -## Continuation Prompt +## Prompt de Continuação -Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote). +Alguns shells suportam um prompt de continuação junto com o prompt normal. Esse prompt é renderizado em vez do prompt normal quando o usuário insere uma instrução incompleta (como um único parêntese esquerdo ou aspas). -Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `"[∙](bright-black) "`. +Starship pode definir o prompt de continuação usando a opção `continuation_prompt`. O prompt padrão é `"[∙](bright-black) "`. -Note: `continuation_prompt` should be set to a literal string without any variables. +Nota: `continuation_prompt` deve ser definido como uma string literal sem nenhuma variável. -Note: Continuation prompts are only available in the following shells: +Nota: os prompts de continuação estão disponíveis apenas nos seguintes shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Exemplo ```toml # ~/.config/starship.toml -# A continuation prompt that displays two filled in arrows +# Um prompt de continuação que exibe duas setas preenchidas continuation_prompt = "▶▶" ``` ## Estilo dos textos -Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: +As strings de estilo são uma lista de palavras, separadas por espaços em branco. As palavras não diferenciam maiúsculas de minúsculas (ou seja, `bold` e `BoLd` são considerados a mesma string). Cada palavra pode ser uma das seguintes: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +onde `` é um especificador de cor (discutido abaixo). `fg:` e `` atualmente fazem a mesma coisa, embora isso possa mudar no futuro. `inverted` troca as cores de fundo e primeiro plano. A ordem das palavras na string não importa. -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +O token `none` substitui todos os outros tokens em uma string se não fizer parte de um especificador `bg:`, de modo que, ex., `fg:red none fg:blue` ainda criará uma string sem estilo. `bg:none` define o plano de fundo para a cor padrão para que `fg:red bg:none` seja equivalente a `red` ou `fg:red` e `bg:green fg:red bg:none` também é equivalente a `fg:red` ou `red`. Pode ser um erro usar `none` em conjunto com outros tokens no futuro. -A color specifier can be one of the following: +Um especificador de cor pode ser um dos seguintes: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- Uma das cores padrão do terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Você pode, opcionalmente, prefixar esses com `bright-` para obter a versão brilhante/clara (por exemplo, `bright-white`). +- Um `#` seguido por um número hexadecimal de seis dígitos. Especifica um [Código hexadecimal de cor RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- Um número entre 0-255. Especifica um [Código de cores ANSI de 8 bits](https://i.stack.imgur.com/KTSQa.png). -If multiple colors are specified for foreground/background, the last one in the string will take priority. +Se várias cores forem especificadas para primeiro plano/plano de fundo, a última na string terá prioridade. diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md index 92e5c86c..db695672 100644 --- a/docs/pt-BR/config/README.md +++ b/docs/pt-BR/config/README.md @@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Todas as configurações do starship são feitas neste arquivo [TOML](https://github.com/toml-lang/toml): ```toml -#Insere uma linha vazia entre os prompts +# Insere uma quebra de linha entre os prompts do shell add_newline = true -# Substitui o simbolo "❯" do prompt por "➜" -[character] # O nome do módulo que nos estamos configurando é "character" -success_symbol = "[➜](bold green)" # O seguimento do "success_symbol" é alterado para "➜" com a cor "bold green" +# Substitui o símbolo "❯" no prompt por "➜" +[character] # O nome do módulo que estamos configurando é "character" +success_symbol = "[➜](bold green)" # O segmento "success_symbol" está sendo definido como "➜" com a cor "verde em negrito" -# Desabilita o módulo de package, ocultando completamente do prompt +# Desabilita o módulo do pacote, ocultando-o completamente do prompt [package] disabled = true ``` @@ -33,7 +33,7 @@ No PowerShell (Windows) você pode adicionar a seguinte linha no seu `$PROFILE`: $ENV:STARSHIP_CONFIG = "$HOME\example\non\default\path\starship.toml" ``` -Or for Cmd (Windows) would be adding this line to your `starship.lua`: +Ou para Cmd (Windows) seria adicionar esta linha no seu `starship.lua`: ```lua os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\starship.toml') @@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### Logging -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +Por padrão, o starship registra avisos e erros em um arquivo chamado `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, onde a chave de sessão corresponde a uma instância do seu terminal. Isso, no entanto, pode ser alterado usando a variável de ambiente `STARSHIP_CACHE`: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -53,7 +53,7 @@ No PowerShell (Windows) você pode adicionar a seguinte linha no seu `$PROFILE`: $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` -Or for Cmd (Windows) would be adding this line to your `starship.lua`: +Ou para Cmd (Windows) seria adicionar esta linha no seu `starship.lua`: ```lua os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') @@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### Terminologia -**Module**: A component in the prompt giving information based on contextual information from your OS. 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. +**Módulo**: Um componente no prompt que fornece informações com base em informações contextuais do seu sistema operacional. Por exemplo, o módulo "nodejs" mostra a versão do Node.js que está atualmente instalada em seu computador, se seu diretório atual for um projeto 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. +**Variável**: Subcomponentes menores que contêm informações fornecidas pelo módulo. Por exemplo, a variável "version" no módulo "nodejs" contém a versão atual do 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. +Por convenção, a maioria dos módulos tem um prefixo de cor de terminal padrão (ex., `via` em "nodejs") e um espaço vazio como sufixo. ### Formatação de Strings -Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. +As strings de formato são o formato com o qual um módulo imprime todas as suas variáveis. A maioria dos módulos tem uma entrada chamada `format` que configura o formato de exibição do módulo. Você pode usar textos, variáveis e grupos de texto em uma string de formato. #### Variável -A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. +Uma variável contém um símbolo `$` seguido pelo nome da variável. O nome de uma variável pode conter apenas letras, números e `_`. -For example: +Por exemplo: - `$version` é uma formatação de string com uma variável chamada `version`. - `$git_branch$git_commit` é uma formatação de string com duas variáveis chamadas `git_branch` e `git_commit`. @@ -83,13 +83,13 @@ For example: #### Grupo de Texto -A text group is made up of two different parts. +Um grupo de texto é composto de duas partes diferentes. -The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. +A primeira parte, que está entre um `[]`, é uma [string de formato](#format-strings). Você pode adicionar textos, variáveis ou até mesmo grupos de texto aninhados nele. -In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. +Na segunda parte, que está dentro de um `()`, está uma [string de estilo](#style-strings). Isso pode ser usado para estilizar a primeira parte. -For example: +Por exemplo: - `[on](red bold)` vai imprimir uma string `on` com texto em negrito e com a cor vermelha. - `[⌘ $version](bold green)` vai imprimir o simbolo `⌘` seguido pela variável `version`, com o texto em negrito e na cor verde. @@ -97,7 +97,7 @@ For example: #### Estilo dos textos -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +A maioria dos módulos no starship permite que você configure seus estilos de exibição. Isso é feito com uma entrada (normalmente chamada de `estilo`) que é uma string especificando a configuração. Aqui estão alguns exemplos de strings de estilo junto com o que elas fazem. Para obter detalhes sobre a sintaxe completa, consulte o [guia de configuração avançada](/advanced-config/). - `"fg:green bg:blue"` deixa o texto verde com o fundo azul - `"bg:blue fg:bright-green"` deixa o texto verde brilhante com o fundo azul @@ -106,13 +106,13 @@ Most modules in starship allow you to configure their display styles. This is do - `"bold italic fg:purple"` deixa o texto em negrito e itálico com a cor roxa - `""` desabilita explicitamente todos os estilos -Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. +Observe que a aparência do estilo será controlada pelo emulador de terminal. Por exemplo, alguns emuladores de terminal irão clarear as cores em vez de colocar o texto em negrito, e alguns temas de cores usam os mesmos valores para as cores normais e brilhantes. Além disso, para obter texto em itálico, seu terminal deve suportar itálico. #### Formatação de String Condicional -A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. +Uma string de formato condicional envolta de `(` e `)` não será renderizada se todas as variáveis internas estiverem vazias. -For example: +Por exemplo: - `(@$region)` não vai exibir nada caso a variável `region` seja `None` ou vazia, caso contrario vai exibir `@` seguido pelo valor da variável region. - `(texto qualquer)` não vai exibir nada sempre, pois não existe variável entre os parenteses. @@ -120,22 +120,22 @@ For example: #### Caracteres Especiais -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. +Os seguintes símbolos têm uso especial em uma string de formato e devem ser evitados: `$ \ [ ] ( )`. -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). +Observe que o TOML tem [strings básicas e strings literais](https://toml.io/en/v1.0.0#string). É recomendado usar uma string literal (entre aspas simples) em seu config. Se você quiser usar uma string básica (entre aspas duplas), você deve escapar da própria barra invertida (ou seja, use `\\`). -For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: +Por exemplo, quando você deseja imprimir um símbolo `$` em uma nova linha, as seguintes configurações para `format` são equivalentes: ```toml -# with basic string +# com string básica format = "\n\\$" -# with multiline basic string +# com string básica multilinha format = """ \\$""" -# with literal string +# com string literal format = ''' \$''' @@ -143,7 +143,7 @@ format = ''' ## Prompt de Comando -This is the list of prompt-wide configuration options. +Esta é a lista de opções de configuração em todo o prompt. ### Opções @@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Tempo limite de execução de comandos pelo starship (em milissegundos). | | `add_newline` | `true` | Insere linha vazia entre os prompts do shell. | - ### Exemplo ```toml @@ -167,24 +166,25 @@ format = """ [│](bold green)$directory$rust$package [└─>](bold green) """ -# Wait 10 milliseconds for starship to check files under the current directory. +# Espera 10 milliseconds para que o starship verifique os arquivos no diretório atual. scan_timeout = 10 -# Disable the blank line at the start of the prompt +# Remove a quebra de linha no início do prompt add_newline = false ``` ### Format de Prompt Padrão -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: +O padrão `format` é usado para definir o formato do prompt, se estiver vazio ou nenhum `format` for fornecido. O padrão é como mostrado: ```toml format = "$all" -# Which is equivalent to +# Equivalente a format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -251,22 +252,22 @@ $shell\ $character""" ``` -If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Eg. +Se você quiser apenas estender o formato padrão, você pode usar `$all`; os módulos que você adicionar explicitamente ao formato não serão duplicados. Ex. ```toml -# Move the directory to the second line -format="$all$directory$character" +# Move o diretório para a segunda linha +format = "$all$directory$character" ``` ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +O módulo `aws` exibi a região e perfil atual do AWS. Isto é baseado nas variáveis de env `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` contidas no arquivo `~/.aws/config`. Este modulo exibi também tempo de expiração de credenciais temporarias. -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. +Quando usar [aws-vault](https://github.com/99designs/aws-vault) o perfil é lido da variável `AWS_VAULT` e o tempo de expiração de credenciais é lida da variável de env `AWS_SESSION_EXPIRATION`. -When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. +Quando usar [awsu](https://github.com/kreuzwerker/awsu) o perfil é lido da varável de env `AWSU_PROFILE`. -When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +Quando usar [AWSume](https://awsu.me) o perfil é lido da variável `AWSUME_PROFILE` e o tempo de expiração de credenciais é lida da variável de env `AWSUME_EXPIRATION`. ### Opções @@ -277,7 +278,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | `region_aliases` | | Tabela de aleases de regiões a serem exibidas, além do nome da AWS. | | `style` | `"bold yellow"` | O estilo do módulo. | | `expiration_symbol` | `X` | O simbolo exibido quando as credenciais temporárias estão expiradas. | -| `disabled` | `false` | Desabilita o modulo `AWS`. | +| `disabled` | `false` | Desabilita o módulo `AWS`. | ### Variáveis @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplos @@ -299,7 +300,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL # ~/.config/starship.toml [aws] -format = 'on [$symbol($profile )(\($region\) )]($style)' +format = 'em [$symbol($profile )(\($region\) )]($style)' style = "bold blue" symbol = "🅰 " [aws.region_aliases] @@ -313,7 +314,7 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " +format = "em [$symbol$region]($style) " style = "bold blue" symbol = "🅰 " [aws.region_aliases] @@ -327,14 +328,14 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " +format = "em [$symbol$profile]($style) " style = "bold blue" symbol = "🅰 " ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +O módulo `azure` exibe a assinatura Azure atual. Isto é baseado na exibição do nome da assinatura padrão, como definido no arquivo em `~/.azure/azureProfile.json`. ### Opções @@ -352,14 +353,14 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = "em [$symbol($subscription)]($style) " symbol = "ﴃ " style = "blue bold" ``` ## Bateria -The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. +O módulo `battery` exibe o quanto a bateria do dispositivo está carregada e o estado atual de carregamento. O módulo é visível somente quando a bateria está abaixo de 10%. ### Opções @@ -387,7 +388,7 @@ discharging_symbol = "💀 " ### Indicador de bateria -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown: +A configuração `display` é usada para definir quando o indicador de bateria deve ser exibido (threshold), qual deve ser o simbolo(symbol) e como você gostaria de exibir (style). Se nenhum `display` for fornecido. O padrão é como mostrado: ```toml [[battery.display]] @@ -395,11 +396,11 @@ threshold = 10 style = "bold red" ``` -The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. +O valor padrão das opções `charging_symbol` e `discharging_symbol`é respectivamente o valor das opções `battery`'s `charging_symbol` e `discharging_symbol`. #### Opções -The `display` option is an array of the following table. +A opção `display` é um array da seguinte tabela. | Opções | Padrão | Descrição | | -------------------- | ---------- | -------------------------------------------------------------------------------------------------- | @@ -411,37 +412,36 @@ The `display` option is an array of the following table. #### Exemplo ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Caractere -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +O módulo `character` exibe um caracter (normalmente uma seta) ao lado de onde o texto começa a ser inserido no terminal. -The character will tell you whether the last command was successful or not. It can do this in two ways: +O caractere vai te dizer se o ultimo comando foi bem sucedido ou não. Você pode fazer isto de duas maneiras: - alterando a cor (`red`/`green`) - alterando a forma (`❯`/`✖`) -By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +Por padrão ele apenas muda de cor. Se você deseja alterar o formato de uma olhada [neste exemplo](#with-custom-error-shape). -::: warning +::: atenção -`error_symbol` is not supported on nu shell. +`error_symbol` não é suportado pelo nu shell. ::: -::: warning +::: atenção `vicmd_symbol` is only supported in cmd, fish and zsh. @@ -496,7 +496,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: +O módulo `cmake` exibe a versão instalada do [CMake](https://cmake.org/). Por padrão o módulo será ativo se qualquer das condições a seguir for atendida: - O diretorio atual cotem um arquivo `CMakeLists.txt` - O diretorio atual tem um arquivo `CMakeCache.txt` @@ -522,11 +522,11 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ## COBOL / GNUCOBOL -The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met: +O módulo `cobol` exibe a versão instalada atual do COBOL. Por padrão, o módulo será exibido se qualquer das seguintes condições for atendida: - O diretório atual tem qualquer arquivo com extensão `.cob` or `.COB` - O diretório atual tenham qualquer arquivo com extensão `.cbl` or `.CBL` @@ -552,37 +552,32 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ## Tempo de execução do comando -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. +O módulo `cmd_duration` exibi o tempo que o ultimo comando levou para executar. O módulo vai exibir somente se o comando levar mais de dois segundos, ou o valor de configuração `min_time` existir. -::: warning Do not hook the DEBUG trap in Bash +::: warning Não utilize o DEBUG-trap no Bash -If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. +Se você esta rodando o Starship no `bash`, você não deve ativar a armadilha `DEBUG` após rodar `eval $(starship init $0)`, ou este módulo **vai** quebrar. ::: -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. +Usuários do bash que precisam de funções pre-executadas podem usar [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simplesmente defina os arrays `preexec_functions` e `precmd_functions` antes de rodar `eval $(starship init $0)`, e depois pode proceder normalmente. ### Opções -| Opções | Padrão | Descrição | -| -------------------- | ----------------------------- | ------------------------------------------------------------- | -| `min_time` | `2_000` | Duração mais curta para exibir o tempo (em milissegundos). | -| `show_milliseconds` | `false` | Exibir milissegundos ou invés de segundos para duração. | -| `format` | `"took [$duration]($style) "` | O formato do módulo. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `cmd_duration`. | -| `show_notifications` | `false` | Exibi notificações no desktop quando o comando for concluído. | -| `min_time_to_notify` | `45_000` | Tempo minimo para notificação (em milissegundos). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Opções | Padrão | Descrição | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Duração mais curta para exibir o tempo (em milissegundos). | +| `show_milliseconds` | `false` | Exibir milissegundos ou invés de segundos para duração. | +| `format` | `"took [$duration]($style) "` | O formato do módulo. | +| `style` | `"bold yellow"` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `cmd_duration`. | +| `show_notifications` | `false` | Exibi notificações no desktop quando o comando for concluído. | +| `min_time_to_notify` | `45_000` | Tempo minimo para notificação (em milissegundos). | +| `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. | ### Variáveis @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | O tempo que levou para executar o comando | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -600,16 +595,16 @@ Showing desktop notifications requires starship to be built with `notify-rust` s [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = "levou [$duration](bold yellow)" ``` ## Conda -The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. +O módulo `conda` exibe o ambiente atual do [Conda](https://docs.conda.io/en/latest/), se o `$CONDA_DEFAULT_ENV` estiver definido. -::: tip +::: dica -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Isso não suprime o modificador de prompt do conda, você pode executar `conda config --set changeps1 False`. ::: @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -643,9 +638,41 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Opções + +| Opções | Padrão | Descrição | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | O estilo do módulo. | +| `format` | "[$symbol \\[$name\\]]($style) " | O formato do módulo. | +| `disabled` | `false` | Desabilita o módulo `container`. | + +### Variáveis + +| Variável | Exemplo | Descrição | +| --------- | ------------------- | ---------------------------------- | +| name | `fedora-toolbox:35` | The name of the container | +| symbol | | Espelha o valor da opção `símbolo` | +| style\* | | Espelha o valor da opção `style` | + +*: Esta variável só pode ser usada como parte de uma string de estilo + +### Exemplo + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal -The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `crystal` exibe a versão instalada atual do [Crystal](https://crystal-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `shard.yml` - O diretório atual contem um arquivo `.cr` @@ -654,7 +681,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Opções | Padrão | Descrição | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `symbol` | `"🔮 "` | O simbolo usado antes de exibir a versão do crystal. | +| `symbol` | `"🔮 "` | O símbolo usado antes de exibir a versão do crystal. | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | | `style` | `"bold red"` | O estilo do módulo. | @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -684,7 +711,7 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `dart` exibe a versão atual instalada do [Dart](https://dart.dev/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem algum arquivo com extensão `.dart` - O diretório atual contem um diretório `.dart_tool` @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -724,7 +751,8 @@ format = "via [🔰 $version](bold red) " ## Deno -The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `deno` exibe a versão instalada atual do [Deno](https://deno.land/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: + - O diretório atual tenha um arquivo `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` ### Opções @@ -759,11 +787,11 @@ format = "via [🦕 $version](green bold) " ## Diretório -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. +O módulo `directory` exibe o caminho do diretório atual, truncando as três pastas pai. Seu diretório será truncando na raiz do repositório git que você estiver atualmente. -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. +Quando usar a opção de estilo fish pwd, ao invés de esconder o caminho que é truncado, você vai ver um nome encurtado de cada diretório baseado no número que você habilitar para a opção. -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`. +Por exemplo, dado `~/Dev/Nix/nixpkgs/pkgs` onde `nixpkgs` é o repositório raiz e a opção esta definida para `1`. Você verá `~/D/N/nixpkgs/pkgs`, enquanto antes seria `nixpkgs/pkgs`. ### Opções @@ -782,7 +810,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `use_os_path_sep` | `true` | Use o separador especifico do SO em vez de sempre usar `/` (ex: `\` no Windows) |
-This module has a few advanced configuration options that control how the directory is displayed. +Este módulo tem algumas configurações avançadas que controlam como o diretório é exibido. | Opções Avançadas | Padrão | Descrição | | --------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -790,7 +818,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `fish_style_pwd_dir_length` | `0` | O número de caracteres para usar quando aplicado no path logico do fish shell pwd. | | `use_logical_path` | `true` | Se `true` exibe um caminho lógico originado do shell via `PWD` ou`--logical-path`. Se `false` em vez disso, exibe o caminho do filesystem com os symlinks resolvidos. | -`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. +`substitutions` aceita você definir substituições arbitrarias para strings literais que ocorra no path, por exemplo prefixos de rede longos ou diretórios de desenvolvimento (ex:. Java). Note isto irá desabilita o estilo PWD do fish. ```toml [directory.substitutions] @@ -798,7 +826,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an "src/com/long/java/path" = "mypath" ``` -`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`. +`fish_style_pwd_dir_length` interage com as opções de truncação padrão de uma forma que pode suprimir no começo: se não for zero, os componentes do path que normalmente seriam truncados são exibidos com todos caracteres. Por exemplo, o caminho `/built/this/city/on/rock/and/roll`, que normalmente seria exibido como`rock/and/roll`, seria exibido como `/b/t/c/o/rock/and/roll` com`fish_style_pwd_dir_length = 1`--os componentes de path que normalmente seriam removidos são exibidos com um único caractere. Para `fish_style_pwd_dir_length = 2`, seria `/bu/th/ci/on/rock/and/roll`.
@@ -806,10 +834,10 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variável | Exemplo | Descrição | | --------- | --------------------- | -------------------------------- | -| path | `"D:/Projects"` | O caminho do diretório atual | +| path | `"D:/Projetos"` | O caminho do diretório atual | | style\* | `"black bold dimmed"` | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -823,7 +851,7 @@ truncation_symbol = "…/" ## Docker Context -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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +O módulo `docker_context` exibe o [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) ativo atualmente se não estiver definido como `default` ou se as variáveis de ambiente `DOCKER_MACHINE_NAME`, `DOCKER_HOST` ou `DOCKER_CONTEXT` estiverem definidas (iram sobrescrever o contexto atual). ### Opções @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -859,9 +887,9 @@ 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. +O módulo `dotnet` exibe a versão relevante do [.NET Core SDK](https://dotnet.microsoft.com/) para a pasta atual. Se o SDK foi fixado na pasta atual, a versão será exibida. Caso contrario será exibida a ultima versão instalada do 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: +Por padrão o módulo vai apenas exibir no seu prompt quando um ou mais dos seguintes arquivos estiverem presente no diretório: - `global.json` - `project.json` @@ -872,11 +900,11 @@ By default this module will only be shown in your prompt when one or more of the - `*.fsproj` - `*.xproj` -You'll also need the .NET Core SDK installed in order to use it correctly. +Você também precisa do .NET Core SDK instalado para usá-lo corretamente. -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. +Internamente, este módulo usa seu próprio mecanismo de detecção de versão. Normalmente é duas vezes mais rápido que executar `dotnet --version`, mas pode exibir uma versão errado se o projeto .NET tiver o layout de diretório incomum. Se a precisão é mais importante que velocidade, você pode desabilitar o mecanismo definindo `heuristic = false` nas opções do modulo. -The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. +O módulo também vai exibir o Target Framework Moniker () quando o diretório atual tiver o arquivo csproj. ### Opções @@ -884,7 +912,7 @@ The module will also show the Target Framework Moniker ( Nada é exibido. - 1 job -> `symbol` é exibido. - 2 jobs or more -> `symbol` + `number` é exibido. -::: warning +::: atenção -This module is not supported on tcsh and nu. +Este módulo não é suportado em tcsh e nu. ::: -::: warning +::: atenção -The `threshold` option is deprecated, but if you want to use it, 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. If `threshold` is set to 0, then the module will also show when there are 0 jobs running. +A opção `threshold` está obsoleta, mas se você quiser usa-la, o módulo vai exibir o numero de jobs rodando se for maior que 1 ou maior que o valor configurado na `threshold`, se ele existir. Se o valor `threshold` for definido como 0, então o módulo vai exibir quando tiver 0 jobs rodando. ::: @@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will | Opções | Padrão | Descrição | | ------------------ | ----------------------------- | ------------------------------------------------------------------------- | -| `threshold`\* | `1` | Exibe o número de jobs se excedido. | +| `threshold`* | `1` | Exibe o número de jobs se excedido. | | `symbol_threshold` | `1` | Exibe `symbol` se o número de jobs for ao menos `symbol_threshold`. | | `number_threshold` | `2` | Exibe o número de jobs se o número de jobs é ao menos `number_threshold`. | | `format` | `"[$symbol$number]($style) "` | O formato do módulo. | | `symbol` | `"✦"` | A string usada para representar a variável `symbol`. | | `style` | `"bold blue"` | O estilo do módulo. | | `disabled` | `false` | Desabilita o módulo `jobs`. | - \*: This option is deprecated, please use the -`number_threshold` and `symbol_threshold` options instead. +*: Esta opção está obsoleta, por favor use o `number_threshold` e `symbol_threshold` em vez disso. ### Variáveis @@ -1630,7 +1658,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1645,7 +1673,7 @@ symbol_threshold = 0 ## Julia -The `julia` module shows the currently installed version of [Julia](https://julialang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `julia` exibe a versão atual instalada do [Julia](https://julialang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `Project.toml` - O diretório atual contem um arquivo `Manifest.toml` @@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1683,9 +1711,42 @@ The `julia` module shows the currently installed version of [Julia](https://juli symbol = "∴ " ``` +## localip + +The `localip` module shows the IPv4 address of the primary network interface. + +### Opções + +| Opções | Padrão | Descrição | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | O formato do módulo. | +| `style` | `"bold yellow"` | O estilo do módulo. | +| `disabled` | `true` | Desabilita o módulo `localip`. | + +### Variáveis + +| Variável | Exemplo | Descrição | +| --------- | ------------ | --------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Espelha o valor da opção `style` | + +*: Esta variável só pode ser usada como parte de uma string de estilo + +### Exemplo + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Kotlin -The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `kotlin` exibie a versão atual instalada do [Kotlin](https://kotlinlang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `.kt` ou um arquivo `.kts` @@ -1711,7 +1772,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1726,17 +1787,17 @@ symbol = "🅺 " # ~/.config/starship.toml [kotlin] -# Uses the Kotlin Compiler binary to get the installed version +# Usa o binário do compilador Kotlin para obter a versão instalada kotlin_binary = "kotlinc" ``` ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#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`. +Exibe o [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) nome e, se definido, o namespace do arquivo kubeconfig. O namespace precisa estar definido no arquivo kubeconfig, isto pode ser feito via `kubectl config set-context starship-cluster --namespace astronaut`. Se a env var `$KUBECONFIG` estiver definida o módulo vai usa-la ao invés de usar o `~/.kube/config`. -::: tip +::: dica -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. ::: @@ -1759,7 +1820,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1767,7 +1828,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [kubernetes] -format = 'on [⛵ $context \($namespace\)](dimmed green) ' +format = 'em [⛵ $context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] "dev.local.cluster.k8s" = "dev" @@ -1777,34 +1838,34 @@ disabled = false #### Correspondência Regex -Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions. +Adicional para aliasing simples, `context_aliases` também suporta correspondência estendida e renomeação usando expressão regular. -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. +A expressão regular deve coincidir com todo o contexto kube, Grupos de captura podem ser referenciados usando `$name` e `$N` na substituição. Isto esta mais explicado na documentação do [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace). -Long and automatically generated cluster names can be identified and shortened using regular expressions: +Nomes longos de clusters gerados automaticamente podem ser encurtados usando expressão regular: ```toml [kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: +# Os contextos OpenShift carregam o namespace e o usuário no contexto kube: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" -# Or better, to rename every OpenShift cluster at once: +# Ou melhor, renomear todos os clusters do OpenShift de uma só vez: ".*/(?P[\\w-]+)/.*" = "$cluster" -# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. -# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) -# and renames every matching kube context into a more readable format (`gke-cluster-name`): +# Contextos do GKE, AWS e outros provedores de nuvem geralmente carregam informações adicionais, como a região/zona. +# A entrada a seguir corresponde ao formato do GKE (`gke_projectname_zone_cluster-name`) +# e renomeia cada contexto kube correspondente em um formato mais legível (`gke-cluster-name`): "gke_.*_(?P[\\w-]+)" = "gke-$cluster" ``` -## Quebra de linha +## Quebra de Linha -The `line_break` module separates the prompt into two lines. +O módulo `line_break` separa o prompt em duas linhas. ### Opções | Opções | Padrão | Descrição | | ---------- | ------- | ----------------------------------------------------------------------------------- | -| `disabled` | `false` | Desabilita o módulo `line_break`, fazendo com que o prompt seja em uma unica linha. | +| `disabled` | `false` | Desabilita o módulo `line_break`, fazendo com que o prompt seja em uma única linha. | ### Exemplo @@ -1817,7 +1878,7 @@ disabled = true ## Lua -The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `lua` exibe a versão atual instalada do [Lua](http://www.lua.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contém um arquivo `.lua-version` - O diretório atual contém um diretório `lua` @@ -1845,7 +1906,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1856,52 +1917,40 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o format = "via [🌕 $version](bold blue) " ``` -## Uso de memória +## Uso de Memória -The `memory_usage` module shows current system memory and swap usage. +O módulo `memory_usage` mostra a memória atual do sistema e o uso de troca. -By default the swap usage is displayed if the total system swap is non-zero. +Por padrão o uso do swap é exibido se o total de swap do sistema é diferente de zero. -::: tip +::: dica -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. ::: ### Opções -| Opções | Padrão | Descrição | -| ---------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `threshold` | `75` | Esconde o uso de memoria a menos que exceda esta porcentagem. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | O formato do módulo. | -| `symbol` | `"🐏"` | O simbolo usado antes de exibir o uso de memoria. | -| `style` | `"bold dimmed white"` | O estilo do módulo. | -| `disabled` | `true` | Desabilita o módulo `memory_usage - - - +| Opções | Padrão | Descrição | +| ----------- | ----------------------------------------------- | ------------------------------------------------------------- | +| `threshold` | `75` | Esconde o uso de memoria a menos que exceda esta porcentagem. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | O formato do módulo. | +| `symbol` | `"🐏"` | O simbolo usado antes de exibir o uso de memoria. | +| `style` | `"bold dimmed white"` | O estilo do módulo. | +| `disabled` | `true` | Desabilita o módulo `memory_usage`. | -

Variáveis

+### Variáveis - - - - - - - - - - - -
VariávelExemploDescrição
ram31GiB/65GiB` | O uso/total de memoria RAM atual do sistema. | -| ram_pct | `48%` | A porcentagem de uso atual da memoria do sistema. | -| swap\*\* | `1GiB/4GiB` | O tamanho atual do swap do sistema. | -| swap_pct\*\* | `77%` | A porcentagem atual de uso do swap. | -| symbol | `🐏` | Espelha o valor da opção `símbolo` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| ---------------- | ------------- | ------------------------------------------------- | +| ram | `31GiB/65GiB` | O uso/total de memoria RAM atual do sistema. | +| ram_pct | `48%` | A porcentagem de uso atual da memoria do sistema. | +| swap\*\* | `1GiB/4GiB` | O tamanho atual do swap do sistema. | +| swap_pct\*\* | `77%` | A porcentagem atual de uso do swap. | +| symbol | `🐏` | Espelha o valor da opção `símbolo` | +| style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string \*\*: The SWAP file information is only displayed if detected on the current system +*: Esta variável só pode ser usada como parte de uma string de estilo *\*: As informações do arquivo SWAP são exibidas apenas se detectadas no sistema atual ### Exemplo @@ -1917,7 +1966,7 @@ style = "bold dimmed green" ## Mercurial Branch -The `hg_branch` module shows the active branch of the repo in your current directory. +O módulo `hg_branch` exibe o braço atual do repositório no diretório atual. ### Opções @@ -1938,7 +1987,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1946,14 +1995,14 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = "em [🌱 $branch](bold purple)" truncation_length = 4 truncation_symbol = "" ``` ## Nim -The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `nim` exibe a versão atual instalada do [Nim](https://nim-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `nim.cfg` - O diretório atual tenha um arquivo com a extensão `.nim` @@ -1966,7 +2015,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | O simbolo usado antes de exibir a versão do Nim. | +| `symbol` | `"👑 "` | O símbolo usado antes de exibir a versão do Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["nim.cfg"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | @@ -1981,7 +2030,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1995,7 +2044,7 @@ symbol = "🎣 " ## Nix-shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. +O módulo `nix_shell` exibe o ambiente [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html). O módulo vai exibir quando estiver dentro de um ambiente nix-shell. ### Opções @@ -2017,7 +2066,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2033,7 +2082,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' ## Node.js -The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `nodejs` exibe a versão atual instalada do [Node.js](https://nodejs.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem o arquivo `package.json` - O diretório atual tenha um arquivo `.node-version` @@ -2048,7 +2097,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Uma string que representa o simbolo do Node.js. | +| `symbol` | `" "` | Uma string que representa o simbolo do Node.js. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["package.json", ".node-version"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `["node_modules"]` | Quais pastas devem ativar este módulo. | @@ -2064,7 +2113,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2077,7 +2126,7 @@ format = "via [🤖 $version](bold green) " ## OCaml -The `ocaml` module shows the currently installed version of [OCaml](https://ocaml.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `ocaml` exibe a versão atual instalada do [OCaml](https://ocaml.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contenha um arquivo com a extensão`.opam` ou um diretório `_opam` - O diretório atual tenha um diretório `esy.lock` @@ -2092,7 +2141,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | A string de formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | O simbolo usado antes de exibir a versão do OCaml. | +| `symbol` | `"🐫 "` | O símbolo usado antes de exibir a versão do OCaml. | | `global_switch_indicator` | `""` | A string usada para representar a mudança global OPAM. | | `local_switch_indicator` | `"*"` | A string usada para representar as mudanças locais do OPAM. | | `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Quais extensões devem ativar este módulo. | @@ -2111,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2124,7 +2173,7 @@ format = "via [🐪 $version]($style) " ## OpenStack -The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. +O módulo `openstack` exibe o OpenStack cloud e projeto atual. O módulo apenas ativa quando a env var `OS_CLOUD` esta definida, neste caso ele vai ler o arquivo `clouds.yaml` de qualquer um dos [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). para buscar o projeto atual em uso. ### Opções @@ -2144,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2152,14 +2201,14 @@ The `openstack` module shows the current OpenStack cloud and project. The module # ~/.config/starship.toml [openstack] -format = "on [$symbol$cloud(\\($project\\))]($style) " +format = "em [$symbol$cloud(\\($project\\))]($style) " style = "bold yellow" symbol = "☁️ " ``` ## Versionamento de Pacotes -The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. +O módulo `package` é mostrado quando o diretório atual é o repositório de um pacote e mostra sua versão atual. O módulo atualmente suporta pacotes `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart`. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – O versionamento de pacotes `npm` é extraído do `package.json` presente no diretório atual - [**Cargo**](https://doc.rust-lang.org/cargo/) – O versionamento de pacotes `cargo`é extraído do arquivo `Cargo.toml` presente no diretório atual @@ -2185,7 +2234,7 @@ The `package` module is shown when the current directory is the repository for a | Opções | Padrão | Descrição | | ----------------- | --------------------------------- | ------------------------------------------------------------------------------------ | | `format` | `"is [$symbol$version]($style) "` | O formato do módulo. | -| `symbol` | `"📦 "` | O simbolo usado antes de exibir a versão do pacote. | +| `symbol` | `"📦 "` | O símbolo usado antes de exibir a versão do pacote. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | O estilo do módulo. | | `display_private` | `false` | Habilita a exibição da versão para os pacotes marcados como privado. | @@ -2199,7 +2248,7 @@ The `package` module is shown when the current directory is the repository for a | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2212,7 +2261,7 @@ format = "via [🎁 $version](208 bold) " ## Perl -The `perl` module shows the currently installed version of [Perl](https://www.perl.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `perl` exibe a versão atual instalada do [Perl](https://www.perl.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual tanha um aquivo `Makefile.PL` ou `Build.PL` - O diretório atual tenha um arquivo `cpanfile` ou `cpanfile.snapshot` @@ -2226,7 +2275,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | A string de formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | O simbolo usado ante de exibir a versão do Perl | +| `symbol` | `"🐪 "` | O símbolo usado antes de exibir a versão do Perl. | | `detect_extensions` | `["pl", "pm", "pod"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | @@ -2252,7 +2301,7 @@ format = "via [🦪 $version]($style) " ## PHP -The `php` module shows the currently installed version of [PHP](https://www.php.net/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `php` mostra a versão atualmente instalada do [PHP](https://www.php.net/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `composer.json` - O diretório atual tenha um arquivo `.php-version` @@ -2264,7 +2313,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | O simbolo usado antes de exibir a versão do PHP. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | | `detect_extensions` | `["php"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["composer.json", ".php-version"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | @@ -2279,7 +2328,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2292,11 +2341,11 @@ format = "via [🔹 $version](147 bold) " ## Pulumi -The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. +The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version. -::: tip +::: dica -By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). +Por padrão a versão do Pulumi não é exibida, pois leva um tempo maior para ser carregada. Em média a maioria dos plugins leva (~70ms). Se você ainda deseja ativa-la, [siga o exemplo abaixo](#with-pulumi-version). ::: @@ -2307,13 +2356,13 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: ### Opções -| Opções | Padrão | Descrição | -| ---------------- | -------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol$stack]($style) "` | A string de formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Uma string que é exibida antes do Pulumi stack. | -| `style` | `"bold 5"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `pulumi`. | +| Opções | Padrão | Descrição | +| ---------------- | -------------------------------------------- | ------------------------------------------------------------------------------------ | +| `format` | `"via [$symbol($username@)$stack]($style) "` | A string de formato do módulo. | +| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | Uma string que é exibida antes do Pulumi stack. | +| `style` | `"bold 5"` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `pulumi`. | ### Variáveis @@ -2321,10 +2370,11 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: | --------- | ---------- | ---------------------------------- | | version | `v0.12.24` | A versão do `pulumi` | | stack | `dev` | A stack Pulumi atual | +| username | `alice` | The current Pulumi username | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2344,12 +2394,11 @@ format = "[🛥 ($version )$stack]($style) " [pulumi] symbol = "🛥 " format = "[$symbol$stack]($style) " - ``` ## PureScript -The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `purescript` exibe a versão atual instalada do [PureScript](https://www.purescript.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `spago.dhall` - O diretório atual tenha um arquivo com a extensão `.purs` @@ -2360,7 +2409,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | O simbolo usado antes de exibir a versão do PureScript. | +| `symbol` | `"<=> "` | O símbolo usado antes de exibir a versão do PureScript. | | `detect_extensions` | `["purs"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["spago.dhall"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | @@ -2375,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2388,9 +2437,9 @@ format = "via [$symbol$version](bold white)" ## Python -The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated. +O módulo `python` exibe a versão atual instalada do [Python](https://www.python.org/) e o [Python virtual environment](https://docs.python.org/tutorial/venv.html) se algum estiver ativo. -If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. +Se o `pyenv_version_name` estiver definido como `true`, será exibido o nome da versão do pyenv. Caso contrario, ele exibirá o número da versão do `python --version`. Por padrão o módulo vai exibir se uma das condições a seguir for atendida: @@ -2420,11 +2469,11 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: | `detect_folders` | `[]` | Quais pastas devem ativar este módulo | | `disabled` | `false` | Desabilita o módulo `python`. | -::: tip +::: dica -The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. +A variável `python_binary` aceita uma string ou uma lista de strings. O Starship vai tentar executar cada binário até obter um resultado. Note que você pode apenas alterar o binário em que o Starship executa para pegar a versão do Python não os argumentos que são utilizados. -The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. +O valor padrão e a ordem para o `python_binary` foram escolhidos para identificar primeiro uma versão do Python em um ambiente virtualenv/conda (que atualmente adiciona um `python`, não importa se ele aponta pro `python3` ou `python2`). Este tem efeito de lado, se você tenha um sistema com Python 2 instalado, pode ser usado antes de qualquer Python 3 (pelo menos nas Distros Linux que sempre fazem um symlink `/usr/bin/python` para Python 2). Se você não trabalha mais com Python 2, mas não pode remover do sistema o Python 2, alterando este para `"python3"` vai esconder qualquer versão de Python 2, veja o exemplo abaixo. ::: @@ -2452,7 +2501,7 @@ pyenv_version_name = true # ~/.config/starship.toml [python] -# Only use the `python3` binary to get the version. +# Use apenas o binário `python3` para obter a versão. python_binary = "python3" ``` @@ -2460,7 +2509,7 @@ python_binary = "python3" # ~/.config/starship.toml [python] -# Don't trigger for files with the py extension +# Não acione para arquivos com a extensão py detect_extensions = [] ``` @@ -2468,16 +2517,16 @@ detect_extensions = [] # ~/.config/starship.toml [python] -# Display the version of python from inside a local venv. +# Exibe a versão do python de dentro de um venv local. # -# 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? +# Note que isso só funcionará quando o venv estiver dentro do projeto e só +# funcionará apenas no diretório que contém o diretório venv, mas talvez isso seja ok? python_binary = ["./venv/bin/python", "python", "python3", "python2"] ``` ## R -The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met: +O módulo `rlang` mostra a versão atualmente instalada do [R](https://www.r-project.org/). O módulo será mostrado se qualquer uma das seguintes condições for atendida: - O diretório atual tenha um arquivo com a extensão `.R`. - O diretório atual tenha um arquivo com a extensão `.Rd`. @@ -2514,12 +2563,12 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = "com [📐 $version](blue bold) " ``` ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). O módulo vai exibir se algumas das condições a seguir for atendida: +Por padrão o módulo `red` exibe a versão atual instalada do [Red](https://www.red-lang.org/). O módulo vai exibir se algumas das condições a seguir for atendida: - O diretório atual contenha um arquivo com a extensão `.red` or `.reds` @@ -2544,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2557,14 +2606,14 @@ symbol = "🔴 " ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). O módulo vai exibir se algumas das condições a seguir for atendida: +Por padrão o módulo `ruby` vai exibir a versão atual instalada do [Ruby](https://www.ruby-lang.org/). O módulo vai exibir se algumas das condições a seguir for atendida: - O diretório atual tenha um arquivo `Gemfile` - O diretório atual contém um arquivo `.ruby-version` - O diretório atual contem um arquivo `.rb` - As variáveis de ambiente `RUBY_VERSION` ou `RBENV_VERSION` estão definidas -Starship gets the current Ruby version by running `ruby -v`. +O Starship pega a versão atual do Ruby rodando `ruby -v`. ### Opções @@ -2588,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`. | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2601,7 +2650,7 @@ symbol = "🔺 " ## Rust -By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). O módulo vai exibir se algumas das condições a seguir for atendida: +Por padrão o módulo `rust` vai exibir a versão atual instalada do [Rust](https://www.rust-lang.org/). O módulo vai exibir se algumas das condições a seguir for atendida: - O diretório atual contem um arquivo `Cargo.toml` - O diretório atual tenha um arquivo com a extensão `.rs` @@ -2627,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2640,7 +2689,7 @@ format = "via [⚙️ $version](red bold)" ## Scala -The `scala` module shows the currently installed version of [Scala](https://www.scala-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `scala` exibe a versão atual instalada do [Scala](https://www.scala-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `build.sbt`, `.scalaenv` ou `.sbtenv` - O diretório atual tenha um arquivo com a extensão `.scala` ou `.sbt` @@ -2652,7 +2701,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------ | | `format` | `"via [${symbol}(${version} )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "escala"]` | Quais extensões devem ativar este módulo. | +| `detect_extensions` | `["sbt", "scala"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[".metals"]` | Quais pastas devem ativar este módulo. | | `symbol` | `"🆂 "` | Uma string que representa o simbolo do Scala. | @@ -2667,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2680,32 +2729,32 @@ symbol = "🌟 " ## Shell -The `shell` module shows an indicator for currently used shell. +O módulo de `shell` exibe um indicador para o shell que esta sendo usado. -::: tip +::: dica -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. ::: ### Opções -| Opções | Padrão | Descrição | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | Uma string para representar o bash. | -| `fish_indicator` | `fsh` | Uma string usada para representar o fish. | -| `zsh_indicator` | `zsh` | Uma string usada para representar o zsh. | -| `powershell_indicator` | `psh` | Uma string usada para representar o powershell. | -| `ion_indicator` | `ion` | Uma string usada para representar o ion. | -| `elvish_indicator` | `esh` | Uma string usada para representar o elvish. | -| `tcsh_indicator` | `tsh` | Uma string usada para representar o tcsh. | -| `xonsh_indicator` | `xsh` | Uma string usada para representar o xonsh. | -| `cmd_indicator` | `cmd` | A format string used to represent cmd. | -| `nu_indicator` | `nu` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | O formato do módulo. | -| `style` | `"white bold"` | O estilo do módulo. | -| `disabled` | `true` | Disables the `shell` module. | +| Opções | Padrão | Descrição | +| ---------------------- | ------------------------- | ------------------------------------------------------- | +| `bash_indicator` | `bsh` | Uma string para representar o bash. | +| `fish_indicator` | `fsh` | Uma string usada para representar o fish. | +| `zsh_indicator` | `zsh` | Uma string usada para representar o zsh. | +| `powershell_indicator` | `psh` | Uma string usada para representar o powershell. | +| `ion_indicator` | `ion` | Uma string usada para representar o ion. | +| `elvish_indicator` | `esh` | Uma string usada para representar o elvish. | +| `tcsh_indicator` | `tsh` | Uma string usada para representar o tcsh. | +| `xonsh_indicator` | `xsh` | Uma string usada para representar o xonsh. | +| `cmd_indicator` | `cmd` | A format string used to represent cmd. | +| `nu_indicator` | `nu` | Uma string usada para representar o nu. | +| `unknown_indicator` | | Valor padrão para exibir quando o shell é desconhecido. | +| `format` | `"[$indicator]($style) "` | O formato do módulo. | +| `style` | `"white bold"` | O estilo do módulo. | +| `disabled` | `true` | Desabilita o módulo `shell`. | ### Variáveis @@ -2714,7 +2763,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | indicator | | Espelha o valor do `indicator` para o shell usado atualmente. | | style\* | | Espelha o valor da opção `style`. | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplos @@ -2731,7 +2780,7 @@ disabled = false ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +O módulo `shlvl` exibe o atual [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") variável de ambiente, se estiver definido um número e coincidir ou exceder o limite especificado. ### Opções @@ -2752,7 +2801,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2767,7 +2816,7 @@ threshold = 3 ## Singularidade -The `singularity` module shows the current [Singularity](https://sylabs.io/singularity/) image, if inside a container and `$SINGULARITY_NAME` is set. +O módulo `singularity` exibe a imagem atual do [Singularity](https://sylabs.io/singularity/), se dentro de um contêiner e definido `$SINGULARITY_NAME`. ### Opções @@ -2786,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2799,34 +2848,34 @@ format = '[📦 \[$env\]]($style) ' ## Status -The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. +O módulo `status` exibe o código de saída do comando anterior. O módulo será exibido apenas se o código de saída não for `0`. The status code will cast to a signed 32-bit integer. -::: tip +::: dica -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. ::: -::: warning This module is not supported on nu shell. ::: +::: warning Este módulo não é suportado pelo nu shell. ::: ### Opções -| Opções | Padrão | Descrição | -| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------ | -| `format` | `"[$symbol$status]($style) "` | O formato do módulo | -| `symbol` | `"✖"` | O simbolo exibido no erro de programa | -| `success_symbol` | `"✔️"` | O simbolo exibido no sucesso de programa | -| `not_executable_symbol` | `"🚫"` | O simbolo exibido quando o arquivo não é executável | -| `not_found_symbol` | `"🔍"` | O simbolo exibido quando o comando não é encontrado | -| `sigint_symbol` | `"🧱"` | O simbolo exibido no SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | O simbolo exibido em qualquer sinal | -| `style` | `"bold red"` | O estilo do módulo. | -| `recognize_signal_code` | `true` | Habilita o mapeamento de sinais para códigos de saída | -| `map_symbol` | `false` | Habilita o mapeamento de símbolos para códigos de saída | -| `pipestatus` | `false` | Habilita o relatório de pipestatus | -| `pipestatus_separator` | `|` | O simbolo que separa o pepe dos programas e códigos de saída | -| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | O formato do módulo quando o comando é um pipeline | -| `disabled` | `true` | Desabilita o módulo `status`. | +| Opções | Padrão | Descrição | +| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | O formato do módulo | +| `symbol` | `"✖"` | O simbolo exibido no erro de programa | +| `success_symbol` | `"✔️"` | O simbolo exibido no sucesso de programa | +| `not_executable_symbol` | `"🚫"` | O simbolo exibido quando o arquivo não é executável | +| `not_found_symbol` | `"🔍"` | O simbolo exibido quando o comando não é encontrado | +| `sigint_symbol` | `"🧱"` | O simbolo exibido no SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | O simbolo exibido em qualquer sinal | +| `style` | `"bold red"` | O estilo do módulo. | +| `recognize_signal_code` | `true` | Habilita o mapeamento de sinais para códigos de saída | +| `map_symbol` | `false` | Habilita o mapeamento de símbolos para códigos de saída | +| `pipestatus` | `false` | Habilita o relatório de pipestatus | +| `pipestatus_separator` | `|` | | +| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | O formato do módulo quando o comando é um pipeline | +| `disabled` | `true` | Desabilita o módulo `status`. | ### Variáveis @@ -2843,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo ```toml - # ~/.config/starship.toml [status] @@ -2857,16 +2905,15 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo -The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. +O módulo `sudo` é exibido se uma credencial sudo estiver em cache. O módulo vai ser exibido somente se as credenciais estiverem em cache. -::: tip +::: dica -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. ::: @@ -2887,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo ```toml - # ~/.config/starship.toml [sudo] @@ -2902,7 +2948,7 @@ disabled = false ``` ```toml -# On windows +# No windows # $HOME\.starship\config.toml [sudo] @@ -2912,7 +2958,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). O módulo vai exibir se algumas das condições a seguir for atendida: +Por padrão o módulo `swift` vai exibir a versão atual instalada do [Swift](https://swift.org/). O módulo vai exibir se algumas das condições a seguir for atendida: - O diretório atual tenha um arquivo `Package.swift` - O diretório atual tenha um arquivo com a extensão `.swift` @@ -2938,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2951,11 +2997,11 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. +O módulo `terraform` exibe o [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) selecionado e sua versão. -::: tip +::: dica -By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). +Por padrão a versão do Terraform não é exibida, desde que é lento recuperar a versão atual quando muitos plugins estão em uso. Se você deseja habilitar,, [Siga o exemplo abaixo](#with-terraform-version). ::: @@ -2986,7 +3032,7 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -3010,11 +3056,11 @@ format = "[🏎💨 $workspace]($style) " ## Horário -The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. +O módulo `time` exibe a hora **local** atual. A configuração de `format` é usada pelo [`chrono`](https://crates.io/crates/chrono) para controlar qual hora é exibida. Dê uma olhada na [documentação do chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) para ver quais opções estão disponíveis. -::: tip +::: dica -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. ::: @@ -3030,16 +3076,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `disabled` | `true` | Desabilita o módulo `time`. | | `time_range` | `"-"` | Define o intervalo de tempo o qual o módulo será exibido. O horário deve ser especificado no formato de 24-hours | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +Se `use_12hr` é `true`, então `time_format` tem o padrão `"%r"`. Caso contrário, o padrão é `"%T"`. Ajustes manuais no `time_format` irão sobrescrever a configuração `use_12hr`. ### Variáveis | Variável | Exemplo | Descrição | | --------- | ---------- | -------------------------------- | -| horário | `13:08:10` | A hora atual. | +| time | `13:08:10` | A hora atual. | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -3054,18 +3100,18 @@ utc_time_offset = "-5" time_range = "10:00:00-14:00:00" ``` -## Username +## Nome do usuário -The `username` module shows active user's username. O módulo vai exibir se algumas das condições a seguir for atendida: +O módulo `username` mostra o nome de usuário do usuário ativo. O módulo será mostrado se alguma das seguintes condições for atendida: - O usuário atual é root - O usuário atual não é o mesmo que está logado - O usuário atual esta conectado em uma sessão SSH - A variável `show_always` esta definida como true -::: tip +::: dica -SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. +Conexões SSH são detectadas checando as variáveis de ambiente `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. Se seu host SSH não tem estas variáveis configuradas, uma alternativa é definir uma delas com valor burro. ::: @@ -3084,7 +3130,7 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Variável | Exemplo | Descrição | | -------- | ------------ | -------------------------------------------------------------------------------------- | | `style` | `"red bold"` | Espelha o valor da opção `style_root` quando o root esta logado e `style_user` se não. | -| `user` | `"matchai"` | O ID do usuário logado atualmente. | +| `user` | `"fulano"` | O ID do usuário logado atualmente. | ### Exemplo @@ -3101,7 +3147,7 @@ show_always = true ## Vagrant -The `vagrant` module shows the currently installed version of [Vagrant](https://www.vagrantup.com/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `vagrant` exibe a versão atual instalada do [Vagrant](https://www.vagrantup.com/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `Vagrantfile` @@ -3126,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -3139,7 +3185,8 @@ format = "via [⍱ $version](bold white) " ## V -The `vlang` module shows you your currently installed version of [V](https://vlang.io/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `vlang` exibe a versão atual instalada do [V](https://vlang.io/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: + - O diretório atual cotem qualquer arquivo com a extensão `.v` - O diretório atual contem um arquivo `v.mod`, `vpkg.json` ou `.vpkg-lock.json` @@ -3174,7 +3221,7 @@ format = "via [V $version](blue bold) " ## VCSH -The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use. +O módulo `vcsh` exibe o repositório [VCSH](https://github.com/RichiH/vcsh) atual ativo. O módulo vai ser exibido apenas se um repositório estiver em uso. ### Opções @@ -3193,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Espelha o valor da opção `símbolo` | | style\* | `black bold dimmed` | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -3206,7 +3253,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). O módulo vai exibir se algumas das condições a seguir for atendida: +Por padrão, o módulo `zig` mostra a versão atualmente instalada do [Zig](https://ziglang.org/). O módulo será mostrado se alguma das seguintes condições for atendida: - O diretório atual contém arquivo com a extensão `.zig` @@ -3216,7 +3263,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | O simbolo usado antes de exibir a versão do Zig. | +| `symbol` | `"↯ "` | O símbolo usado antes de exibir a versão do Zig. | | `style` | `"bold yellow"` | O estilo do módulo. | | `disabled` | `false` | Desabilita o módulo `zig`. | | `detect_extensions` | `["zig"]` | Quais extensões devem ativar este módulo. | @@ -3225,13 +3272,13 @@ By default the the `zig` module shows the currently installed version of [Zig](h ### Variáveis -| Variável | Exemplo | Descrição | -| --------- | -------- | ---------------------------------- | -| version | `v0.6.0` | A versão do `zig` | -| symbol | | Espelha o valor da opção `símbolo` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| --------- | -------- | --------------------------------- | +| version | `v0.6.0` | A versão do `zig` | +| symbol | | Espelha o valor da opção `symbol` | +| style\* | | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -3244,9 +3291,9 @@ symbol = "⚡️ " ## Comandos Personalizados -The `custom` modules show the output of some arbitrary commands. +Os módulos `custom` mostram a saída de alguns comandos arbitrários. -These modules will be shown if any of the following conditions are met: +Esses módulos serão mostrados se alguma das seguintes condições for atendida: - O diretório atual tenha um arquivo cujo o nome esta em `files` - O diretório atual tenha um diretório cujo o nome esta em `directories` @@ -3254,29 +3301,29 @@ These modules will be shown if any of the following conditions are met: - O comando `when` retorna 0 - O sistema operacional (std::env::consts::OS) corresponde com o `os` se definido. -::: tip +::: dica -Multiple custom modules can be defined by using a `.`. +Vários módulos personalizados podem ser definidos usando um `.`. ::: -::: tip +::: dica -The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. +A ordem na qual os módulos personalizados são mostrados pode ser definida individualmente incluindo `${custom.foo}` no `format` de nível superior (como inclui um ponto, você precisa usar `${...}`). Por padrão, o módulo `custom` mostrará todos os módulos personalizados na ordem em que eles foram definidos. ::: -::: tip +::: dica -[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there! +A [Issue #1252](https://github.com/starship/starship/discussions/1252) contém exemplos de módulos personalizados. Se você tem um exemplo interessante que não esta coberto lá, sinta-se livre para compartilha-lo! ::: -::: warning Command output is printed unescaped to the prompt +::: warning A saída do comando é exibido unescaped no prompt -Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. +Seja qual for a saída o comando irá gerar uma saída sem modificações no prompt. Isto siguinifica que a saída tenha sequencias especiais estas serão interpretadas pelo seu shell, elas serão expandidas quando exibidas. Estas sequencias especiais são especificas da shell, ex: você pode escrever um módulo de comando que escreve uma sequencia de bash, ex:. `\h`, mas este módulo não irá funcionar no shell fish ou zsh. -Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). +Strings de formatação também podem conter sequencias de prompt especificas de shell, ex: [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). ::: @@ -3287,7 +3334,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | `command` | `""` | O comando cuja a saída deve ser exibida. O comando será passado no stdin para o shell. | | `when` | | Um comando de shell usado como condição para exibir o módulo. O módulo será exibido se o comando retornar `0` como código de status. | | `shell` | | [Veja abaixo](#custom-command-shell) | -| `descrição` | `""` | A descrição do módulo, isto será exibido quando executar `starship explain`. | +| `description` | `""` | A descrição do módulo, isto será exibido quando executar `starship explain`. | | `files` | `[]` | Os arquivos que serão buscados por correspondência no diretório atual. | | `directories` | `[]` | Os diretórios que serão buscados por correspondência no diretório atual. | | `extensions` | `[]` | As extensões que serão buscadas por correspondência no diretório atual. | @@ -3305,34 +3352,34 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | Espelha o valor da opção `símbolo` | | style\* | Espelha o valor da opção `style` | -\*: Essa variável só pode ser usada como parte de uma string de estilo +*: Esta variável só pode ser usada como parte de uma string de estilo #### Comandos personalizados de shell -`shell` accepts a non-empty list of strings, where: +`shell` aceita uma lista não vazia de string, onde: - A primeira string é o caminho para o shell que executará o comando. - Outros argumentos que serão passados para o shell. -If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. +Se não definido, ele retornará para o STARSHIP_SHELl e então para o "sh" no Linux e "cmd/C" no Windows. -The `command` will be passed in on stdin. +O `command` será passado no stdin. -If `shell` is not given or only contains one element and Starship detects PowerShell will be used, the following arguments will automatically be added: `-NoProfile -Command -`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. +Se o `shell` não for dado ou apenas conter um elemento e o Starship detectar PowerShell ele será usado, os seguintes argumentos serão automaticamente adicionados: `-NoProfile -Command -`. Este comportamento pode ser evitado passando explicitamente argumento para o shell, ex. ```toml shell = ["pwsh", "-Command", "-"] ``` -::: warning Make sure your custom shell configuration exits gracefully +::: warning Tenha certeza que tenha uma configuração de shell -If you set a custom command, make sure that the default Shell used by starship will properly execute the command with a graceful exit (via the `shell` option). +Se você definir um comando personalizado, tenha certeza que o shell padrão usado pelo starship execute este comando com uma saída graciosa (via the `shell` option). -For example, PowerShell requires the `-Command` parameter to execute a one liner. Omitting this parameter might throw starship into a recursive loop where the shell might try to load a full profile environment with starship itself again and hence re-execute the custom command, getting into a never ending loop. +Por exemplo, PowerShell requer o parâmetro `-Command` para executar um liner. Omitindo este parâmetro pode ser que o starship entre em um loop recursivo, onde o shell tente carrega um ambiente completo de perfil com o próprio starship novamente e portanto execute novamente o comando, entrando em um loop sem fim. -Parameters similar to `-NoProfile` in PowerShell are recommended for other shells as well to avoid extra loading time of a custom profile on every starship invocation. +Parâmetros similares ao `-NoProfile` no PowerShell são recomendados para outras shells, bem como para evitar um tempo de carregamento maior toda vez que o starship for chamado. -Automatic detection of shells and proper parameters addition are currently implemented, but it's possible that not all shells are covered. [Please open an issue](https://github.com/starship/starship/issues/new/choose) with shell details and starship configuration if you hit such scenario. +Detecção automática de shell e adição de parâmetros estão sendo implementados atualmente, mas é possível que nem todas as shells sejam cobertas. [Por favor abra uma issue](https://github.com/starship/starship/issues/new/choose) com detalhes do shell e configurações do starship se você acertar algum cenário. ::: @@ -3342,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/pt-BR/faq/README.md b/docs/pt-BR/faq/README.md index bee37be1..95adbb93 100644 --- a/docs/pt-BR/faq/README.md +++ b/docs/pt-BR/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Porque eu vejo alertas de `Executing command "..." timed out.`? -O Starship executa comandos diferentes para recuperar as informações para exibir no prompt, por exemplo a versão de um programa ou o status atual do git. Para ter certeza de que o starship não travou durante uma execução destes comandos nos definimos um limite de tempo, se um comando ultrapassar este limite o starship vai parar a execução do comando e exibe o alerta acima, esse é um comportamento esperado. Este limite de tempo é configurado usando o [`command_timeout` key](/config/#prompt) então se você quiser você pode aumentar este limite. Você pode também seguir os passos para debugar para ver qual comando esta demorando e se você pode otimizar ele. Finalmente você pode definir a variável de ambiente `STARSHIP_LOG` para `error` para esconder estes alertas. +O Starship executa comandos diferentes para recuperar as informações para exibir no prompt, por exemplo a versão de um programa ou o status atual do git. Para ter certeza de que o starship não travou durante uma execução destes comandos nos definimos um limite de tempo, se um comando ultrapassar este limite o starship vai parar a execução do comando e exibe o alerta acima, esse é um comportamento esperado. Este limite de tempo é configurado usando a [chave](/config/#prompt) `command_timeout` então se você quiser você pode aumentar este limite. Você pode também seguir os passos para debugar para ver qual comando esta demorando e se você pode otimizar ele. Finalmente você pode definir a variável de ambiente `STARSHIP_LOG` para `error` para esconder estes alertas. ## Eu vejo símbolos que não entendo ou não esperado, o que isso significa? @@ -117,6 +117,6 @@ Se o Starship foi instalando usando algum gerenciador de pacotes, por favor cons Se o Starship foi instalado usando o script de instalação, o comando abaixo irá remover o binário: ```sh -# Locate and delete the starship binary +# Localiza e exclui o binário do starship sh -c 'rm "$(command -v 'starship')"' ``` diff --git a/docs/pt-BR/guide/README.md b/docs/pt-BR/guide/README.md index f07bd461..b68017ce 100644 --- a/docs/pt-BR/guide/README.md +++ b/docs/pt-BR/guide/README.md @@ -169,177 +169,245 @@ - Uma [Nerd Font](https://www.nerdfonts.com/) instalada e funcionando no seu terminal (por exemplo, experimente a [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Primeiros passos +### 1º passo. Instalar o Starship -**Nota:** Devido ao suporte a diversas plataformas, apenas um subconjunto de plataformas são demonstradas abaixo. Não achou a sua? Dê uma olhada nas [instruções extras das plataformas](https://starship.rs/installing/). +Selecione seu sistema operacional na lista abaixo para ver as instruções de instalação: -1. Instale o binário do **starship**: +
+Android +Instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes: - #### Instalar a última versão +| Repositório | Instruções | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### Binário pré-compilado, utilizando o shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes: - Para atualizar o Starship de maneira manual, execute novamente o script acima. Isto irá substituir a versão atual sem alterar as configurações do Starship. +| Distribuição | Repositório | Instruções | +| -------------- | -------------------------------------------------------- | --------------------------------- | +| **_Qualquer_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Nota** - Os padrões de instalação do script podem ser alteradas e substituídas, consulte a ajuda de built-in. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Instale a versão mais recente no seu sistema: - #### Instalar via gerenciador de pacotes +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Ou instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes: - ##### Com o [Homebrew](https://brew.sh/): +| Distribuição | Repositório | Instruções | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Qualquer_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Qualquer_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Qualquer_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Qualquer_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### Com o [Scoop](https://scoop.sh): +Instale a versão mais recente no seu sistema: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Adicione o script de inicialização no arquivo de configuração do seu shell: +Ou instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes: +| Repositório | Instruções | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Adicione o seguinte comando no final do arquivo `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes: - eval "$(starship init bash)" - ``` +| Repositório | Instruções | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### 2º passo. Configure seu shell para usar o Starship - Adicione o seguinte comando no final do arquivo `~/.config/fish/config.fish`: +Configure seu shell para inicializar o starship. Selecione o seu na lista abaixo: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Adicione o seguinte comando no final do arquivo `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Adicione o seguinte comando no final do arquivo `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +Você precisa do [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) com Cmd. Crie um arquivo neste caminho `%LocalAppData%\clink\starship.lua` com o seguinte conteúdo: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Adicione o comando a seguir ao final do arquivo `Microsoft.PowerShell_profile.ps1`. Você pode checar a localização deste arquivo consultando a variável `$PROFILE` no PowerShell. Normalmente o caminho é `~\Documentos\PowerShell\Microsoft.PowerShell_profile.ps1` ou `~/.config/powershell/Microsoft.PowerShell_profile.ps1` no -Nix. +Adicione o comando a seguir ao final do arquivo `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Nota: Somente o Elvish v0.17 + é suportado - #### Ion +
- Adicione o seguinte comando no final do arquivo `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +Adicione o seguinte comando no final do arquivo `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Atenção** Apenas a versão elvish v0.17 ou superior é suportada. Adicione o comando a seguir ao final do arquivo `~/.elvish/rc.elv`: +Adicione o seguinte comando no final do arquivo `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Adicione o seguinte no final da sua configuração Nushell (encontre executando o `config path`): - Adicione ao final do arquivo `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Adicione o seguinte no final da sua configuração PowerShell (encontre executando `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Adicione o seguinte ao final do arquivo `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Adicione ao final do arquivo `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Adicione o seguinte ao final do arquivo `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Apenas a versão v0.33 do nu ou superior é suportada. Add the following to your nu config file. Você pode verificar o local deste arquivo rodando `config path` in nu. +Adicione o seguinte comando no final do arquivo `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### 3º passo. Configurar o Starship + +Inicie uma nova instância de shell e você deverá ver seu belo novo prompt de shell. Se você estiver feliz com as configurações padrões, aproveite! + +Se você estiver procurando personalizar ainda mais a Starship: + +- **[Configuração](https://starship.rs/config/)** – saiba como configurar o Starship para ajustar seu prompt ao seu gosto + +- **[Predefinições](https://starship.rs/presets/)** - seja inspirado nas configurações pré-construídas pelos outros ## 🤝 Contribuindo -Nós estamos sempre procurando contribuidores de **todos os níveis de conhecimento**! Se você está buscando um caminho mais fácil para começar no projeto, veja essas [boas issues para começar](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). +Nós estamos sempre procurando contribuidores de **todos os níveis de conhecimento**! Se você deseja facilitar seu caminho para o projeto, experimente uma [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). -Se você é fluente em uma linguá não inglesa, nos ficaríamos gratos por qualquer ajuda em manter nossas documentações traduzidas e atualizadas em outras linguás. Se você deseja ajudar nas traduções, você pode contribuir no [Crowdin do Starship](https://translate.starship.rs/). +Se você é fluente em um idioma diferente do inglês, agradecemos qualquer ajuda para manter nossos documentos traduzidos e atualizados em outros idiomas. Se você quiser ajudar, as traduções podem ser contribuídas no [Crowdin do Starship](https://translate.starship.rs/). -Se você está interessado em ajudar contribuindo com o projeto, dê uma olhada no nosso [Guia de Contribuição](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Além disso, sinta-se à vontade para entrar no nosso [servidor no Discord](https://discord.gg/8Jzqu3T) e dizer oi. 👋 +Se você estiver interessado em ajudar a contribuir com starship, dê uma olhada em nosso [Guia de Contribuição](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Além disso, sinta-se à vontade para entrar no nosso [servidor do Discord](https://discord.gg/8Jzqu3T) e diga oi. 👋 ## 💭 Inspirado por -Por favor, confira estes projetos anteriores que ajudaram a inspirar a criação do startship. 🙏 +Por favor, confira esses trabalhos anteriores que ajudaram a inspirar a criação do starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Um prompt ZSH para astronautas. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – Um prompt ZSH para astronautas. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Tema robbyrussell multi-shell escrito em JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Tema robbyrussell para prompt em JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - Um prompt multi-shell personalizável com ícones como o powerline. +- **[reujab/silver](https://github.com/reujab/silver)** – Um prompt personalizável com ícones do tipo powerline.


@@ -348,4 +416,4 @@ Por favor, confira estes projetos anteriores que ajudaram a inspirar a criação ## 📝 Licença -Todos os direitos reservados © 2019-Presente, [Contribuidores Starship](https://github.com/starship/starship/graphs/contributors).
Este projeto está licenciado pelo [ISC](https://github.com/starship/starship/blob/master/LICENSE). +Copyright © 2019-presente, [Colaboradores Starship](https://github.com/starship/starship/graphs/contributors).
Este projeto é licenciado pelo [ISC](https://github.com/starship/starship/blob/master/LICENSE). diff --git a/docs/pt-BR/migrating-to-0.45.0/README.md b/docs/pt-BR/migrating-to-0.45.0/README.md index 63f50d11..7ce417f5 100644 --- a/docs/pt-BR/migrating-to-0.45.0/README.md +++ b/docs/pt-BR/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ Para configurar o prompt para usar a configuração antiga `use_symbol_for_statu error_symbol = "[✖](bold red)" ``` -*Nota:* O elemento `charactere` adiciona automaticamente um espaço depois do mesmo, portanto ao contrario strings `format`, nós não adicionamos o espaço nos exemplos acima. +_Nota:_ O elemento `charactere` adiciona automaticamente um espaço depois, portanto, ao contrário das outras strings de `format`, nós não adicionamos nos exemplos acima. #### Tempo de execução do comando diff --git a/docs/pt-BR/presets/README.md b/docs/pt-BR/presets/README.md index c094f531..28c2f761 100644 --- a/docs/pt-BR/presets/README.md +++ b/docs/pt-BR/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/pt-PT/README.md b/docs/pt-PT/README.md index ea43e98f..aa0ac338 100644 --- a/docs/pt-PT/README.md +++ b/docs/pt-PT/README.md @@ -147,9 +147,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/pt-PT/advanced-config/README.md b/docs/pt-PT/advanced-config/README.md index f0f682a8..23d7282e 100644 --- a/docs/pt-PT/advanced-config/README.md +++ b/docs/pt-PT/advanced-config/README.md @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Example @@ -178,15 +180,15 @@ continuation_prompt = "▶▶" Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. @@ -194,8 +196,8 @@ The `none` token overrides all other tokens in a string if it is not part of a ` A color specifier can be one of the following: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/pt-PT/config/README.md b/docs/pt-PT/config/README.md index 2565504e..9c4407f4 100644 --- a/docs/pt-PT/config/README.md +++ b/docs/pt-PT/config/README.md @@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la add_newline = true # Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" # Disable the package module, hiding it from the prompt completely [package] @@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | - ### Example ```toml @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | 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 +*: This variable can only be used as a part of a style string ### Examples @@ -411,17 +412,16 @@ The `display` option is an array of the following table. #### Example ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 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 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 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 +*: This variable can only be used as a part of a style string ## Command Duration @@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Options -| Option | Default | Description | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | -| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `cmd_duration` module. | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Option | Default | Description | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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 +*: This variable can only be used as a part of a style string ### Example @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | The style for the module. | +| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| 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 + +### Example + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 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 +*: This variable can only be used as a part of a style string ### Example @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Options @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Example ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2905,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Example ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | 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 +*: This variable can only be used as a part of a style string ### Example @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Mirrors the value of option `symbol` | | style\* | `black bold dimmed` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 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 +*: This variable can only be used as a part of a style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/pt-PT/faq/README.md b/docs/pt-PT/faq/README.md index 99dd6bcc..89ffc1ac 100644 --- a/docs/pt-PT/faq/README.md +++ b/docs/pt-PT/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## I see symbols I don't understand or expect, what do they mean? diff --git a/docs/pt-PT/guide/README.md b/docs/pt-PT/guide/README.md index 88ac8871..f9f20586 100644 --- a/docs/pt-PT/guide/README.md +++ b/docs/pt-PT/guide/README.md @@ -169,159 +169,227 @@ - A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Getting Started +### Step 1. Install Starship -**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/). +Select your operating system from the list below to view installation instructions: -1. Install the **starship** binary: +

+Android +Install Starship using any of the following package managers: - #### Install Latest Version +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### From prebuilt binary, with Shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Note** - The defaults of the install script can be overridden see the built-in help. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### Install via Package Manager +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### With [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### With [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Add the init script to your shell's config file: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Add the following to the end of `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - Add the following to the end of `~/.config/fish/config.fish`: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Add the following to the end of `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Add the following to the end of `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. +Add the following to the end of `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- Add the following to the end of `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +Add the following to the end of `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`: +Add the following to the end of `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - Add the following to the end of `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Add the following to the end of `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Add the following to the end of `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Add the following to the end of `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu. +Add the following to the end of `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 Contributing @@ -335,11 +403,11 @@ If you are interested in helping contribute to starship, please take a look at o Please check out these previous works that helped inspire the creation of starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/pt-PT/migrating-to-0.45.0/README.md b/docs/pt-PT/migrating-to-0.45.0/README.md index 95a847bf..18661c3b 100644 --- a/docs/pt-PT/migrating-to-0.45.0/README.md +++ b/docs/pt-PT/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur 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. +_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. #### Command Duration diff --git a/docs/pt-PT/presets/README.md b/docs/pt-PT/presets/README.md index f60cc19b..7c02b2c5 100644 --- a/docs/pt-PT/presets/README.md +++ b/docs/pt-PT/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/ru-RU/README.md b/docs/ru-RU/README.md index d9976cce..c313c14c 100644 --- a/docs/ru-RU/README.md +++ b/docs/ru-RU/README.md @@ -28,9 +28,9 @@ description: Starship - минимальная, быстрая и бесконе -### Требования +### Обязательные требования -- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal. +- Установленный и включенный шрифт [Nerd Font](https://www.nerdfonts.com/) в вашем терминале. ### Быстрая установка @@ -99,7 +99,7 @@ description: Starship - минимальная, быстрая и бесконе #### PowerShell - Добавьте следующее в конец `Microsoft.PowerShell_profile.ps1`. Вы можете проверить местоположение этого файла, запросив переменную `$PROFILE` в PowerShell. Обычно он находится в `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` или `~/.config/powershell/Microsoft.PowerShell_profile.ps1` на -Nix. + Добавьте следующее в конец `Microsoft.PowerShell_profile.ps1`. Вы можете узнать расположение этого файла, запросив переменную `$PROFILE` в PowerShell. Обычно он находится в `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` или `~/.config/powershell/Microsoft.PowerShell_profile.ps1` на -Nix. ```sh Invoke-Expression (&starship init powershell) @@ -119,7 +119,7 @@ description: Starship - минимальная, быстрая и бесконе #### Elvish - ::: warning Only elvish v0.17 or higher is supported. ::: + ::: warning Поддерживается только elvish v0.17 или выше. ::: Добавьте следующую строку в конец `~/.elvish/rc.elv`: @@ -143,13 +143,13 @@ description: Starship - минимальная, быстрая и бесконе #### Nushell - ::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu. + ::: warning Это будет изменено. Поддерживается только nu версии v0.33 или выше. ::: Добавьте следующее в свой конфигурационный файл nu. Вы можете узнать расположение этого файла, выполнив `config path` в nu. ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` @@ -157,7 +157,7 @@ description: Starship - минимальная, быстрая и бесконе #### Xonsh - Add the following to the end of `~/.xonshrc`: + Добавьте следующее в конец `~/.xonshrc`: ```sh # ~/.xonshrc diff --git a/docs/ru-RU/advanced-config/README.md b/docs/ru-RU/advanced-config/README.md index edcec7f3..365a6367 100644 --- a/docs/ru-RU/advanced-config/README.md +++ b/docs/ru-RU/advanced-config/README.md @@ -32,11 +32,11 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## Пользовательские команды перед командной строкой и перед запуском Bash -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Тем не менее, Starship дает вам ограниченную возможность вставить собственные функции в процедуру отображения подсказки: +Bash не имеет формальной среды preexec/precmd, как и большинство других оболочек. Из-за этого трудно предоставить полностью настраиваемые хуки в `bash`. Тем не менее, Starship дает вам ограниченную возможность вставить собственные функции в процедуру отображения подсказки: -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- Чтобы запустить пользовательскую функцию прямо перед отображением подсказки, определите новую функцию и затем назначьте ей имя `starship_precmd_user_func`. Например, чтобы нарисовать ракету перед появлением подсказки, сделайте ```bash function blastoff(){ @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Тем не менее, вы **должны** поймать сигнал DEBUG _перед_ инициализацией Starship! Starship может сохранить значение ловушки DEBUG, но если ловушка перезаписана после запуска Starship, некоторая функциональность сломается. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -67,11 +69,11 @@ function Invoke-Starship-PreCommand { } ``` -## Change Window Title +## Изменение заголовка окна -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish даже делает это по умолчанию. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. -First, define a window title change function (identical in bash and zsh): +Сначала задайте функцию изменения заголовка окна (идентичную в bash и zsh): ```bash function set_win_title(){ @@ -79,15 +81,15 @@ function set_win_title(){ } ``` -You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). +Вы можете использовать переменные для настройки этого заголовка (`$USER`, `$HOSTNAME`, и `$PWD` являются популярными вариантами). -In `bash`, set this function to be the precmd starship function: +В `bash`, установите эту функцию как функцию precmd в Starship: ```bash starship_precmd_user_func="set_win_title" ``` -In `zsh`, add this to the `precmd_functions` array: +В `zsh`, добавьте это в массив `precmd_functions`: ```bash precmd_functions+=(set_win_title) @@ -95,7 +97,7 @@ precmd_functions+=(set_win_title) If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. -For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: +Например, если вы хотите отобразить ваш текущий каталог в заголовке вкладки терминала, добавьте следующие строки в `~/. bashrc` или `~/.zshrc`: ```bash function set_win_title(){ @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Пример @@ -176,26 +178,26 @@ continuation_prompt = "▶▶" ## Строки стиля -Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: +Строки стиля - это список слов, разделенных пробелами. Слова не чувствительны к регистру (то есть `bold` и `BoLd` считаются одной строкой). Каждое слово может быть одним из следующих: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +где `` является цветовым спецификатором (обсуждается ниже). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. Порядок слов в строке не имеет значения. -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +Токен `none` переопределяет все остальные токены в строке, если он не является частью спецификатора `bg:` так, например, `fg:red none fg:blue` все равно создаст строку без стиля. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. Использование `none` в сочетании с другими токенами может стать ошибкой в будущем. -A color specifier can be one of the following: +Цветовой спецификатор может быть одним из следующих: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- `#`, за которой следует шестизначное шестнадцатеричное число. Это определяет [шестнадцатеричный код цвета RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- Число от 0 до 255. Это определяет [8-битный код цвета ANSI](https://i.stack.imgur.com/KTSQa.png). -If multiple colors are specified for foreground/background, the last one in the string will take priority. +Если для переднего плана/фона задано несколько цветов, то последняя из строк будет иметь приоритет. diff --git a/docs/ru-RU/config/README.md b/docs/ru-RU/config/README.md index ecb83488..9ce3bd23 100644 --- a/docs/ru-RU/config/README.md +++ b/docs/ru-RU/config/README.md @@ -13,8 +13,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml add_newline = true # Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" # Disable the package module, hiding it from the prompt completely [package] @@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### Логгирование (Запись действий) -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +По умолчанию в starship записываются предупреждения и ошибки в файл с именем `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, где ключ сессии соответствует экземпляру терминала. Это, однако, может быть изменено с помощью переменной окружения `STARSHIP_CACHE`: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### Терминология -**Module**: A component in the prompt giving information based on contextual information from your OS. 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. +**Модуль**: Компонент строки, дающий информацию на основе контекстной информации вашей ОС. 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. **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. -By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. +По традициям, большинство модулей имеют префикс цвета терминала по умолчанию (например, `через` в "узлах") и пустое пространство как суффикс. ### Форматирование строк -Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. +Формат строк - это формат, с которым модуль печатает все переменные. Большинство модулей имеют запись `формата`, который настраивает формат отображения модуля. Вы можете использовать тексты, переменные и группы текста в строке формата. #### Переменная -A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. +Переменная содержит символ `$`, за которым следует имя переменной. The name of a variable can only contain letters, numbers and `_`. -For example: +Например: - `$version` это строка формата с именем `версии`. - `$git_branch$git_commit` это строка формата с двумя переменными `git_branch` и `git_commit`. @@ -83,13 +83,13 @@ For example: #### Группа текста -A text group is made up of two different parts. +Текстовая группа состоит из двух различных частей. -The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. +Первая часть, которая заключена в `[]`, это [формат строки](#format-strings). Вы можете добавлять в него тексты, переменные, или даже вложенные текстовые группы. -In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. +Во второй части, которая заключена в `()`, это строка стиля [](#style-strings). This can be used to style the first part. -For example: +Например: - `[on](red bold)` будет печатать строку `on` жирным текстом красного цвета. - `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. @@ -97,7 +97,7 @@ For example: #### Строки стиля -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +В Starship, большинство модулей позволяют настроить стили отображения. Это делается записью (обычно называется `style`), которая представляет собой строку, определяющую конфигурацию. Ниже приведены несколько примеров стилей строк, а также, их действия. Подробнее о полном синтаксисе можно прочитать в [расширенном разделе конфигурации](/advanced-config/). - `"fg:green bg:blue"` устанавливает зеленый текст на синем фоне - `"bg:blue fg:bright-green"` устанавливает ярко-зеленый текст на синем фоне @@ -106,13 +106,13 @@ Most modules in starship allow you to configure their display styles. This is do - `"bold italic fg:purple"` устанавливает жирный фиолетовый текст - `""` выключает все стили -Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. +Обратите внимание на то, что, вид стиля зависит от вашего эмулятора терминала. Например, некоторые эмуляторы терминала будут использовать яркие цвета вместо жирного текста, и некоторые цветовые темы используют одинаковые значение для обычных и ярких цветов. Также, чтобы получить курсивный текст, ваш терминал должен поддерживать курсив. #### Строки условного формата -A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. +Строка условного формата, завернутая в `(` и `)` не будет отображаться, если все переменные внутри являются пустыми. -For example: +Например: - `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. - `(некоторый текст)` всегда не показывает ничего, поскольку в скобках нет переменных. @@ -124,18 +124,18 @@ The following symbols have special usage in a format string and must be escaped: Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). -For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: +Например, когда вы хотите напечатать символ `$` на новой строке, следующие настройки для `формата` эквивалентны: ```toml -# with basic string +# с базовой строкой format = "\n\\$" -# with multiline basic string +# с многолинейной строкой format = """ \\$""" -# with literal string +# со строкой, состоящей из литералов format = ''' \$''' @@ -143,7 +143,7 @@ format = ''' ## Командная строка -This is the list of prompt-wide configuration options. +Ниже находится список опций, применяющихся для всей командной строки. ### Опции @@ -155,19 +155,18 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | - ### Пример ```toml # ~/.config/starship.toml -# Use custom format +# Собственное форматирование оболочки format = """ [┌───────────────────>](bold green) [│](bold green)$directory$rust$package [└─>](bold green) """ -# Wait 10 milliseconds for starship to check files under the current directory. +# Подождите 10 милисекунд пока starship прочитает файлы в этой директории. scan_timeout = 10 # Disable the blank line at the start of the prompt @@ -176,7 +175,7 @@ add_newline = false ### Формат оболочки по умолчанию -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: +Формат по умолчанию `format` используется для определения формата подсказки (prompt), если `format` пустой или отсутствует. Значение по умолчанию: ```toml format = "$all" @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,12 +256,12 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +Модуль `aws` показывает текущий регион и профиль AWS. Основано на `AWS_REGION`, `AWS_DEFAULT_REGION`, и `AWS_PROFILE` переменных окружения и файле`~/.aws/config`. This module also shows an expiration timer when using temporary credentials. 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. @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Примеры @@ -359,7 +360,7 @@ style = "blue bold" ## Батарея -The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. +Модуль `battery` показывает насколько заряжена батарея девайса и статус зарядки на данный момент. Модуль виден только, если заряд батареи устройства меньше 10%. ### Опции @@ -387,7 +388,7 @@ discharging_symbol = "💀 " ### Отображение батареи -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). Если `display` не предоставлено. Значение по умолчанию: ```toml [[battery.display]] @@ -399,7 +400,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### Опции -The `display` option is an array of the following table. +Опция `display` представляет собой массив следующей таблицы. | Параметр | По умолчанию | Описание | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | @@ -411,24 +412,23 @@ The `display` option is an array of the following table. #### Пример ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Символ -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 (`❯`/`✖`) @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ## COBOL / GNUCOBOL @@ -552,37 +552,32 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ## Длительность команды -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 +::: предупреждение Не подключайте ловушку DEBUG к Bash -If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. +Если вы испоьзуете Starship в `bash`, не подключайте ловушку `DEBUG` после запуска `eval $(starship init $0)`, иначе этот модуль сломается. ::: -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. +Пользователи Bash, которым нужна функциональность, подобная preexec, могут использовать [фреймворк bash_preexec от rcaloras](https://github.com/rcaloras/bash-preexec). Просто определите массивы `preexec_functions` и `precmd_functions` перед запуском `eval $(starship init $0)`, а затем продолжайте нормально. ### Опции -| Параметр | По умолчанию | Описание | -| -------------------- | ----------------------------- | -------------------------------------------------------------------- | -| `min_time` | `2_000` | Кратчайшая продолжительность для показа времени (в миллисекундах). | -| `show_milliseconds` | `false` | Показывать миллисекунды в дополнение к секундам в продолжительности. | -| `format` | `"took [$duration]($style) "` | Формат модуля. | -| `style` | `"bold yellow"` | Стиль модуля. | -| `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). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Параметр | По умолчанию | Описание | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Кратчайшая продолжительность для показа времени (в миллисекундах). | +| `show_milliseconds` | `false` | Показывать миллисекунды в дополнение к секундам в продолжительности. | +| `format` | `"took [$duration]($style) "` | Формат модуля. | +| `style` | `"bold yellow"` | Стиль модуля. | +| `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. | ### Переменные @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -607,9 +602,9 @@ format = "underwent [$duration](bold yellow)" The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. -::: tip +::: tip Подсказка -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Это не подавляет модификатор командной строки самой conda. Возможно, вы захотите запустить `conda config --set changeps1 False`. ::: @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Опции + +| Параметр | По умолчанию | Описание | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | Стиль модуля. | +| `format` | "[$symbol \\[$name\\]]($style) " | Формат модуля. | +| `disabled` | `false` | Disables the `container` module. | + +### Переменные + +| Переменная | Пример | Описание | +| ---------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | + +*: Эта переменная может использоваться только в качестве части строки style + +### Пример + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Опции @@ -759,11 +787,11 @@ 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, вместо скрытия усеченного каталога, вы увидите укороченное имя каталога, зависимое от числа символов вы установите для этой опции. -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`. ### Опции @@ -782,7 +810,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |

-This module has a few advanced configuration options that control how the directory is displayed. +Этот модуль имеет несколько расширенных опций конфигурации, которые контролируют отображение каталога. | Advanced Option | По умолчанию | Описание | | --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -798,7 +826,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an "src/com/long/java/path" = "mypath" ``` -`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`. +`fish_style_pwd_dir_length` взаимодействует со стандартными параметрами усечения, которые могут сначала показаться странными: если он не равен нулю, элементы пути, который обычно усекается, вместо этого отображаются с указанным количеством символов. 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`.
@@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -859,7 +887,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. 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: @@ -874,7 +902,7 @@ 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 () when there is a csproj file in the current directory. @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример ```toml - # ~/.config/starship.toml [status] @@ -2845,16 +2905,15 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: tip +::: tip Подсказка -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. ::: @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2941,7 +2999,7 @@ format = "via [🏎 $version](red bold)" The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. -::: tip +::: tip Подсказка By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2998,11 +3056,11 @@ format = "[🏎💨 $workspace]($style) " ## Время -The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. +Модуль `time` показывает текущее **локальное** время. Значение конфигурации `format` используется пакетом [`chrono`](https://crates.io/crates/chrono) для контроля того, как отображается время. Ознакомьтесь с [документацией chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), чтобы увидеть доступные параметры. -::: tip +::: tip Подсказка -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. ::: @@ -3018,7 +3076,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `disabled` | `true` | Отключает модуль `time`. | | `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Иначе по умолчанию используется `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. ### Переменные @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | время | `13:08:10` | The current time. | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -3044,14 +3102,14 @@ time_range = "10:00:00-14:00:00" ## Имя пользователя -The `username` module shows active user's username. Модуль будет показан, если любое из следующих условий соблюдено: +Модуль `username` показывает имя активного пользователя. Модуль будет показан, если любое из следующих условий соблюдено: - Текущий пользователь - root - Текущий пользователь отличается от залогиненного - Пользователь подключен к SSH-сессии - Переменная `show_always` равна true -::: tip +::: tip Подсказка SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Отражает значение параметра `symbol` | | style\* | `black bold dimmed` | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -3242,19 +3301,19 @@ These modules will be shown if any of the following conditions are met: - The `when` command returns 0 - The current Operating System (std::env::consts::OS) matchs with `os` field if defined. -::: tip +::: tip Подсказка Multiple custom modules can be defined by using a `.`. ::: -::: tip +::: tip Подсказка The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. ::: -::: tip +::: tip Подсказка [Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there! @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | Отражает значение параметра `symbol` | | style\* | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +*: Эта переменная может использоваться только в качестве части строки style #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/ru-RU/faq/README.md b/docs/ru-RU/faq/README.md index c4efb5b4..c4e1f1a0 100644 --- a/docs/ru-RU/faq/README.md +++ b/docs/ru-RU/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## I see symbols I don't understand or expect, what do they mean? diff --git a/docs/ru-RU/guide/README.md b/docs/ru-RU/guide/README.md index 6ebd1498..88b56b0c 100644 --- a/docs/ru-RU/guide/README.md +++ b/docs/ru-RU/guide/README.md @@ -169,163 +169,231 @@ - Установленный и включённый [шрифт Powerline](https://www.nerdfonts.com/) (например, [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Начало работы +### Step 1. Install Starship -**Примечание**: из-за распространения большого количества операционных систем, список поддерживаемых указан ниже. Can't see yours? Ознакомьтесь с [дополнительными инструкциями по платформе](https://starship.rs/installing/). +Select your operating system from the list below to view installation instructions: -1. Установите двоичный файл **starship**: +
+Android +Install Starship using any of the following package managers: - #### Установить последнюю версию +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### Из прекомпилированного двоичного файла, с Shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - Для обновления Starship перезапустите этот скрипт. Он заменит текущую версию без изменения конфигурации. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Примечание** - Значения по умолчанию из установочного скрипта могут быть переопределены. Для уточнения смотрите встроенную справку. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### Установить через менеджер пакетов +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### С [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### С [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Добавить сценарий инициализации в конфигурационный файл вашей оболочки: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Добавьте следующее в конец `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - Добавьте следующее в конец `~/.config/fish/config.fish`: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Добавьте следующее в конец `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Добавьте следующее в конец `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Добавьте следующее в конец `Microsoft.PowerShell_profile.ps1`. Вы можете проверить местоположение этого файла, запросив переменную `$PROFILE` в PowerShell. Обычно он находится в `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` или `~/.config/powershell/Microsoft.PowerShell_profile.ps1` на -Nix. +Добавьте следующую строку в конец `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- Добавьте следующее в конец `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +Добавьте следующее в конец `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. Добавьте следующую строку в конец `~/.elvish/rc.elv`: +Добавьте следующее в конец `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - Добавьте следующее в конец `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Add the following to the end of `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Добавьте следующее в конец `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Добавьте следующее в конец `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu. +Добавьте следующее в конец `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 Помощь -Мы всегда ищем помощь людей **всех уровней навыков**! Если вы хотите облегчить свой путь к проекту, посмотрите хорошие первые ошибки ([first good issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)). +Мы всегда ищем помощников **всех уровней навыков**! Если вы хотите облегчить свой путь к проекту, попробуйте [хорошие первые задачи](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). Если Вы свободно владеете иностранным языком отличным от английского, мы высоко оценим любую помощь в переводе нашей документации на другие языки и поддержании ее в актуальном состоянии. Если вы хотите помочь, переводы могут быть сделаны на платформе [Starship Crowdin](https://translate.starship.rs/). @@ -335,11 +403,11 @@ Пожалуйста, ознакомьтесь с этими предыдущими работами, которые помогли вдохновить создание Starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - командная строка ZSH для астронавтов. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - меж-оболочная тема robbyrussell, написаная на JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - меж-оболочная настраиваемая командная строка с иконками. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/ru-RU/installing/README.md b/docs/ru-RU/installing/README.md index 864cba5c..545a6463 100644 --- a/docs/ru-RU/installing/README.md +++ b/docs/ru-RU/installing/README.md @@ -11,7 +11,7 @@ There are so many platforms out there that they didn't fit into the main README. ## [Chocolatey](https://chocolatey.org) -### Требования +### Обязательные требования Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey. @@ -23,7 +23,7 @@ choco install starship ## [termux](https://termux.com) -### Требования +### Обязательные требования ```sh pkg install getconf diff --git a/docs/ru-RU/migrating-to-0.45.0/README.md b/docs/ru-RU/migrating-to-0.45.0/README.md index fea1d3e2..8399d468 100644 --- a/docs/ru-RU/migrating-to-0.45.0/README.md +++ b/docs/ru-RU/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur 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. +_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. #### Длительность команды diff --git a/docs/ru-RU/presets/README.md b/docs/ru-RU/presets/README.md index 90b2ebc3..240ad2a4 100644 --- a/docs/ru-RU/presets/README.md +++ b/docs/ru-RU/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/tr-TR/README.md b/docs/tr-TR/README.md index f6ad8739..d79d61d6 100644 --- a/docs/tr-TR/README.md +++ b/docs/tr-TR/README.md @@ -147,9 +147,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/tr-TR/advanced-config/README.md b/docs/tr-TR/advanced-config/README.md index 20eb399f..fbeef1ea 100644 --- a/docs/tr-TR/advanced-config/README.md +++ b/docs/tr-TR/advanced-config/README.md @@ -32,27 +32,28 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## Bash'e Özel ön-komut istemi(pre-prompt) ve ön-çalıştırma(pre-execution) Komutları -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Ancak Starship, size istem oluşturma prosedürü sayesinde kendi işlevlerinizi ekleme konusunda sınırlı bir yetenek sağlar: +Bash, çoğu diğer kabuklar gibi resmi bir preexec/precmd çerçevesine sahip değildir. Bu yüzden, `Bash'i` tamamen özelleştirmek zordur. Ancak Starship, size istem oluşturma prosedürü sayesinde kendi işlevlerinizi ekleme konusunda sınırlı bir yetenek sağlar: -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- Özel bir işlemi başlatmak için çizimin bitmesinden önce yeni bir işlev oluşturup adlandırmanız gerekmektedir.`starship_precmd_user_func`. Örneğin komut isteminden önce bir roket çizmek isterseniz ```bash -function blastoff(){ - echo "🚀" +echo "🚀" } -starship_precmd_user_func="blastoff" +starship_precmd_user_func="fırlatıldı" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- Özel bir işlemi başlatmadan hemen önce komut istemini çalıştırıp, [`DEBUG`filtreleme mekanizmasını](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/) kullanabilirsiniz. Bununla birlikte, Starship başlatılmadan hemen _önce_, DEBUG sinyalini filtrelemek<1>**zorundasınız.! Starship, DEBUG filtrelemesinin ardından bazı değerleri içerisinde barındırabilir ancak filtreleme işlemi starship başlatıldıktan sonra yazılırsa bazı fonksiyonlar devre dışı kalabilir. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -67,7 +68,7 @@ function Invoke-Starship-PreCommand { } ``` -## Change Window Title +## Pencere Başlığını Değiştirme Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. @@ -161,9 +162,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Example @@ -178,15 +179,15 @@ continuation_prompt = "▶▶" Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. @@ -194,8 +195,8 @@ The `none` token overrides all other tokens in a string if it is not part of a ` A color specifier can be one of the following: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/tr-TR/config/README.md b/docs/tr-TR/config/README.md index 008b7587..08a426da 100644 --- a/docs/tr-TR/config/README.md +++ b/docs/tr-TR/config/README.md @@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la add_newline = true # Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" # Disable the package module, hiding it from the prompt completely [package] @@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | - ### Example ```toml @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | 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 +*: This variable can only be used as a part of a style string ### Examples @@ -411,17 +412,16 @@ The `display` option is an array of the following table. #### Example ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 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 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 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 +*: This variable can only be used as a part of a style string ## Command Duration @@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Options -| Option | Default | Description | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | -| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `cmd_duration` module. | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Option | Default | Description | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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 +*: This variable can only be used as a part of a style string ### Example @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | The style for the module. | +| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| 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 + +### Example + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 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 +*: This variable can only be used as a part of a style string ### Example @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Options @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Example ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2905,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### Example ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | 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 +*: This variable can only be used as a part of a style string ### Example @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Mirrors the value of option `symbol` | | style\* | `black bold dimmed` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Example @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | 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 +*: This variable can only be used as a part of a style string ### Example @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 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 +*: This variable can only be used as a part of a style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/tr-TR/faq/README.md b/docs/tr-TR/faq/README.md index 99dd6bcc..89ffc1ac 100644 --- a/docs/tr-TR/faq/README.md +++ b/docs/tr-TR/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## I see symbols I don't understand or expect, what do they mean? diff --git a/docs/tr-TR/guide/README.md b/docs/tr-TR/guide/README.md index 787940f5..bb5205ec 100644 --- a/docs/tr-TR/guide/README.md +++ b/docs/tr-TR/guide/README.md @@ -169,159 +169,227 @@ - A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Getting Started +### Step 1. Install Starship -**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/). +Select your operating system from the list below to view installation instructions: -1. Install the **starship** binary: +

+Android +Install Starship using any of the following package managers: - #### Install Latest Version +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### From prebuilt binary, with Shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Note** - The defaults of the install script can be overridden see the built-in help. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### Install via Package Manager +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### With [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### With [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Add the init script to your shell's config file: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Add the following to the end of `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey ](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - Add the following to the end of `~/.config/fish/config.fish`: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Add the following to the end of `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Add the following to the end of `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. +Add the following to the end of `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- Add the following to the end of `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +Add the following to the end of `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`: +Add the following to the end of `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - Add the following to the end of `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Add the following to the end of `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Add the following to the end of `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Add the following to the end of `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu. +Add the following to the end of `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 Contributing @@ -335,11 +403,11 @@ If you are interested in helping contribute to starship, please take a look at o Please check out these previous works that helped inspire the creation of starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/tr-TR/migrating-to-0.45.0/README.md b/docs/tr-TR/migrating-to-0.45.0/README.md index 95a847bf..18661c3b 100644 --- a/docs/tr-TR/migrating-to-0.45.0/README.md +++ b/docs/tr-TR/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur 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. +_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. #### Command Duration diff --git a/docs/tr-TR/presets/README.md b/docs/tr-TR/presets/README.md index 9852bde9..dd989c0d 100644 --- a/docs/tr-TR/presets/README.md +++ b/docs/tr-TR/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/vi-VN/README.md b/docs/vi-VN/README.md index a9b06b51..10b1a529 100644 --- a/docs/vi-VN/README.md +++ b/docs/vi-VN/README.md @@ -119,7 +119,7 @@ eval $(starship init ion) #### Elvish - ::: warning Only elvish v0.17 or higher is supported. ::: + ::: warning Chỉ elvish v0.17 hoặc cao hơn được hỗ trợ. ::: Thêm đoạn sau vào cuối tệp tin `~/.elvish/rc.elv`: @@ -147,9 +147,9 @@ eval $(starship init ion) ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/vi-VN/advanced-config/README.md b/docs/vi-VN/advanced-config/README.md index b6958fa2..304eb3d8 100644 --- a/docs/vi-VN/advanced-config/README.md +++ b/docs/vi-VN/advanced-config/README.md @@ -32,11 +32,11 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## Tùy chỉnh các hàm được thực thi trước prompt và các lệnh Linux mặc định của bash shell -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Tuy nhiên, Starship cho phép bạn viết các hàm riêng của bạn để tùy biến việc render prompt: +Bash không có một preexec/precmd framework chính thống giống như các shells khác. Do đó rất khó để cung cấp các hook với khả năng tuỳ biến hoàn toàn cho `bash` shell. Tuy nhiên, Starship cho phép bạn viết các hàm riêng của bạn để tùy biến việc render prompt: -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- Để thực thi một hàm custom trước khi prompt được render, ta cần định nghĩa một hàm mới và gán `starship_precmd_user_func` cho tên của hàm này. Ví dụ, để vẽ một tên lửa trước prompt ```bash function blastoff(){ @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- Để thực thi một hàm custom trước khi một câu lệnh Linux chạy, ta có thể sử dụng cơ chế bẫy tín hiệu [`DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Tuy nhiên, bạn **phải** đặt bẫy tín hiệu DEBUG _trước_ khởi tạo Starship! Starship có thể giữ giá trị của DEBUG trap, nhưng nếu trap bị ghi đè sau khi starship khởi động, một vài chức năng sẽ không hoạt động. ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -67,11 +69,11 @@ function Invoke-Starship-PreCommand { } ``` -## Change Window Title +## Thay đổi tên gọi trên cửa sổ của chương trình terminal -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +Một vài shell có khả năng tự động thay đổi tên hiển thị (chẳng hạn như tên của thư mục hiện thời) trên cửa số của trình mô phỏng terminal. Fish shell mặc định thực hiện thay đổi này. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. -First, define a window title change function (identical in bash and zsh): +Đầu tiên, ta cần định nghĩa một hàm thay đổi tiêu đề cửa sổ (dùng chung cho cả bash và zsh): ```bash function set_win_title(){ @@ -79,23 +81,23 @@ function set_win_title(){ } ``` -You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). +Ta có thể sử dụng biến số để tuỳ chỉnh tên hiển thị này (`$USER`, `$HOSTNAME`, và `$PWD` là những biến số thường được dùng). -In `bash`, set this function to be the precmd starship function: +Với `bash` shell, set precmd của starship bằng tên của hàm này: ```bash starship_precmd_user_func="set_win_title" ``` -In `zsh`, add this to the `precmd_functions` array: +Với `zsh` shell, thêm hàm này vào mảng `precmd_functions`: ```bash precmd_functions+=(set_win_title) ``` -If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. +Nếu ta hài lòng với các tùy biến đã được thiết lập, thêm những dòng sau vào cấu hình shell (`~/.bashrc` hoặc `~/.zshrc`) để thực thi chúng mỗi khi ta khởi tạo một shell mới. -For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: +Ví dụ, nếu ta muốn hiển thị đường dẫn thư mục hiện tại trong tiêu đề của một terminal tab, thêm đoạn code sau vào `~/.bashrc` hoặc `~/.zshrc`: ```bash function set_win_title(){ @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### Ví dụ @@ -176,26 +178,26 @@ continuation_prompt = "▶▶" ## Các chuỗi kiểu -Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: +Chuỗi kiểu là một danh sách các từ, được phân cách bởi khoảng trắng. Các từ là không phân biệt hoa thường (ví dụ. `bold` và `Bold` là hai chuỗi tương đương). Mỗi từ có thể là một trong các từ sau: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `nghiêng` +- `underline` +- `dimmed` +- `đảo ngược` +- `bg:` +- `fg:` +- `` +- `none` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +`` là một nơi quy định màu (được bàn luận ở phía dưới). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. Thứ tự các từ trong chuỗi là không quan trọng. -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +Từ mã `none` ghi đè tất cả các từ mã khác trong chuỗi nếu nó không là một phần của `bg:` specifier, vậy nên `fg:red none fg:blue` sẽ vẫn tạo một chuỗi mà không có kiểu. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. Nó có thể trở thành một lỗi để sử dụng `none` trong việc kết hợp với các từ mã khác trong tương lai. -A color specifier can be one of the following: +Một quy định màu có thể là một trong các thứ sau: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- Một `#` được theo sau bởi một số thập lục phân gồm sáu chữ số. Cái này quy định một [mã thập lục phân cho màu RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- Một số nằm giữa 0-255. Cái này quy định một [mã màu ANSI 8-bit](https://i.stack.imgur.com/KTSQa.png). -If multiple colors are specified for foreground/background, the last one in the string will take priority. +Nếu nhiều màu được quy định cho màu chữ/màu nền, cái cuối cùng trong chuỗi sẽ được ưu tiên. diff --git a/docs/vi-VN/config/README.md b/docs/vi-VN/config/README.md index ed3a10a0..fcc1c63c 100644 --- a/docs/vi-VN/config/README.md +++ b/docs/vi-VN/config/README.md @@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Tất cả cấu hình của starship đã xong trong tập tin này: [TOML](https://github.com/toml-lang/toml): ```toml -# Chèn một dòng trắng vào giữa các dấu nhắc lệnh +# Inserts a blank line between shell prompts add_newline = true -# Thay thế biểu tượng "❯" trong dấu nhắc lệnh bằng "➜" -[character] # Tên mô đun chúng ta đang cấu hình là "character" -success_symbol = "[➜](bold green)" # đoạn "success_symbol" đươc thiết lập thành "➜" với màu "bold green" +# Replace the "❯" symbol in the prompt with "➜" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" -#Vô hiệu mô đun package, ẩn nó hoàn toàn trong dấu nhắc lệnh +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` @@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### Logging -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +Mặc định, starship logs các cảnh báo và các lỗi trong một tập tin tên là `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, nơi đó khoá của phiên làm việc tương ứng với thực thể terminal của bạn. Cái này, tuy nhiên có thể được thay đổi bằng cách sử dụng biến môi trường `STARSHIP_CACHE`: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### Thuật ngữ -**Module**: A component in the prompt giving information based on contextual information from your OS. 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**: Một thành phần trong prompt, thông tin lấy được dựa trên thông tin ngữ cảnh từ hệ điều hành của bạn. 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. -**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**: Các thành phần con nhỏ hơn chứa thông tin cung cấp bởi module. For example, the "version" variable in the "nodejs" module contains the current version of 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. +Bằng việc quy ước, đa số các module có một tiền tố của terminal mặc định (ví dụ `via` trong "nodejs") và một khoảng trắng như là một hậu tố. ### Định dạng các chuỗi -Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. +Định dạng các chuỗi là định dạng một module với việc in ra tất cả các biến của nó. Đa số các module có một cái bắt đầu gọi là `format`, cái đó cấu hình việc hiển thị định dạng của module. Bạn có thể sử dụng các văn bản, các biến và các nhóm văn bản trong một định dạng chuỗi. #### Biến -A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. +Một biến chứa một kí hiệu `$` theo sau bởi tên biến. The name of a variable can only contain letters, numbers and `_`. -For example: +Ví dụ: - `$version` là một đính dạng chuỗi với một biến đặt tên là `version`. - `$git_branch$git_commit` là một định dạng chuỗi với hai biến named `git_branch` và `git_commit`. @@ -83,13 +83,13 @@ For example: #### Nhóm văn bản -A text group is made up of two different parts. +Một nhóm văn bản được tạo nên bởi hai phần khác nhau. -The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. +Phần đầu tiên, cái được bao bọc trong một `[]`, là một [định dạng chuỗi](#format-strings). Bạn có thể thêm các văn bản, các biến, hoặc thậm chí các nhóm văn bản lồng nhau vào trong nó. -In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. +Phần thứ hai, cái được bao bọc trong một `()`, là một [chuỗi kiểu](#style-strings). This can be used to style the first part. -For example: +Ví dụ: - `[on](red bold)` sẽ in một chuỗi `on` với chữ đậm tô màu đỏ. - `[⌘ $version](bold green)` sẽ in một biểu tượng `⌘` theo sau là nội dung của biến `version`, với chữ in đậm màu xanh lá cây. @@ -97,7 +97,7 @@ For example: #### Các chuỗi kiểu -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +Đa số các module trong starship cho phép bạn cấu hình kiểu hiển thị của chúng. This is done with an entry (thường được gọi là `kiểu`) cái là một cuỗi cấu hình đặc biệt. Đây là vài ví dụ của các chuỗi kiểu cũng với những gì chúng làm. Cú pháp chi tiết đầy đủ, tham khảo [hướng dẫn cấu hình nâng cao](/advanced-config/). - `"fg:green bg:blue"` thiết lập chữ màu xanh lá cây trên nền màu xanh nước biển - `"bg:blue fg:bright-green"` thiết lập chữ màu xanh lá cây sáng trên nền màu canh nước biển @@ -106,13 +106,13 @@ Most modules in starship allow you to configure their display styles. This is do - `"bold italic fg:purple"` thiết lập chữa nghiêng đậm có màu tím - `""` vô hiệu hoá tất cả các kiểu -Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. +Lưu ý rằng những style trông như thế nào sẽ được điều khiển bởi giả lập terminal của bạn. Ví dụ, một vài giả lập terminal sẽ làm sáng những màu thay vì làm đậm chữ, và một vài theme màu sử dụng cũng các giá trị cho các màu thường và màu sáng. Tương tự, để có được chữ nghiêng, terminal của bạn phải hỗ trợ các kiểu chữ nghiêng. #### Điều kiện định dạng chuỗi -A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. +Một điều kiện định dạng chuỗi bọc trong `(` và `)` sẽ không render nếu tất cả các biến bên trong là rỗng. -For example: +Ví dụ: - `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. - `(một vài văn bản)` sẽ không hiển thị thứ gì khi không có những biến bọc trong các dấu ngoặc. @@ -124,18 +124,18 @@ The following symbols have special usage in a format string and must be escaped: Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). -For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: +Ví dụ, khi bạn muốn in một kí hiệu `$` trên một dòng mới, các cấu hình sau cho `định dạng` tương đương: ```toml -# with basic string +# với chuỗi cơ bản format = "\n\\$" -# with multiline basic string +# với chuỗi cơ bản trong nhiều dòng format = """ \\$""" -# with literal string +# với chuỗi đặc biệt format = ''' \$''' @@ -143,7 +143,7 @@ format = ''' ## Prompt -This is the list of prompt-wide configuration options. +Cái này là danh sách các tuỳ chọn cho cấu hình prompt-wide. ### Các tuỳ chọn @@ -155,28 +155,27 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Chèn dòng trắng giữa các dấu nhắc lệnh. | - ### Ví dụ ```toml # ~/.config/starship.toml -# Use custom format +# Sử dụng định dạng custom format = """ [┌───────────────────>](bold green) [│](bold green)$directory$rust$package [└─>](bold green) """ -# Wait 10 milliseconds for starship to check files under the current directory. +# Chờ 10 milliseconds để starship kiểm tra các tập tin trong đường dẫn hiện tại. scan_timeout = 10 -# Disable the blank line at the start of the prompt +# Vô hiệu hóa dòng trắng tại ví trị bắt đầu của dấu nhắc lệnh add_newline = false ``` ### Định dạng prompt mặc định -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: +Mặc định `format` được sử dụng để định nghĩa định dạng của prompt, nếu rỗng hoặc không `format` được cung cấp. Mặc định như sau: ```toml format = "$all" @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,12 +256,12 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +`aws` module cho biết region và profile hiện tại của AWS. Cái này dựa trên các biến môi trường `AWS_REGION`, `AWS_DEFAULT_REGION`, và `AWS_PROFILE` với tập tin `~/.aws/config`. This module also shows an expiration timer when using temporary credentials. 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. @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Các vị dụ @@ -359,7 +360,7 @@ style = "blue bold" ## Battery -The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. +`battery` module cho biết cách sạc pin của thiết bị là gì và tình trạng sạc hiện tại của nó. Module chỉ được nhìn thấy khi pin của thiết bị dưới 10%. ### Các tuỳ chọn @@ -387,7 +388,7 @@ discharging_symbol = "💀 " ### Hiển thị pin -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). Nếu `display` không được cung cấp. Mặc định như sau: ```toml [[battery.display]] @@ -399,7 +400,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### Các tuỳ chọn -The `display` option is an array of the following table. +Tuỳ chọn `display` là một mảng của của bảng sau. | Tuỳ chọn | Mặc định | Mô tả | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- | @@ -411,29 +412,28 @@ The `display` option is an array of the following table. #### Ví dụ ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +Module `character` cho biết một kí tự (thường là một mũi tên) bên cạnh nơi văn bản được nhập trong terminal của bạn. -The character will tell you whether the last command was successful or not. It can do this in two ways: +Kí tự sẽ nói cho bạn câu lệnh cuối liệu thành công hay thất bại. Nó có thể làm điều này bằng hai cách: - thay đổi màu(`đỏ`/`xanh lá`) - thay đổi hình dạng (`❯`/`✖`) -By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +Mặc định, nó chỉ thay đổi màu. If you also want to change its shape take a look at [this example](#with-custom-error-shape). ::: cảnh báo @@ -496,7 +496,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: +The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). Mặc định module sẽ được kích hoạt nếu thoả mãn bất kì điều kiện nào dưới đây: - Đường dẫn hiện tại chứa một tập tin `CmakeLists.txt` - Đường dẫn hiện tại chứa một tập tin `CMakeCache.txt` @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ## COBOL / GNUCOBOL @@ -552,37 +552,32 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ## Command Duration -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. +Module `cmd_duration`. cho biết câu lệnh cuối cùng thực thi trong bao lâu. Module sẽ được hiện chỉ khi câu lệnh lấy nhiều hơn 2 giây, hoặc giá trị cấu hình `min_time`, nếu nó tồn tại. -::: warning Do not hook the DEBUG trap in Bash +::: cảnh báo Không thể hook DEBUG trap trong Bash -If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. +Nếu bạn đang chạy Starship trong `bash`, không thể hook `DEBUG` trap sau khi chạy `eval $(starship init $0)`, hoặc module này **sẽ** ngắt. ::: -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. +Người dùng Bash, những người cần chức năng giống preexec có thể sử dụng [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Đơn giản là định nghĩa các mảng `preexec_functions` và `precmd_functions` trước khi chạy `eval $(starship init $0)`, và sau đó thực thi như bình thường. ### Các tuỳ chọn -| Tuỳ chọn | Mặc định | Mô tả | -| -------------------- | ----------------------------- | ---------------------------------------------------------------------- | -| `min_time` | `2_000` | Khoảng thời gian ngắn nhất để hiện thời gian (tính bằng milliseconds). | -| `show_milliseconds` | `false` | Hiện milliseconds. | -| `format` | `"took [$duration]($style) "` | Định dạng cho module. | -| `style` | `"bold yellow"` | Kiểu cho module. | -| `disabled` | `false` | Vô hiệu module `cmd_duration`. | -| `show_notifications` | `false` | Hiện thông báo desktop khi câu lệnh hoàn thành. | -| `min_time_to_notify` | `45_000` | Khoảng thời gian ngắn nhất để thông báo (tính bằng milliseconds). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Tuỳ chọn | Mặc định | Mô tả | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Khoảng thời gian ngắn nhất để hiện thời gian (tính bằng milliseconds). | +| `show_milliseconds` | `false` | Hiện milliseconds. | +| `format` | `"took [$duration]($style) "` | Định dạng cho module. | +| `style` | `"bold yellow"` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu module `cmd_duration`. | +| `show_notifications` | `false` | Hiện thông báo desktop khi câu lệnh hoàn thành. | +| `min_time_to_notify` | `45_000` | Khoảng thời gian ngắn nhất để thông báo (tính bằng 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. | ### Các biến @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | Thời gian nó lấy để thực thi câu lệnh | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -607,9 +602,9 @@ format = "underwent [$duration](bold yellow)" The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. -::: tip +::: thử thuật -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Cái này không loại bỏ conda's prompt mà nó sở hữu, bạn có thể muốn chạy `conda config --set changeps1 False`. ::: @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | Kiểu cho module. | +| `format` | "[$symbol \\[$name\\]]($style) " | Định dạng cho module. | +| `disabled` | `false` | Disables the `container` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ------------------- | -------------------------------- | +| name | `fedora-toolbox:35` | The name of the container | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### Các tuỳ chọn @@ -759,11 +787,11 @@ format = "via [🦕 $version](green bold) " ## Đường dẫn -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` module hiển thị đường dẫn thư mục hiện hành của bạn,, cắt ngắn ba thư mục cha. Đường dẫn của bạn cũng sẽ được cắt ngắn tới đường dẫn gốc của git repo hiện tại của bạn. -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. +Khi sử dụng fish style pwd option, thay vì ẩn đường dẫn được rút gọn, bạn sẽ thấy một tên ngắn cho mỗi thư mục dựa trên số bạn cho phép trng tùy chọn. -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`. +Cho ví dụ, `~/Dev/Nix/nixpkgs/pkgs` nơi `nixpkgs` là gốc của repo, và tuỳ chọn thiết lập sang `1`. Bây giờ bạn sẽ thấy `~/D/N/nixpkgs/pkgs`, trong khi trước nó là `nixpkgs/pkgs`. ### Các tuỳ chọn @@ -782,7 +810,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |

-This module has a few advanced configuration options that control how the directory is displayed. +Mô đun này có một vài tùy chọn nâng cao để điều khiển cách thư mục được hiển thị. | Tùy chọn nâng cao | Mặc định | Mô tả | | --------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | Đường dẫn thư mục hiện tại | | style\* | `"black bold dimmed"` | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -859,9 +887,9 @@ 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. Nếu SDK được ghim trong thư mục hiện tại, phiên bản ghim đó được hiển thị. Ngược lại, mô đun hiển thị phiên bản cuối cùng của SDK được cài đặt. -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: +Mặc định, mô đun này sẽ chỉ được hiển thị trong dấu nhắc lệnh của bạn khi một hoặc nhiều tệp tin dưới đây xuất hiện trong thư mục hiện tại: - `global.json` - `project.json` @@ -872,11 +900,11 @@ By default this module will only be shown in your prompt when one or more of the - `*.fsproj` - `*.xproj` -You'll also need the .NET Core SDK installed in order to use it correctly. +Bạn cũng sẽ cần cài đặt .NET Core SDK đúng cách để sử dụng một cách chính xác. -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. +Mô đun này sử dụng cơ chế của bản thân để phát hiện phiên bản của chính nó. Thông thường, nó nhanh gấp đôi nếu chạy `dotnet --version`, nhưng nó có thể hiện sai phiên bản nếu dự án .NET của bạn có một cấu trúc thư mục bất thường. Nếu độ chính xác quan trọng hơn tốc độ, bạn có thể vô hiệu cơ chế bằng cài đặt `heuristic = false` trong các tùy chọn mô đun. -The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. +Mô đun cũng sẽ hiện Target Framework Moniker () khi có một tệp tin csproj trong thư mục hiện tại. ### Các tuỳ chọn @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ ```toml - # ~/.config/starship.toml [status] @@ -2845,16 +2905,15 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: tip +::: thử thuật -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn. ::: @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2941,7 +2999,7 @@ format = "via [🏎 $version](red bold)" The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. -::: tip +::: thử thuật By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). @@ -2974,7 +3032,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -3000,9 +3058,9 @@ format = "[🏎💨 $workspace]($style) " The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. -::: tip +::: thử thuật -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn. ::: @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | thời gian | `13:08:10` | The current time. | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -3051,7 +3109,7 @@ The `username` module shows active user's username. Module cho sẽ được hi - The user is currently connected as an SSH session - The variable `show_always` is set to true -::: tip +::: thử thuật SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | `black bold dimmed` | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -3242,19 +3301,19 @@ These modules will be shown if any of the following conditions are met: - The `when` command returns 0 - The current Operating System (std::env::consts::OS) matchs with `os` field if defined. -::: tip +::: thử thuật Multiple custom modules can be defined by using a `.`. ::: -::: tip +::: thử thuật The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. ::: -::: tip +::: thử thuật [Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there! @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +*: Biến này có thể chỉ được sử dụng như một phần của style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/vi-VN/faq/README.md b/docs/vi-VN/faq/README.md index 4613fb74..758f9348 100644 --- a/docs/vi-VN/faq/README.md +++ b/docs/vi-VN/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## Tôi thấy các biểu tượng tôi không hiểu hoặc không mong muốn, chúng có nghĩa là gì? diff --git a/docs/vi-VN/guide/README.md b/docs/vi-VN/guide/README.md index 369c7a3b..6986fe9a 100644 --- a/docs/vi-VN/guide/README.md +++ b/docs/vi-VN/guide/README.md @@ -95,7 +95,7 @@ >日本語   Русский   简体中文   繁體中文

@@ -169,159 +169,227 @@ - Đã cài đặt [Nerd Font](https://www.nerdfonts.com/) và đã kích hoạt trong giao diện dòng lệnh của bạn (ví dụ, thử [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Bắt đầu +### Step 1. Install Starship -**Lưu ý**: do sự gia tăng của các nền tảng khác nhau, chỉ một tập con các nền tảng hỗ trợ được hiển thị bên dưới. Không thể tìm thấy nền tảng phù hợp của bạn? Hãy xem một [hướng dẫn bổ sung cho các nền tảng khác](https://starship.rs/installing/). +Select your operating system from the list below to view installation instructions: -1. Cài đặt **starship** nhị phân: +
+Android +Install Starship using any of the following package managers: - #### Cài đặt phiên bản cuối cùng +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### Từ bản nhị phân có sẵn, với Shell: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - Để cập nhật chính Starship, hãy chạy lại đoạn script bên trên. Nó sẽ thay thế phiên bản hiện tại mà không hề thay đổi gì những cài đặt của Starship trước đó. +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **Ghi chú** - Script cài đặt mặc định có thể bị ghi đè. +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### Cài đặt thông qua Trình quản lí gói +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### Với [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### Với [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. Thêm đoạn mã khởi tạo vào tệp tin cấu hình shell của bạn: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- Thêm đoạn sau vào cuối tệp tin `~/.bashrc`: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - Thêm đoạn sau vào cuối tệp tin `~/.config/fish/config.fish`: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +Thêm đoạn sau vào cuối tệp tin `~/.bashrc`: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- Thêm đoạn sau vào cuối tệp tin `~/.zshrc`: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - Thêm đoạn sau vào cuối tệp tin `Microsoft.PowerShell_profile.ps1`. Bạn có thể kiểm tra vị trí tệp tin này bằng việc truy xuất biến `$PROFILE` trong PowerShell. Thông thường, đường dẫn là `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` hoặc `~/.config/powershell/Microsoft.PowerShell_profile.ps1` trên -Nix. +Thêm đoạn sau vào cuối tệp tin `~/.elvish/rc.elv`: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- Thêm đoạn sau vào cuối tệp tin `~/.config/ion/initrc`: +
+Fish - ```sh - # ~/.config/ion/initrc +Thêm đoạn sau vào cuối tệp tin `~/.config/fish/config.fish`: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. Thêm đoạn sau vào cuối tệp tin `~/.elvish/rc.elv`: +Thêm vào cuối tệp tin `~/.config/ion/initrc`: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - Thêm đoạn sau vào cuối tệp tin `~/.tcshrc`: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - Thêm dòng này vào cuối của file `~/.xonshrc`: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +Thêm đoạn dưới vào cuối file `~/.tcshrc`: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +Thêm dòng này vào cuối của file `~/.xonshrc`: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. Chỉ có nu phiên bản v. 033 hoặc cao hơn được hỗ trợ. Add the following to your nu config file. Bạn có thể kiểm tra vị trí của cái file này bằng cách chạy `đường dẫn cấu hình` trong nu. +Thêm đoạn sau vào cuối tệp tin `~/.zshrc`: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 Đóng góp @@ -335,11 +403,11 @@ Nếu bạn thích thú trong việc giúp đỡ đóng góp cho starship, xin h Xin hãy xem qua những công việc này trước đây, những thứ đã giúp truyền cảm hứng để tạo ra starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt cho những phi hành gia. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme được viết bằng JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell có khả năng tuỳ biến giống powerline prompt với các icon. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/vi-VN/migrating-to-0.45.0/README.md b/docs/vi-VN/migrating-to-0.45.0/README.md index aadc8685..02ae96a0 100644 --- a/docs/vi-VN/migrating-to-0.45.0/README.md +++ b/docs/vi-VN/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ Cấu hình dâu nhắc lệnh để sử dụng cấu hình `use_symbol_for_sta error_symbol = "[✖](bold red)" ``` -*Lưu ý:* Phần tử `character` tự động thêm vào một khoảng trắng phía sau, so unlike the other `format` strings, we specifically do not add one in the above examples. +_Lưu ý:_ Phần tử `character` tự động thêm vào một khoảng trắng phía sau, so unlike the other `format` strings, we specifically do not add one in the above examples. #### Command Duration diff --git a/docs/vi-VN/presets/README.md b/docs/vi-VN/presets/README.md index ed0d4c20..45cba0a0 100644 --- a/docs/vi-VN/presets/README.md +++ b/docs/vi-VN/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index 4b985a9d..a9206311 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -30,7 +30,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p ### 前置要求 -- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal. +- 安装并在你的终端启用一种 [Nerd Font](https://www.nerdfonts.com/) 。 ### 快速安装 @@ -143,13 +143,13 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Nushell - ::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu. + ::: warning This will change in the future. 仅支持 nu 版本 v0.33 或更高版本。 ::: Add the following to your nu config file. 您可以用 nu 运行 `config path` 来检查此 文件的位置。 ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` @@ -157,7 +157,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Xonsh - Add the following to the end of `~/.xonshrc`: + 在 `~/.bashhrc` 的最后,添加以下内容: ```sh # ~/.xonshrc diff --git a/docs/zh-CN/advanced-config/README.md b/docs/zh-CN/advanced-config/README.md index 4c532d2d..5f0f94bd 100644 --- a/docs/zh-CN/advanced-config/README.md +++ b/docs/zh-CN/advanced-config/README.md @@ -8,11 +8,11 @@ ::: -## Custom pre-prompt and pre-execution Commands in Cmd +## 在 Cmd 中自定义预提示和执行前命令 -Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: +Clink 提供了很灵活的 API,能在 Cmd shell 中运行预提示和执行前命令。 在 Starship 中使用这些 API 很容易。 对你的 `starship.lua` 按需做出如下修改: -- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do +- 为了在提示符显示前运行一个自定义函数,你需要定义一个名为 `starship_preprompt_user_func` 的函数。 这个函数接受当前的提示符作为字符串参数,你可以在函数中使用它。 例如,如果想在提示符前绘制一个火箭,可以这样写: ```lua function starship_preprompt_user_func(prompt) @@ -22,7 +22,7 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do +- 为了在命令执行前运行一个自定义函数,你需要定义一个名为 `starship_precmd_user_func` 的函数。 这个函数接受当前的命令行内容作为字符串参数,同样,你可以在函数中使用它。 例如,要打印即将被执行的命令,可以这样写: ```lua function starship_precmd_user_func(line) @@ -32,11 +32,11 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## 在 Cmd 中自定义预提示和执行前命令 -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. 然而,Starship 确实能使您有限地在提示符渲染过程中插入自己的函数执行: +Bash 并没有类似大多数其它 shell 的正式预执行/预命令框架。 因此,很难在 `bash` 中提供完全可自定义的 hook 机制。 然而,Starship 确实能使您有限地在提示符渲染过程中插入自己的函数执行: -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- 若要在提示符显示之前运行自定义函数,需要定义此函数,然后将函数名赋值给 `starship_reserved_user_func`。 例如,要在提示符之前绘制一枚火箭,您应该写 ```bash function blastoff(){ @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- 要在一个命令运行前运行自定义函数,您可以使用 [`DEBUG` trap 机制](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/)。 然而,您**必须**在捕捉 DEBUG 信号_之前_启动 Starship! Starship 可以保留 DEBUG trap 的值,但如果该 trap 在 starship 启动后被覆盖,一些功能将会被破坏。 ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -67,11 +69,11 @@ function Invoke-Starship-PreCommand { } ``` -## Change Window Title +## 更改窗口标题 -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +一些 shell 会自动更改您的窗口标题(比如改成您的工作目录)。 Fish 甚至默认会执行此功能。 Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. -First, define a window title change function (identical in bash and zsh): +首先,定义窗口标题更改函数(在 bash 和 zsh 中相同): ```bash function set_win_title(){ @@ -79,23 +81,23 @@ function set_win_title(){ } ``` -You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). +您可以使用变量来定制标题(常用的有 `$USER`,`$HOSTNAME` 和 `$PWD`)。 -In `bash`, set this function to be the precmd starship function: +在 `bash` 中,设置此函数为 starship 预执行函数: ```bash starship_precmd_user_func="set_win_title" ``` -In `zsh`, add this to the `precmd_functions` array: +在 `zsh`中,将此函数添加到 `reservmd_functions` 列表: ```bash precmd_functions+=(set_win_title) ``` -If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. +如果您对产生的效果感到满意,请将以上代码添加到您的 shell 配置文件(`~/.bashrc` 或 `~/zsrhc`)中以使其永久化。 -For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: +例如,如果您想要在终端标签标题中显示当前目录, 将以下代码添加到您的 `~/.ashrc` 或 `~/.zshrc`: ```bash function set_win_title(){ @@ -125,9 +127,9 @@ function Invoke-Starship-PreCommand { Invoke-Expression (&starship init powershell) ``` -## Enable Right Prompt +## 启用右侧提示 -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`. +一些 Shell 支持右侧提示, 它与输入区渲染在同一行。 Starship 可以设置右侧提示的内容,使用 `right_format` 选项。 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). @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### 示例 @@ -176,26 +178,26 @@ continuation_prompt = "▶▶" ## 样式设定 -Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: +样式字符串是用空格分隔的单词列表。 其中单词不是大小写敏感的(例如 `bold` 和 `BoLd` 被视为同一字符串)。 每个单词可以是以下之一: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +`` 是颜色说明符(下面解释)。 `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. 字符串中的单词顺序不影响显示结果。 -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. 未来可能会将 `none` 与其它标识符一起使用视为一种错误。 -A color specifier can be one of the following: +颜色说明符可以是以下内容之一: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- 一个 `#` 后跟一个六位十六进制数。 这将指定一个 [十六进制 RGB 颜色代码](https://www.w3schools.com/colors/colors_hexadecimal.asp)。 +- 0-255 之间的数字。 这将指定一个 [8 位 ANSI 颜色码](https://i.stack.imgur.com/KTSQa.png)。 -If multiple colors are specified for foreground/background, the last one in the string will take priority. +如果为文本/背景指定了多个颜色,字符串中最后指定的颜色将具有最高优先级。 diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md index 667d1c48..434846b3 100644 --- a/docs/zh-CN/config/README.md +++ b/docs/zh-CN/config/README.md @@ -9,12 +9,12 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Starship 的所有配置都在此 [TOML](https://github.com/toml-lang/toml) 配置文件中完成: ```toml -# 在shell提示符插入新行 +# Inserts a blank line between shell prompts add_newline = true -# 在提示处使用"➜"替换"❯" -[character] # 配置的模块名:character -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# Replace the "❯" symbol in the prompt with "➜" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" # Disable the package module, hiding it from the prompt completely [package] @@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### 日志 -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +默认情况下,Starship 会将警告和错误日志记录到文件 `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`. 其中 session key 与您的终端实例相对应。 不过,这也可以使用 `STARSHIP_CACHE` 环境变量来修改: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -61,7 +61,7 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### 术语 -**Module**: A component in the prompt giving information based on contextual information from your OS. 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. @@ -97,7 +97,7 @@ For example: #### 样式设定 -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +Starship 中的大多数组件允许您为其设置显示样式。 显示样式可以通过一个字符串字段(一般是 `style`)来设置。 以下的例子给出了一些样式字符串并描述了它们的效果。 样式字符串的完整语法请查阅 [高级配置指南](/advanced-config/)。 - `"fg:green bg:blue"` 在蓝色背景上显示绿色文本 - `"bg:blue fg:bright-green"` 在蓝色背景上显示亮绿色文本 @@ -106,7 +106,7 @@ Most modules in starship allow you to configure their display styles. This is do - `"bold italic fg:purple"` 设置文本为粗体、意大利体,颜色为紫色 - `""` 显式禁用所有样式 -Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. +请注意,最终的显示样式将由您的终端模拟器控制。 例如,有的终端模拟器对于“bold”属性的文本是加亮颜色而不是加粗文字,有的颜色主题对“普通”和“明亮”两种属性的颜色使用相同的颜色值。 此外,要获得意大利体文本(一般设计为斜体),您的终端必须支持意大利体显示。 #### Conditional Format Strings @@ -143,7 +143,7 @@ format = ''' ## 提示符 -This is the list of prompt-wide configuration options. +以下是关于提示符的配置项。 ### 配置项 @@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Startship 执行命令的超时时间(单位:毫秒)。 | | `add_newline` | `true` | 在 shell 提示符之间插入空行。 | - ### 示例 ```toml @@ -176,7 +175,7 @@ add_newline = false ### 默认提示符格式 -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: +The default `format` is used to define the format of the prompt, if empty or no `format` is provided. 默认设置如下: ```toml format = "$all" @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,12 +256,12 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +`aws` 组件显示当前 AWS 主机所在区域与配置信息。 各组件基于 `AWS_REGION`,`AWS_DEFAULT_REGION` 和 `AWS_PROFILE` 环境变量与 `~/.aws/config` 文件。 This module also shows an expiration timer when using temporary credentials. 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. @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### Examples @@ -359,7 +360,7 @@ style = "blue bold" ## Battery -The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. +`battery` 组件显示电池充电情况和当前充电状态。 这个组件只会在当前电量低于 10% 时显示。 ### 配置项 @@ -387,7 +388,7 @@ discharging_symbol = "💀 " ### Battery 组件的显示 -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果 `display` 没有设置, 默认设置如下: ```toml [[battery.display]] @@ -399,7 +400,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### 配置项 -The `display` option is an array of the following table. +`display` 字段的子字段如下: | Option | 默认值 | 描述 | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- | @@ -411,24 +412,23 @@ The `display` option is an array of the following table. #### 示例 ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## Character -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 (`❯`/`✖`) @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,37 +552,32 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ## Command Duration -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 信号 -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)` 后,不要捕获 `DEBUG` 信号,否则此组件**将会**坏掉。 ::: -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. +需要在自动每一条命令前执行某些操作的 Bash 用户可以使用 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只需要在执行 `eval $(starship init $0)` 前简单地定义 `preexec_functions` 和 `precmd_functions` 两个列表,就可以照常运行了。 ### 配置项 -| Option | 默认值 | 描述 | -| -------------------- | ----------------------------- | ----------------------------------------------------- | -| `min_time` | `2_000` | 显示此组件所需的最短执行时长(单位:毫秒)。 | -| `show_milliseconds` | `false` | 除了秒数外在执行时长中额外显示毫秒。 | -| `format` | `"took [$duration]($style) "` | 组件格式化模板。 | -| `style` | `"bold yellow"` | 此组件的样式。 | -| `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). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Option | 默认值 | 描述 | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | 显示此组件所需的最短执行时长(单位:毫秒)。 | +| `show_milliseconds` | `false` | 除了秒数外在执行时长中额外显示毫秒。 | +| `format` | `"took [$duration]($style) "` | 组件格式化模板。 | +| `style` | `"bold yellow"` | 此组件的样式。 | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -609,7 +604,7 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e ::: tip -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +此组件没有禁用 conda 自带的提示符修改,您可能需要执行 `conda config --set changeps1 False`。 ::: @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### 配置项 + +| Option | 默认值 | 描述 | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | 此组件的样式。 | +| `format` | "[$symbol \\[$name\\]]($style) " | 组件格式化模板。 | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| 字段 | 示例 | 描述 | +| --------- | ------------------- | ------------------------- | +| name | `fedora-toolbox:35` | The name of the container | +| symbol | | `symbol`对应值 | +| style\* | | `style`对应值 | + +*: This variable can only be used as a part of a style string + +### 示例 + +```toml +# ~/.config/starship.toml + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### 配置项 @@ -759,11 +787,11 @@ format = "via [🦕 $version](green bold) " ## 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 风格的当前目录显示样式时,您会看到基于您的设置的每个上级目录的短名称,而不是隐藏被截断的上级目录。 -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` 是 git 仓库根目录,fish 风格相关选项设置为 `1`。 您将会看到 `~/D/N/nixpkgs/pkgs`,而在设置 fish 风格之前,当前路径将显示成 `nixpkgs/pkgs`。 ### 配置项 @@ -782,7 +810,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |

-This module has a few advanced configuration options that control how the directory is displayed. +此组件有几个高级配置选项来控制当前目录路径的显示方式。 | Advanced Option | 默认值 | 描述 | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -859,7 +887,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 版本。 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: @@ -874,7 +902,7 @@ 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 () when there is a csproj file in the current directory. @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2905,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2854,7 +2913,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。 ::: @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -2998,11 +3056,11 @@ format = "[🏎💨 $workspace]($style) " ## Time -The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. +`time` 组件显示当前的 **本地** 时间。 `format` 字段值会提供给 [`chrono`](https://crates.io/crates/chrono) crate 用来控制时间显示方式。 请参阅 [chrono strftime 文档](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) 以了解可用格式选项。 ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。 ::: @@ -3018,7 +3076,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `disabled` | `true` | 禁用 `time` 组件。 | | `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 否则,其默认值为 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting. ### Variables @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -3044,7 +3102,7 @@ time_range = "10:00:00-14:00:00" ## Username -The `username` module shows active user's username. 此组件只有满足以下条件之一时才会被显示: +`username` 组件显示当前活跃的用户名。 此组件只有满足以下条件之一时才会被显示: - 当前用户是 root - 当前用户与登录用户不相同 @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | `symbol`对应值 | | style\* | `black bold dimmed` | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 示例 @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | `symbol`对应值 | | style\* | `style`对应值 | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/zh-CN/faq/README.md b/docs/zh-CN/faq/README.md index 3168265a..15f04ca7 100644 --- a/docs/zh-CN/faq/README.md +++ b/docs/zh-CN/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## I see symbols I don't understand or expect, what do they mean? diff --git a/docs/zh-CN/guide/README.md b/docs/zh-CN/guide/README.md index 9914a2b2..e7d1a2f7 100644 --- a/docs/zh-CN/guide/README.md +++ b/docs/zh-CN/guide/README.md @@ -2,7 +2,7 @@ Starship – Cross-shell prompt

@@ -10,17 +10,17 @@ GitHub Actions workflow status Crates.io version Packaging status
Follow @StarshipPrompt on Twitter

@@ -169,177 +169,245 @@ - 安装一个 [Nerd Font](https://www.nerdfonts.com/) 的字体,并在终端启用(例如,可以尝试使用 [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads) 字体)。 -### 开始安装 +### 步骤 1. 安装 Starship -**注意**: 由于平台众多,下面只显示支持的部分平台 找不到你的平台? 查看 [额外的平台说明](https://starship.rs/installing/)。 +从下面的列表中选择您的操作系统以查看安装指令: -1. 安装 **starship** 二进制文件: +
+Android +使用下列软件包管理器安装Starship: - #### 安装最新版本 +| 软件包来源 | 指令 | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### 下载预构建的二进制文件,使用 Shell 命令: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +使用下列软件包管理器安装Starship: - 自更新 Starship ,运行下面脚本 将会在不改动 Starship 配置文件的情况下升级版本 +| Distribution | 软件包来源 | 指令 | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **注意** - 可以覆盖安装脚本的默认值,请参阅内置帮助。 +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### 通过软件包管理器安装 +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### 使用 [Homebrew](https://brew.sh/): +| Distribution | 软件包来源 | 指令 | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### 使用 [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. 将初始化脚本添加到您的 shell 的配置文件: +Alternatively, install Starship using any of the following package managers: +| 软件包来源 | 指令 | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- 在 `~/.bashhrc` 的最后,添加以下内容: +
+Windows - ```sh - # ~/.bashrc +使用下列软件包管理器安装Starship: - eval "$(starship init bash)" - ``` +| 软件包来源 | 指令 | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### 步骤 2. 设置你的终端以使用 Starship - 在 `~/.config/fish/config.fish` 的最后,添加以下内容: +配置你的终端来初始化 starship。 请从下面列表选择你的终端: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +在 `~/.bashhrc` 的最后,添加以下内容: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- 在 `~/.zshrc` 的最后,添加以下内容: +
+Cmd - ```sh - # ~/.zshrc +您需要使用 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) 与 Cmd. 在路径 `%LocalAppData%\clink\starship.lua` 下创建文件,输入以下内容 - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - 将以下内容添加到 `Microsoft.PowerShell_profile.ps1`。 你可以在 PowerShell 通过 `$PROFILE` 变量来查询文件的位置。 对于 -Nix 来说,通常文件路径是 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。 +在 `~/.config/fish/rc.elv` 的最后,添加以下内容: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- 在 `~/.config/ion/initrc` 的最后,添加以下内容: +
+Fish - ```sh - # ~/.config/ion/initrc +在 `~/.config/fish/config.fish` 的最后,添加以下内容: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **警告** 只支持 elvish v0.17 及以上。 在 `~/.config/fish/rc.elv` 的最后,添加以下内容: +在 `~/.config/ion/initrc` 的最后,添加以下内容: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - 在 `~/.bashhrc` 的最后,添加以下内容: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - 在 `~/.bashhrc` 的最后,添加以下内容: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +在 `~/.bashhrc` 的最后,添加以下内容: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- 您需要使用 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) 与 Cmd. 将以下文件添加到文件 `starship.lua` 中,并将此文件放置在 Clink脚本目录中: +
+Xonsh - ```lua - -- starship.lua +在 `~/.bashhrc` 的最后,添加以下内容: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **警告** 将来可能会改变。 仅支持 nu 版本 v0.33 或更高版本。 在您的 nu config 中添加以下内容: 您可以用 nu 运行 `config path` 来检查此 文件的位置。 +在 `~/.zshrc` 的最后,添加以下内容: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### 步骤 3. 配置 StarShip + +打开一个新的 Shell 实例,你应该就能看到漂亮的 Shell 新提示符了。 如果你对默认配置感到满意,就可以开始享用了! + +如果你想进一步配置 Starship,查阅下列内容: + +- **[配置](https://starship.rs/config/)**:学习如何配置 Starship 来调节提示符到你喜欢的样子。 + +- **[预设](https://starship.rs/presets/)**:从其他构建好的配置中获取灵感。 ## 🤝 贡献 -我们一直在寻找贡献者!**不论你的技能如何**你都可以参与贡献 。 如果您希望快速为项目作出贡献,请尝试解决 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)。 +我们期待着 **所有技能等级** 的参与者! 如果你想让自己参与项目的路径轻松一些,可以先试试某个 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)。 -如果你能流利地使用非英语语种,我们非常感谢你帮助翻译我们的文件并将其更新到其他语言。 如果您想要帮助,可以在 [Starship Crowdin](https://translate.starship.rs/) 上贡献翻译。 +如果你熟练掌握某个非英语语言,我们非常感谢任何帮助翻译与同步文档到其他语言的贡献。 如果你想要帮忙,可以在 [Starship Crowdin](https://translate.starship.rs/) 上参与。 -如果您有兴趣贡献于 Starship,请查看我们的[贡献指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)。 另外,你可以自由加入我们的 [Discord 服务器](https://discord.gg/8Jzqu3T) 。 👋 +如果你有兴趣贡献 Starship 这个项目,请先看看我们的 [贡献指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)。 也欢迎加入我们的 [Discord 服务器](https://discord.gg/8Jzqu3T) 和大家打个招呼。 👋 ## 💭该项目受以下项目启发 -请参考这些曾经为 Starship 提供启发的工程。 🙏 +请看看这些之前的工作,他们启发了 Starship 项目的创造。 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/zh-CN/migrating-to-0.45.0/README.md b/docs/zh-CN/migrating-to-0.45.0/README.md index 06c138d1..f7296e02 100644 --- a/docs/zh-CN/migrating-to-0.45.0/README.md +++ b/docs/zh-CN/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur 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. +_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. #### Command Duration diff --git a/docs/zh-CN/presets/README.md b/docs/zh-CN/presets/README.md index 2b63d964..e577bf2b 100644 --- a/docs/zh-CN/presets/README.md +++ b/docs/zh-CN/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]' diff --git a/docs/zh-TW/README.md b/docs/zh-TW/README.md index 8999fba0..5162a9e0 100644 --- a/docs/zh-TW/README.md +++ b/docs/zh-TW/README.md @@ -119,7 +119,7 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化 #### Elvish - ::: warning Only elvish v0.17 or higher is supported. ::: + ::: warning 只有 elvish v0.17 或以上版本才有支援 ::: 將以下內容放到 `~/.elvish/rc.elv` 的結尾: @@ -147,9 +147,9 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化 ```toml startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", ] prompt = "starship_prompt" ``` diff --git a/docs/zh-TW/advanced-config/README.md b/docs/zh-TW/advanced-config/README.md index c1e93f47..fc63a3c2 100644 --- a/docs/zh-TW/advanced-config/README.md +++ b/docs/zh-TW/advanced-config/README.md @@ -32,11 +32,11 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## Custom pre-prompt and pre-execution Commands in Bash +## Bash 中的自定義預提示 (pre-prompt) 與預執行 (pre-execution) 指令 -Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. 然而,Starship 有提供給你有限的能力來插入你自己的函式到渲染提示字元的程序中: +Bash 不像其他大多的 shell 具有正式的預執行/預指令框架。 因為這個原因,很難在 `bash` 中提供能完全自定義的 hook。 然而,Starship 有提供給你有限的能力來插入你自己的函式到渲染提示字元的程序中: -- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do +- 為了在畫出提示字元之前執行一個自定義的函式,請定義一個函式,並將它的名稱放入 `starship_precmd_user_func` 之中。 例如,為了要在提示字元前畫出一個火箭,你就要 ```bash function blastoff(){ @@ -45,14 +45,16 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). 然而,你**必須**在初始化 Starship _之前_ 對 DEBUG 訊號設下trap! Starship 可以保留 DEBUG trap 的數值,但是如果該 trap 在 starship 啟動後被被覆寫,某些功能會損壞。 ```bash function blastoff(){ echo "🚀" } trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace eval $(starship init bash) +set +o functrace ``` ## Custom pre-prompt and pre-execution Commands in PowerShell @@ -67,33 +69,33 @@ function Invoke-Starship-PreCommand { } ``` -## Change Window Title +## 改變視窗標題 -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish 甚至預設就會這樣做。 Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. -First, define a window title change function (identical in bash and zsh): +首先,定義一個改變視窗標題的函式(在 bash 與 zsh 之中都一樣): ```bash function set_win_title(){ - echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" + echo -ne "\033]0; 你的標題在此 \007" } ``` -You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). +你可以利用變數來自定義這個標題(`$USER`、`$HOSTNAME` 與 `$PWD` 是很受歡迎的選項)。 -In `bash`, set this function to be the precmd starship function: +在 `bash` 中,將這個函式設定為 Starship 的預執行函式: ```bash starship_precmd_user_func="set_win_title" ``` -In `zsh`, add this to the `precmd_functions` array: +在 `zsh` 中,將這個函式加入 `precmd_functions` 陣列: ```bash precmd_functions+=(set_win_title) ``` -If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. +如果你喜歡這個結果,把這幾行加入你的 shell 設定檔中(`~/.bashrc` or `~/.zsrhc`)來將此設為永久設定。 For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: @@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab Note: Continuation prompts are only available in the following shells: - - `bash` - - `zsh` - - `PowerShell` +- `bash` +- `zsh` +- `PowerShell` ### 範例 @@ -176,26 +178,26 @@ continuation_prompt = "▶▶" ## 風格字串 -Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: +風格字串是一個以空白分開的單詞清單。 單字並不會區分大小寫(換句話說,`bold` 與 `BoLd` 是被當作兩個相同的字串)。 每個單詞可以是下列其中之一: - - `bold` - - `italic` - - `underline` - - `dimmed` - - `inverted` - - `bg:` - - `fg:` - - `` - - `none` +- `bold` +- `斜體字` +- `underline` +- `dimmed` +- `inverted` +- `bg:` +- `fg:` +- `` +- `none` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +其中 `` 是指定顏色用的(下面解釋)。 `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. 單詞在字串中的順序不重要。 -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. 未來可能會將 `none` 與其他符號一起使用的情形視為是一種錯誤。 -A color specifier can be one of the following: +一個顏色指定符號可以是下列其中之一: - - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- 一個 `#` 後面跟隨著六位數的十六進位數字。 這個指定了 [RGB 十六進制色碼](https://www.w3schools.com/colors/colors_hexadecimal.asp)。 +- 一個介於 0~255 之間的數字。 這個指定了 [8-bit ANSI 色碼](https://i.stack.imgur.com/KTSQa.png)。 -If multiple colors are specified for foreground/background, the last one in the string will take priority. +如果前景/後景被指定了多種顏色,最後一個顏色具有最高優先性。 diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index c7155205..54e021e5 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -13,8 +13,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml add_newline = true # Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" # Disable the package module, hiding it from the prompt completely [package] @@ -61,9 +61,9 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ### 術語 -**Module**: A component in the prompt giving information based on contextual information from your OS. 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. @@ -97,7 +97,7 @@ For example: #### 風格字串 -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +Starship 內大多數的模組允許你設定他們的顯示風格。 這要透過一個條目 (通常叫做 `style`),這個條目使用一個字串來進行設定。 這裡給幾個風格字串的例子,以及這些字串的功用。 對於完整語法的詳細說明,請參照 [進階設定指南](/advanced-config/)。 - `"fg:green bg:blue"` 在一個藍色背景上設定綠色文字 - `"bg:blue fg:bright-green"` 在一個藍色背景上設定亮綠色文字 @@ -106,7 +106,7 @@ Most modules in starship allow you to configure their display styles. This is do - `"bold italic fg:purple"` 設定粗體、斜體且紫色的文字 - `""` 明確地關閉所有風格 -Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. +注意風格產出的樣子取決於你的終端機模擬器。 例如,有些終端機模擬器會提升顏色的亮度而不是讓文字變粗體,而且有些色彩主題對一般與加亮顏色使用的是相同色碼。 除此之外,為了要有斜體字,你的終端機一定要支援斜體。 #### Conditional Format Strings @@ -143,7 +143,7 @@ format = ''' ## 提示字元 -This is the list of prompt-wide configuration options. +以下是針對提示字元內容的設定。 ### 選項 @@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options. | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | - ### 範例 ```toml @@ -176,7 +175,7 @@ add_newline = false ### Default Prompt Format -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: +The default `format` is used to define the format of the prompt, if empty or no `format` is provided. 預設如下: ```toml format = "$all" @@ -185,6 +184,7 @@ format = "$all" format = """ $username\ $hostname\ +$localip\ $shlvl\ $singularity\ $kubernetes\ @@ -200,6 +200,7 @@ $docker_context\ $package\ $cmake\ $cobol\ +$container\ $dart\ $deno\ $dotnet\ @@ -255,12 +256,12 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format="$all$directory$character" +format = "$all$directory$character" ``` ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +`aws` 模組顯示現在 AWS 的區域與概況。 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。 This module also shows an expiration timer when using temporary credentials. 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. @@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | 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 +*: This variable can only be used as a part of a style string ### Examples @@ -359,7 +360,7 @@ style = "blue bold" ## 電池 -The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. +`battery` 模組顯示電池的電量以及現在的充電狀態。 這個模組只會在裝置的電量低於 10% 的時候看見。 ### 選項 @@ -387,7 +388,7 @@ discharging_symbol = "💀 " ### 電池顯示 -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果沒有提供 `display`。 預設如下: ```toml [[battery.display]] @@ -399,7 +400,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### 選項 -The `display` option is an array of the following table. +`display` 選項是一個下列表格的陣列。 | Option | 預設 | 說明 | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- | @@ -411,24 +412,23 @@ The `display` option is an array of the following table. #### 範例 ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed - ``` ## 字元 -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 (`❯`/`✖`) @@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 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 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,37 +552,32 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 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 +*: This variable can only be used as a part of a style string ## 指令持續時間 -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` | 顯示時間除了以秒為單位外,亦以毫秒顯示 | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | 這個模組的風格。 | -| `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). | - -::: tip - -Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. - -::: +| Option | 預設 | 說明 | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | 顯示時間除了以秒為單位外,亦以毫秒顯示 | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | 這個模組的風格。 | +| `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. | ### Variables @@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 範例 @@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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 +*: This variable can only be used as a part of a style string ### 範例 @@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c format = "[$symbol$environment](dimmed green) " ``` +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### 選項 + +| Option | 預設 | 說明 | +| ---------- | ------------------------------------ | ----------------------------------------- | +| `symbol` | `"⬢"` | The symbol shown, when inside a container | +| `style` | `"bold red dimmed"` | 這個模組的風格。 | +| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| 變數 | 範例 | 說明 | +| --------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| 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 + +[container] +format = "[$symbol \\[$name\\]]($style) " +``` + ## Crystal 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: @@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 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 +*: This variable can only be used as a part of a style string ### 範例 @@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 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 +*: This variable can only be used as a part of a style string ### 範例 @@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file ### 選項 @@ -759,11 +787,11 @@ 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`。 ### 選項 @@ -782,7 +810,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |

-This module has a few advanced configuration options that control how the directory is displayed. +這個模組有些進階設定選項可以控制顯示資料夾。 | Advanced Option | 預設 | 說明 | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 範例 @@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | 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 +*: This variable can only be used as a part of a style string ### 範例 @@ -859,7 +887,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: @@ -874,7 +902,7 @@ 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 () when there is a csproj file in the current directory. @@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker ( [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `disabled` | `true` | Disables the `status` module. | @@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### 範例 ```toml - # ~/.config/starship.toml [status] @@ -2845,7 +2905,6 @@ symbol = "🔴" format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false - ``` ## Sudo @@ -2854,7 +2913,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 ::: @@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +*: This variable can only be used as a part of a style string ### 範例 ```toml - # ~/.config/starship.toml [sudo] @@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | 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 +*: This variable can only be used as a part of a style string ### 範例 @@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met: | 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 +*: This variable can only be used as a part of a style string ### 範例 @@ -2998,11 +3056,11 @@ format = "[🏎💨 $workspace]($style) " ## 時間 -The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. +`time` 模組顯示目前的**當地**時間. `format` 設定值被 [`chrono`](https://crates.io/crates/chrono) crate 用來控制時間如何顯示。 請看 [chrono 的 strftime 文件](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)來了解有那些選項可以使用。 ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 ::: @@ -3018,7 +3076,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `disabled` | `true` | 停用 `time` 模組。 | | `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 不然的話,它會被預設為 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting. ### Variables @@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | 時間 | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 範例 @@ -3044,7 +3102,7 @@ time_range = "10:00:00-14:00:00" ## 使用者名稱 -The `username` module shows active user's username. 這個模組在下列其中一個條件達成時顯示: +`username` 模組顯示現在使用中的使用者名稱。 這個模組在下列其中一個條件達成時顯示: - 目前使用者為 root - 目前使用者並非登入時的使用者 @@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 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 +*: This variable can only be used as a part of a style string ### 範例 @@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) " ## V The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file @@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Mirrors the value of option `symbol` | | style\* | `black bold dimmed` | Mirrors the value of option `style` | -\*: This variable can only be used as a part of a style string +*: This variable can only be used as a part of a style string ### 範例 @@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | 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 +*: This variable can only be used as a part of a style string ### 範例 @@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 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 +*: This variable can only be used as a part of a style string #### Custom command shell @@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters but wildcards are not supported +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -extensions = ["pst"] # filters *.pst files +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/zh-TW/faq/README.md b/docs/zh-TW/faq/README.md index c423d39b..d5bd586a 100644 --- a/docs/zh-TW/faq/README.md +++ b/docs/zh-TW/faq/README.md @@ -58,7 +58,7 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux ## Why do I see `Executing command "..." timed out.` warnings? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. ## 我發現一些看不懂或意料外的符號,那是代表什麼意思? diff --git a/docs/zh-TW/guide/README.md b/docs/zh-TW/guide/README.md index 9ebea104..e0e07647 100644 --- a/docs/zh-TW/guide/README.md +++ b/docs/zh-TW/guide/README.md @@ -169,159 +169,227 @@ - 安裝至少一個 [Nerd Font](https://www.nerdfonts.com/) 字體,並在終端中啟用(例如,你可以試試 [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads))。 -### 入門 +### Step 1. Install Starship -**備註:**由於不同平台的數量眾多,下方僅顯示部分已支持平台。 找不到你正在使用的平台? 我想你可以來[額外平台說明](https://starship.rs/installing/)看看。 +Select your operating system from the list below to view installation instructions: -1. 安裝 **starship** 執行檔: +
+Android +Install Starship using any of the following package managers: - #### 安裝最新版本 +| Repository | Instructions | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | +
- ##### 從預構建的二進制包,並且使用 Shell 命令: +
+BSD - ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - ``` +Install Starship using any of the following package managers: - 如果想更新已安裝的 Starship,請重新執行上述指令。 指令只會更新 Starship 執行檔本身,不會影響到任何已撰寫的設定檔。 +| Distribution | Repository | Instructions | +| ------------ | -------------------------------------------------------- | --------------------------------- | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | - **備註** —— 安裝腳本的預設值可以被覆蓋,請使用以下指令查看內置說明。 +
- ```sh - sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help - ``` +
+Linux +Install the latest version for your system: - #### 使用套件管理器安裝: +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` +Alternatively, install Starship using any of the following package managers: - ##### 使用 [Homebrew](https://brew.sh/): +| Distribution | Repository | Instructions | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | - ```sh - brew install starship - ``` +
+
+macOS - ##### 使用 [Scoop](https://scoop.sh): +Install the latest version for your system: - ```powershell - scoop install starship - ``` +```sh +sh -c "$(curl -fsSL https://starship.rs/install.sh)" +``` -2. 將初始化腳本 (script) 加入你的 shell 的設定檔: +Alternatively, install Starship using any of the following package managers: +| Repository | Instructions | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | - #### Bash +
- 將以下內容放到 `~/.bashrc` 的結尾: +
+Windows - ```sh - # ~/.bashrc +Install Starship using any of the following package managers: - eval "$(starship init bash)" - ``` +| Repository | Instructions | +| -------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +
- #### Fish +### Step 2. Setup your shell to use Starship - 將以下內容放到 `~/.config/fish/config.fish` 的結尾: +Configure your shell to initialize starship. Select yours from the list below: - ```sh - # ~/.config/fish/config.fish +
+Bash - starship init fish | source - ``` +將以下內容放到 `~/.bashrc` 的結尾: +```sh +eval "$(starship init bash)" +``` - #### Zsh +
- 將以下內容放到 `~/.zshrc` 的結尾: +
+Cmd - ```sh - # ~/.zshrc +You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: - eval "$(starship init zsh)" - ``` +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` +
- #### PowerShell +
+Elvish - 將以下內容放到 `Microsoft.PowerShell_profile.ps1` 的結尾。 你可以藉由在 PowerShell 查詢 `$PROFILE` 變數以取得這個檔案的位置。 一般來說,檔案會出現在 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1`,若是在 -Nix 上,檔案則會出現在 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。 +將以下內容放到 `~/.elvish/rc.elv` 的結尾: - ```powershell - Invoke-Expression (&starship init powershell) - ``` +```sh +eval (starship init elvish) +``` +Note: Only Elvish v0.17+ is supported - #### Ion +
- 將以下內容放到 `~/.config/ion/initrc` 的結尾: +
+Fish - ```sh - # ~/.config/ion/initrc +將以下內容放到 `~/.config/fish/config.fish` 的結尾: - eval $(starship init ion) - ``` +```fish +starship init fish | source +``` +
- #### Elvish +
+Ion - **Warning** Only elvish v0.17 or higher is supported. 將以下內容放到 `~/.elvish/rc.elv` 的結尾: +將以下內容放到 `~/.config/ion/initrc` 的結尾: - ```sh - # ~/.elvish/rc.elv +```sh +eval $(starship init ion) +``` - eval (starship init elvish) - ``` +
+
+Nushell - #### Tcsh +Add the following to the end of your Nushell configuration (find it by running `config path`): - 將以下內容放到 `~/.tcshrc` 的結尾: +```toml +startup = [ + "mkdir ~/.cache/starship", + "starship init nu | save ~/.cache/starship/init.nu", + "source ~/.cache/starship/init.nu", +] +prompt = "starship_prompt" +``` - ```sh - # ~/.tcshrc +
- eval `starship init tcsh` - ``` +
+PowerShell +Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): - #### Xonsh +```powershell +Invoke-Expression (&starship init powershell) +``` - 將以下內容加到 `~/.xonshrc` 的結尾: +
- ```sh - # ~/.xonshrc +
+Tcsh - execx($(starship init xonsh)) - ``` +將以下內容放到 `~/.tcshrc` 的結尾: +```sh +eval `starship init tcsh` +``` - #### Cmd +
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: +
+Xonsh - ```lua - -- starship.lua +將以下內容放到 `~/.xonshrc` 的結尾: - load(io.popen('starship init cmd'):read("*a"))() - ``` +```python +execx($(starship init xonsh)) +``` +
- #### Nushell +
+Zsh - **Warning** This will change in the future. 只支援 nu v0.33 以上的版本。 Add the following to your nu config file. 你可以透過在 nu 執行 `config path` 指令來取得設定檔的位置。 +將以下內容放到 `~/.zshrc` 的結尾: - ```toml - startup = [ - "mkdir ~/.cache/starship", - "starship init nu | save ~/.cache/starship/init.nu", - "source ~/.cache/starship/init.nu" - ] - prompt = "starship_prompt" - ``` +```sh +eval "$(starship init zsh)" +``` + +
+ +### Step 3. Configure Starship + +Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! + +If you're looking to further customize Starship: + +- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking + +- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others ## 🤝 貢獻 @@ -335,11 +403,11 @@ 請看之前這些幫助我們創造 Starship 的前任作品。 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 給太空人的 ZSH 提示。 +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - 使用 Javascript 撰寫的跨 shell robbyrussell 主題。 +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - 一個跨 shell、可客製化、像 powerline 的圖案提示字元。 +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.


diff --git a/docs/zh-TW/migrating-to-0.45.0/README.md b/docs/zh-TW/migrating-to-0.45.0/README.md index 7f3c04d6..639fbcf8 100644 --- a/docs/zh-TW/migrating-to-0.45.0/README.md +++ b/docs/zh-TW/migrating-to-0.45.0/README.md @@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur 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. +_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. #### 指令持續時間 diff --git a/docs/zh-TW/presets/README.md b/docs/zh-TW/presets/README.md index 083f222a..f7fcd1c6 100644 --- a/docs/zh-TW/presets/README.md +++ b/docs/zh-TW/presets/README.md @@ -60,6 +60,9 @@ symbol = " " [nix_shell] symbol = " " +[nodejs] +symbol = " " + [package] symbol = " " @@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' format = '\[[$symbol($version)]($style)\]' [cmd_duration] -format = '\[[⏱ $duration ]($style)\]' +format = '\[[⏱ $duration]($style)\]' [cobol] format = '\[[$symbol($version)]($style)\]'