docs(i18n): new Crowdin updates (#3460)

This commit is contained in:
Matan Kushner 2022-02-07 15:53:55 +01:00 committed by GitHub
parent db86a93824
commit 1d965a9d24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
128 changed files with 7869 additions and 5504 deletions

View File

@ -119,7 +119,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Elvish #### Elvish
::: warning Only elvish v0.17 or higher is supported. ::: ::: تحذير يدعم فقط elvish v0.17 أو أعلى. :::
أضف ما يلي إلى نهاية `~/.elvish/rc.elv`: أضف ما يلي إلى نهاية `~/.elvish/rc.elv`:
@ -147,9 +147,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```toml ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```

View File

@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) eval $(starship init bash)
set +o functrace
``` ```
## Custom pre-prompt and pre-execution Commands in PowerShell ## 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `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: 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`
- `italic` - `italic`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `inverted`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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. where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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: 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`). - 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 `#` 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). - 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. If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la
add_newline = true add_newline = true
# Replace the "" symbol in the prompt with "➜" # Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character" [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" 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 # Disable the package module, hiding it from the prompt completely
[package] [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 `_`. 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`. - `$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`. - `$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. 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. - `[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. - `[⌘ $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. 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. - `(@$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. - `(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). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. | | `add_newline` | `true` | Inserts blank line between shell prompts. |
### مثال ### مثال
```toml ```toml
@ -185,6 +184,7 @@ format = "$all"
format = """ format = """
$username\ $username\
$hostname\ $hostname\
$localip\
$shlvl\ $shlvl\
$singularity\ $singularity\
$kubernetes\ $kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\ $package\
$cmake\ $cmake\
$cobol\ $cobol\
$container\
$dart\ $dart\
$deno\ $deno\
$dotnet\ $dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml ```toml
# Move the directory to the second line # Move the directory to the second line
format="$all$directory$character" format = "$all$directory$character"
``` ```
## AWS ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### مثال #### مثال
```toml ```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 threshold = 10
style = "bold red" 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 threshold = 30
style = "bold yellow" style = "bold yellow"
discharging_symbol = "💦" discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed # when capacity is over 30%, the battery indicator will not be displayed
``` ```
## Character ## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options ### Options
| Option | الافتراضي | الوصف | | Option | الافتراضي | الوصف |
| -------------------- | ----------------------------- | ---------------------------------------------------------- | | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | | `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | | `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. | | `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. | | `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. | | `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. | | `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | | `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. |
::: 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`.
:::
### Variables ### 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 | | duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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) " 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 ## 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: 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## 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 `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 - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options ### 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 | | path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1002,16 +1030,17 @@ The `env_var` module displays the current value of a selected environment variab
- The `variable` configuration option matches an existing environment variable - The `variable` configuration option matches an existing environment variable
- The `variable` configuration option is not defined, but the `default` configuration option is - The `variable` configuration option is not defined, but the `default` configuration option is
::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character. ::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character.
Example: following configuration will display value of USER environment variable Example: following configuration will display value of USER environment variable
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[env_var.USER] [env_var.USER]
default = "unknown user" default = "unknown user"
``` ```
::: :::
### Options ### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1045,6 +1074,7 @@ default = "unknown shell"
``` ```
Displaying multiple environmental variables: Displaying multiple environmental variables:
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
@ -1083,7 +1113,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
format="AA $fill BB $fill CC" format = "AA $fill BB $fill CC"
[fill] [fill]
symbol = "-" symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
``` ```
AA -------------------------------------------- BB -------------------------------------------- CC AA -------------------------------------------- BB -------------------------------------------- CC
``` ```
## Google Cloud (`gcloud`) ## Google Cloud (`gcloud`)
@ -1150,7 +1179,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -1212,7 +1241,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1248,7 +1277,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
| hash | `b703eb3` | The current git commit hash | | hash | `b703eb3` | The current git commit hash |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1288,7 +1317,7 @@ The `git_state` module will show in directories which are part of a git reposito
| progress_total | `2` | The total operation progress | | progress_total | `2` | The total operation progress |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1329,7 +1358,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| added_style\* | | Mirrors the value of option `added_style` | | added_style\* | | Mirrors the value of option `added_style` |
| deleted_style\* | | Mirrors the value of option `deleted_style` | | deleted_style\* | | Mirrors the value of option `deleted_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
### مثال ### مثال
@ -1382,7 +1411,7 @@ The following variables can be used in `format`:
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
| style\* | Mirrors the value of option `style` | | 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 following variables can be used in `diverged`: The following variables can be used in `diverged`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰" behind = "😰"
diverged = "😵" diverged = "😵"
up_to_date = "✓" up_to_date = "✓"
untracked = "🤷" untracked = "🤷"
stashed = "📦" stashed = "📦"
modified = "📝" modified = "📝"
staged = '[++\($count\)](green)' staged = '[++\($count\)](green)'
@ -1461,7 +1490,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1500,7 +1529,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer | | hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname] [hostname]
ssh_only = false ssh_only = false
format = "on [$hostname](bold red) " format = "on [$hostname](bold red) "
trim_at = ".companyname.com" trim_at = ".companyname.com"
disabled = false disabled = false
``` ```
@ -1574,7 +1603,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## Jobs ## Jobs
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running. The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is: The default functionality is:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| Option | الافتراضي | الوصف | | Option | الافتراضي | الوصف |
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | | ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
| `threshold`\* | `1` | Show number of jobs if exceeded. | | `threshold`* | `1` | Show number of jobs if exceeded. |
| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. |
| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | | `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. |
| `format` | `"[$symbol$number]($style) "` | The format for the module. | | `format` | `"[$symbol$number]($style) "` | The format for the module. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | | `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the module. | | `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | Disables the `jobs` module. |
\*: This option is deprecated, please use the
`number_threshold` and `symbol_threshold` options instead. *: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead.
### Variables ### Variables
@ -1630,7 +1658,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ " symbol = "∴ "
``` ```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### Options
| Option | الافتراضي | الوصف |
| ---------- | ------------------------- | ------------------------------------------------------ |
| `ssh_only` | `true` | Only show IP address when connected to an SSH session. |
| `format` | `"[$localipv4]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `true` | Disables the `localip` module. |
### Variables
| Variable | مثال | الوصف |
| --------- | ------------ | ----------------------------------- |
| localipv4 | 192.168.1.13 | Contains the primary IPv4 address |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### مثال
```toml
# ~/.config/starship.toml
[localip]
ssh_only = false
format = "@[$localipv4](bold red) "
disabled = false
```
## Kotlin ## Kotlin
The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met:
@ -1711,7 +1772,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1759,7 +1820,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1845,7 +1906,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1889,7 +1950,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | `🐏` | Mirrors the value of option `symbol` | | symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | style\* | | Mirrors the value of option `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
### مثال ### مثال
@ -1926,7 +1987,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -1969,7 +2030,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2005,7 +2066,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2036,7 +2097,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string representing the symbol of Node.js. | | `symbol` | `" "` | A format string representing the symbol of Node.js. |
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
@ -2052,7 +2113,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2187,7 +2248,7 @@ The `package` module is shown when the current directory is the repository for a
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2267,7 +2328,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi ## 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 ::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options ### Options
| Option | الافتراضي | الوصف | | Option | الافتراضي | الوصف |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | | `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. | | `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. | | `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. | | `disabled` | `false` | Disables the `pulumi` module. |
### Variables ### Variables
@ -2309,10 +2370,11 @@ By default the module will be shown if any of the following conditions are met:
| --------- | ---------- | ------------------------------------ | | --------- | ---------- | ------------------------------------ |
| version | `v0.12.24` | The version of `pulumi` | | version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack | | stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi] [pulumi]
symbol = "🛥 " symbol = "🛥 "
format = "[$symbol$stack]($style) " format = "[$symbol$stack]($style) "
``` ```
## PureScript ## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2702,7 +2763,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| indicator | | Mirrors the value of `indicator` for currently used shell. | | indicator | | Mirrors the value of `indicator` for currently used shell. |
| style\* | | Mirrors the value of option `style`. | | 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 ### Examples
@ -2740,7 +2801,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### مثال ### مثال
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status ## 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`. The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer.
::: tip ::: tip
@ -2812,7 +2873,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting | | `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes | | `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `pipestatus_format` | `\\[$pipestatus\\] => [$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. | | `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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[status] [status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true map_symbol = true
disabled = false disabled = false
``` ```
## Sudo ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[sudo] [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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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. | | time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## 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 `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 file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file - 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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` | | symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` | | 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 #### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml # ~/.config/starship.toml
[custom.foo] [custom.foo]
command = "echo foo" # shows output of command command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """ when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)" format = " transcending [$output]($style)"
[custom.time] [custom.time]
command = "time /T" command = "time /T"
extensions = ["pst"] # filters *.pst files extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
``` ```

View File

@ -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? ## 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? ## I see symbols I don't understand or expect, what do they mean?

View File

@ -169,159 +169,227 @@
- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك (على سبيل المثال، جرب [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). - تثبيت [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**: <details>
<summary>Android</summary>
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` |
</details>
##### From prebuilt binary, with Shell: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
لتحديث 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` |
**ملاحظة** - يمكن تجاوز الإعدادات الافتراضية لنص التثبيت لرؤية المساعدة المدمجة. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### بإستخدام [Scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
أضف ما يلي إلى نهاية `~/.bashrc`: <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source أضف ما يلي إلى نهاية `~/.bashrc`:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
أضف ما يلي إلى نهاية `~/.zshrc`: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
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 ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
أضف ما يلي إلى نهاية `~/.config/ion/initrc`: <details>
<summary>Fish</summary>
```sh أضف ما يلي إلى نهاية `~/.config/fish/config.fish`:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**Warning** Only elvish v0.17 or higher is supported. أضف ما يلي إلى نهاية `~/.elvish/rc.elv`: أضف ما يلي إلى نهاية `~/.config/ion/initrc`:
```sh ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
#### Xonsh ```powershell
Invoke-Expression (&starship init powershell)
```
أضف ما يلي إلى نهاية `~/.xonshrc`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) أضف ما يلي إلى نهاية `~/.tcshrc`:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua أضف ما يلي إلى نهاية `~/.xonshrc`:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**Warning** This will change in the future. فقط إصدار nu v0.33 أو أعلى مدعوم. Add the following to your nu config file. يمكنك التحقق من موقع هذا الملف عن طريق تشغيل `config path` في nu. أضف ما يلي إلى نهاية `~/.zshrc`:
```toml ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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. 🙏 يرجى التحقق من هذه الأعمال السابقة التي ساعدت على إنشاء 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.
<p align="center"> <p align="center">
<br> <br>

View File

@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
error_symbol = "[✖](bold red)" error_symbol = "[✖](bold red)"
``` ```
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. _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 #### Command Duration

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -119,7 +119,7 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
#### Elvish #### Elvish
::: warning Only elvish v0.17 or higher is supported. ::: ::: ئاگادارکردنەوە تەنها elvish v0.17 یان بەرزتر پشتگیری کراوە. :::
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`: ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`:
@ -147,9 +147,9 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
```toml ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```

View File

@ -32,9 +32,9 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 - 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" 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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) eval $(starship init bash)
set +o functrace
``` ```
## Custom pre-prompt and pre-execution Commands in PowerShell ## 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `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: 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:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `هیچ`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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. کە `<color>` دیاریکەری ڕەنگێکە (لە ژێرەوە باسکراوە). `fg:<color>` و `<color>` لە ئێستادا هەمان شت ئەکەن، بەڵام ئەمە ڕەنگە لە داهاتووا بگۆڕێت. `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. 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: 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`). - 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 `#` 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). - 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. If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
add_newline = true add_newline = true
# Replace the "" symbol in the prompt with "➜" # Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character" [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" 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 # Disable the package module, hiding it from the prompt completely
[package] [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 `_`. 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`. - `$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`. - `$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. 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. - `[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. - `[⌘ $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. 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. - `(@$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. - `(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). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. | | `add_newline` | `true` | Inserts blank line between shell prompts. |
### نموونە ### نموونە
```toml ```toml
@ -185,6 +184,7 @@ format = "$all"
format = """ format = """
$username\ $username\
$hostname\ $hostname\
$localip\
$shlvl\ $shlvl\
$singularity\ $singularity\
$kubernetes\ $kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\ $package\
$cmake\ $cmake\
$cobol\ $cobol\
$container\
$dart\ $dart\
$deno\ $deno\
$dotnet\ $dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml ```toml
# Move the directory to the second line # Move the directory to the second line
format="$all$directory$character" format = "$all$directory$character"
``` ```
## AWS ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### نموونە #### نموونە
```toml ```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 threshold = 10
style = "bold red" 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 threshold = 30
style = "bold yellow" style = "bold yellow"
discharging_symbol = "💦" discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed # when capacity is over 30%, the battery indicator will not be displayed
``` ```
## Character ## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| -------------------- | ----------------------------- | ---------------------------------------------------------- | | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | | `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | | `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. | | `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. | | `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. | | `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. | | `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | | `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. |
::: 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`.
:::
### Variables ### 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 | | duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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) " 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 ## 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: 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## 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 `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 - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options ### 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 | | path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1002,16 +1030,17 @@ The `env_var` module displays the current value of a selected environment variab
- The `variable` configuration option matches an existing environment variable - The `variable` configuration option matches an existing environment variable
- The `variable` configuration option is not defined, but the `default` configuration option is - The `variable` configuration option is not defined, but the `default` configuration option is
::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character. ::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character.
Example: following configuration will display value of USER environment variable Example: following configuration will display value of USER environment variable
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[env_var.USER] [env_var.USER]
default = "unknown user" default = "unknown user"
``` ```
::: :::
### Options ### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1045,6 +1074,7 @@ default = "unknown shell"
``` ```
Displaying multiple environmental variables: Displaying multiple environmental variables:
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
@ -1083,7 +1113,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
format="AA $fill BB $fill CC" format = "AA $fill BB $fill CC"
[fill] [fill]
symbol = "-" symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
``` ```
AA -------------------------------------------- BB -------------------------------------------- CC AA -------------------------------------------- BB -------------------------------------------- CC
``` ```
## Google Cloud (`gcloud`) ## Google Cloud (`gcloud`)
@ -1150,7 +1179,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -1212,7 +1241,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1248,7 +1277,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
| hash | `b703eb3` | The current git commit hash | | hash | `b703eb3` | The current git commit hash |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1288,7 +1317,7 @@ The `git_state` module will show in directories which are part of a git reposito
| progress_total | `2` | The total operation progress | | progress_total | `2` | The total operation progress |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1329,7 +1358,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| added_style\* | | Mirrors the value of option `added_style` | | added_style\* | | Mirrors the value of option `added_style` |
| deleted_style\* | | Mirrors the value of option `deleted_style` | | deleted_style\* | | Mirrors the value of option `deleted_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
### نموونە ### نموونە
@ -1382,7 +1411,7 @@ The following variables can be used in `format`:
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
| style\* | Mirrors the value of option `style` | | 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 following variables can be used in `diverged`: The following variables can be used in `diverged`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰" behind = "😰"
diverged = "😵" diverged = "😵"
up_to_date = "✓" up_to_date = "✓"
untracked = "🤷" untracked = "🤷"
stashed = "📦" stashed = "📦"
modified = "📝" modified = "📝"
staged = '[++\($count\)](green)' staged = '[++\($count\)](green)'
@ -1461,7 +1490,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1500,7 +1529,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer | | hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname] [hostname]
ssh_only = false ssh_only = false
format = "on [$hostname](bold red) " format = "on [$hostname](bold red) "
trim_at = ".companyname.com" trim_at = ".companyname.com"
disabled = false disabled = false
``` ```
@ -1574,7 +1603,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## Jobs ## Jobs
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running. The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is: The default functionality is:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| Option | Default | Description | | Option | Default | Description |
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | | ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
| `threshold`\* | `1` | Show number of jobs if exceeded. | | `threshold`* | `1` | Show number of jobs if exceeded. |
| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. |
| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | | `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. |
| `format` | `"[$symbol$number]($style) "` | The format for the module. | | `format` | `"[$symbol$number]($style) "` | The format for the module. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | | `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the module. | | `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | Disables the `jobs` module. |
\*: This option is deprecated, please use the
`number_threshold` and `symbol_threshold` options instead. *: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead.
### Variables ### Variables
@ -1630,7 +1658,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ " symbol = "∴ "
``` ```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### Options
| Option | Default | Description |
| ---------- | ------------------------- | ------------------------------------------------------ |
| `ssh_only` | `true` | Only show IP address when connected to an SSH session. |
| `format` | `"[$localipv4]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `true` | Disables the `localip` module. |
### Variables
| گۆڕاو | نموونە | Description |
| --------- | ------------ | ----------------------------------- |
| localipv4 | 192.168.1.13 | Contains the primary IPv4 address |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### نموونە
```toml
# ~/.config/starship.toml
[localip]
ssh_only = false
format = "@[$localipv4](bold red) "
disabled = false
```
## Kotlin ## Kotlin
The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met:
@ -1711,7 +1772,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1759,7 +1820,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1845,7 +1906,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1889,7 +1950,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | `🐏` | Mirrors the value of option `symbol` | | symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | style\* | | Mirrors the value of option `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
### نموونە ### نموونە
@ -1926,7 +1987,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -1969,7 +2030,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2005,7 +2066,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2036,7 +2097,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string representing the symbol of Node.js. | | `symbol` | `" "` | A format string representing the symbol of Node.js. |
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
@ -2052,7 +2113,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2187,7 +2248,7 @@ The `package` module is shown when the current directory is the repository for a
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2267,7 +2328,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi ## 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 ::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | | `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. | | `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. | | `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. | | `disabled` | `false` | Disables the `pulumi` module. |
### Variables ### Variables
@ -2309,10 +2370,11 @@ By default the module will be shown if any of the following conditions are met:
| --------- | ---------- | ------------------------------------ | | --------- | ---------- | ------------------------------------ |
| version | `v0.12.24` | The version of `pulumi` | | version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack | | stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi] [pulumi]
symbol = "🛥 " symbol = "🛥 "
format = "[$symbol$stack]($style) " format = "[$symbol$stack]($style) "
``` ```
## PureScript ## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2702,7 +2763,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| indicator | | Mirrors the value of `indicator` for currently used shell. | | indicator | | Mirrors the value of `indicator` for currently used shell. |
| style\* | | Mirrors the value of option `style`. | | 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 ### Examples
@ -2740,7 +2801,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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
### نموونە ### نموونە
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status ## 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`. The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer.
::: tip ::: tip
@ -2812,7 +2873,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting | | `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes | | `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `pipestatus_format` | `\\[$pipestatus\\] => [$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. | | `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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[status] [status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true map_symbol = true
disabled = false disabled = false
``` ```
## Sudo ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[sudo] [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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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. | | time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## 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 `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 file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file - 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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` | | symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` | | 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 #### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml # ~/.config/starship.toml
[custom.foo] [custom.foo]
command = "echo foo" # shows output of command command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """ when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)" format = " transcending [$output]($style)"
[custom.time] [custom.time]
command = "time /T" command = "time /T"
extensions = ["pst"] # filters *.pst files extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
``` ```

View File

@ -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? ## 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? ## I see symbols I don't understand or expect, what do they mean?

View File

@ -99,7 +99,7 @@
><img ><img
height="20" height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
alt="Português do Brasil" alt="پورتوگالیی بەڕازیل"
/></a> /></a>
&nbsp; &nbsp;
<a <a
@ -165,159 +165,227 @@
- فۆنتێکی [Nerd](https://www.nerdfonts.com/) دامەزرابێ و چالاککرابێ لە تێرمیناڵەکەتدا (بۆ نموونە، [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads) تاقی بکەرەوە). - فۆنتێکی [Nerd](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** دابمەزرێنە: <details>
<summary>Android</summary>
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` |
</details>
##### لە باینەرییە پێشوەخت دروستکراوەکانەوە، لەگەڵ شێڵی: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
بۆ نوێکردنەوەی 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` |
**تێبینی** - بنەڕەتییەکانی سکریپتی دامەزراندن ئەتوانرێ بگۆڕدرێ سەیری یارمەتی نێوخۆیی بکە. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### لەگەڵ [Scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.bashrc`: <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.bashrc`:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.zshrc`: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
ئەمەی خوارەوە زیادبکە لە کۆتایی `Microsoft.PowerShell_profile.ps1`. ئەتوانی شوێنی ئەم فایلە ببینیتەوە بە سەیرکردنی گۆڕاوی `$PROFILE` لە PowerShell. ئاسایی ڕێڕەوەکە بریتیە لە `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` یان `/.config/powershell/Microsoft.PowerShell_profile.ps1` لەسەر -Nix. ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`:
```powershell ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/ion/initrc`: <details>
<summary>Fish</summary>
```sh ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/fish/config.fish`:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**Warning** Only elvish v0.17 or higher is supported. ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`: ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/ion/initrc`:
```sh ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
#### Xonsh ```powershell
Invoke-Expression (&starship init powershell)
```
ئەمەی دێت زیادبکە بۆ کۆتایی پەڕگەی `~/.xonshrc`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.tcshrc`:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua ئەمەی دێت زیادبکە بۆ کۆتایی پەڕگەی `~/.xonshrc`:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**Warning** This will change in the future. تەنها وەشانی v0.33 یان بەرزتری nu پشتگیریکراوە. Add the following to your nu config file. ئەتوانی شوێنی ئەم پەڕگەیە بپشکنی بە جێبەجێکردنی `config path` لە nu دا. ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.zshrc`:
```toml ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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 دا. 🙏 تکایە ئەم کارە کۆنانە سەیربکەوە کە ئیلهامی دروستکردنی 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.
<p align="center"> <p align="center">
<br> <br>

View File

@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
error_symbol = "[✖](bold red)" error_symbol = "[✖](bold red)"
``` ```
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. _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 #### Command Duration

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -119,7 +119,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
#### Elvish #### 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: 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 ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 ```bash
function blastoff(){ function blastoff(){
@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) eval $(starship init bash)
set +o functrace
``` ```
## Custom pre-prompt and pre-execution Commands in PowerShell ## 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 ```bash
function set_win_title(){ 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 ```bash
starship_precmd_user_func="set_win_title" 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 ```bash
precmd_functions+=(set_win_title) 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. 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 ```bash
function set_win_title(){ 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 ▶ 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` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `PowerShell`
### Beispiel ### Beispiel
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
# A continuation prompt that displays two filled in arrows # Ein Fortsetzungs-Prompt der 2 ausgefüllte Pfeile darstellt
continuation_prompt = "▶▶" continuation_prompt = "▶▶"
``` ```
## Style-Strings ## 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` - `bold`
- `italic` - `italic`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `invertiert`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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 `<color>` eine Farbspezifikation ist (siehe unten). `fg:<color>` und `<color>` 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`). - 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). - Eine `#` gefolgt von einer sechsstelligen Hexadezimalnummer. Dies ergibt einen [RGB hex Farbcode](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). - 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.

File diff suppressed because it is too large Load Diff

View File

@ -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? ## 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? ## I see symbols I don't understand or expect, what do they mean?

View File

@ -103,7 +103,7 @@
><img ><img
height="20" height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
alt="Português do Brasil" alt="Portugiesisch (Brasilien)"
/></a> /></a>
&nbsp; &nbsp;
<a <a
@ -111,7 +111,7 @@
><img ><img
height="20" height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
alt="Русский" alt="Russisch"
/></a> /></a>
&nbsp; &nbsp;
<a <a
@ -119,7 +119,7 @@
><img ><img
height="20" height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
alt="Tiếng Việt" alt="Vietnamesisch"
/></a> /></a>
&nbsp; &nbsp;
<a <a
@ -169,159 +169,227 @@
- Eine [Nerd Schriftart](https://www.nerdfonts.com/) installiert und im Terminal aktiviert (zum Beispiel [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). - Eine [Nerd Schriftart](https://www.nerdfonts.com/) installiert und im Terminal aktiviert (zum Beispiel [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
### Erste Schritte ### 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. Installiere **starship**: <details>
<summary>Android</summary>
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` |
</details>
##### Neuster GitHub Release über die Shell: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
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. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### Mit [scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
Trage folgendes am Ende der `~/.bashrc` ein: <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source Trage folgendes am Ende der `~/.bashrc` ein:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
Trage folgendes am Ende der `~/.zshrc` ein: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
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 ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
Trage folgendes am Ende der `~/.config/ion/initrc` ein: <details>
<summary>Fish</summary>
```sh Trage folgendes am Ende der `~/.config/fish/config.fish` ein:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**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 ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
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: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) Trage folgendes am Ende von `~/.bashrc` ein:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua Füge folgendes an das Ende von `~/.xonshrc` hinzu:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**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 ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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 ## 🤝 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/). 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 ## 💭 Inspiriert durch
Checkt bitte diese älteren Projekte, die das Entstehen von Starhip inspiriert haben. 🙏 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.
<p align="center"> <p align="center">
<br> <br>

View File

@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
error_symbol = "[✖](bold red)" error_symbol = "[✖](bold red)"
``` ```
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. _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 #### Befehlsdauer

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -119,7 +119,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
#### Elvish #### 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`: 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 ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 ```bash
function blastoff(){ function blastoff(){
@ -45,21 +45,23 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) 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 ```powershell
function Invoke-Starship-PreCommand { function Invoke-Starship-PreCommand {
@ -69,33 +71,33 @@ function Invoke-Starship-PreCommand {
## Cambiar título de la ventana ## 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 ```bash
function set_win_title(){ 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 ```bash
starship_precmd_user_func="set_win_title" 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 ```bash
precmd_functions+=(set_win_title) 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 ```bash
function set_win_title(){ function set_win_title(){
@ -114,7 +116,7 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 ```powershell
# edit $PROFILE # edit $PROFILE
@ -125,27 +127,27 @@ function Invoke-Starship-PreCommand {
Invoke-Expression (&starship init powershell) 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. `right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd.
### Ejemplo ### Ejemplo
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship. oml
# A minimal left prompt # Un prompt izquierdo mínimo
format = """$character""" format = """$character"""
# move the rest of the prompt to the right # mueve el resto del mensaje a la derecha
right_format = """$all""" 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 ▶ 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `PowerShell`
### Ejemplo ### Ejemplo
@ -176,26 +178,26 @@ continuation_prompt = "▶▶"
## Cadenas de estilo ## 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` - `negrita`
- `cursiva` - `cursiva`
- `subrayado` - `subrayado`
- `atenuado` - `atenuado`
- `invertido` - `invertido`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `ninguno` - `ninguno`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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 `<color>` es un especificador de color (discutido a continuación). `fg:<color>` y `<color>` 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`). - 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). - 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).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). - 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.

File diff suppressed because it is too large Load Diff

View File

@ -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? ## 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? ## Veo símbolos que no entiendo ni espero, ¿qué significan?

View File

@ -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)). - 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**: <details>
<summary>Android</summary>
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` |
</details>
##### Desde un binario preconstruido, con el intérprete de comandos: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
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). </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### Con [Scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
Añade el siguiente código al final de `~/.bashrc`: <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source Añade el siguiente código al final de `~/.bashrc`:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
Añade el siguiente código al final de `~/.zshrc`: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
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 ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
Añade el siguiente código al final de `~/.config/ion/initrc`: <details>
<summary>Fish</summary>
```sh Añade el siguiente código al final de `~/.config/fish/config.fish`:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**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 ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
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`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) Añade el siguiente código al final de `~/.tcshrc`:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua Añade lo siguiente al final de `~/.xonshrc`:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**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 ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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 ## 🤝 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 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 ## 💭 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.
<p align="center"> <p align="center">
<br> <br>
@ -348,4 +416,4 @@ Por favor, revisa estos proyectos previos que inspiraron la creación de Starshi
## 📝 Licencia ## 📝 Licencia
Derechos de autor © 2019-presente, [Colaboradores de Starship](https://github.com/starship/starship/graphs/contributors).<br /> 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).<br /> Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE).

View File

@ -109,7 +109,7 @@ Para configurar el prompt para usar la configuración anterior `use_symbol_for_s
error_symbol = "[✖](bold red)" 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 #### Tiempo de Ejecución

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -147,9 +147,9 @@ description: Starship est une invite minimaliste, ultra-rapide et hautement pers
```toml ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```
@ -168,7 +168,7 @@ description: Starship est une invite minimaliste, ultra-rapide et hautement pers
#### Cmd #### 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 ```lua
-- starship.lua -- starship.lua

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 ```bash
function blastoff(){ function blastoff(){
@ -45,21 +45,23 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) 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 ```powershell
function Invoke-Starship-PreCommand { 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 ```bash
function set_win_title(){ function set_titre_fenetre(){
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" 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 ```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 ```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 ```bash
function set_win_title(){ function set_win_title(){
@ -125,7 +127,7 @@ function Invoke-Starship-PreCommand {
Invoke-Expression (&starship init powershell) Invoke-Expression (&starship init powershell)
``` ```
## Enable Right Prompt ## Mettre linvite à 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`. 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 ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
# A minimal left prompt # Une invite minimale à gauche
format = """$character""" format = """$character"""
# move the rest of the prompt to the right # déplace le reste de linvite à droite
right_format = """$all""" right_format = """$all"""
``` ```
Produces a prompt like the following: Génère linvite suivante:
``` ```
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s ▶ 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). 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `PowerShell`
### Exemple ### Exemple
@ -176,26 +178,26 @@ continuation_prompt = "▶▶"
## Chaînes de style ## 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` - `bold`
- `italic` - `italic (italique)`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `inverted`
- `bg:<color>` - `bg:<couleur>`
- `fg:<color>` - `fg:<couleur>`
- `<color>` - `<couleur>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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. `<color>` est un spécificateur de couleur (discuté ci-dessous). `fg:<color>` et `<color>` 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`). - 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). - 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).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). - 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é.

File diff suppressed because it is too large Load Diff

View File

@ -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.`? ## 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 sassurer que starship ne soit pas bloqué par lexécution de ces commandes, nous mettons une limite de temps. Si une commande dépasse cette limite, starship va arrêter lexécution de la commande et afficher lavertissement ci-dessus, cest un comportement attendu. Cette limite de temps est configurable en utilisant la [clé `command_timeout`](/config/#prompt) si vous souhaitez laugmenter. Vous pouvez également suivre les étapes de débogage ci-dessous pour voir quelle commande est lente et voir si vous pouvez loptimiser. 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 sassurer que starship ne soit pas bloqué par lexécution de ces commandes, nous mettons une limite de temps. Si une commande dépasse cette limite, starship va arrêter lexécution de la commande et afficher lavertissement ci-dessus, cest 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 loptimiser. 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 ? ## Je vois des symboles que je ne comprends pas et auxquels je ne m'attendais pas, que signifient-t-ils ?

View File

@ -155,7 +155,7 @@
- **Universel:** fonctionne avec n'importe quel shell, sur n'importe quel système d'exploitation. - **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. - **Intelligent:** affiche les informations utiles en un coup d'œil.
- **Riche en fonctionnalités:** supporte tous vos outils favoris. - **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.
<p align="center"> <p align="center">
<a href="https://starship.rs/config/"><strong>Consultez la documentation de Starship&nbsp;&nbsp;</strong></a> <a href="https://starship.rs/config/"><strong>Consultez la documentation de Starship&nbsp;&nbsp;</strong></a>
@ -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)). - 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** : <details>
<summary>Android</summary>
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` |
</details>
##### Depuis une version pré-compilée, depuis le shell: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
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. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### Avec [Scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship sh -c "$(curl -fsSL https://starship.rs/install.sh)"
``` ```
2. Ajoutez le script dinitialisation 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 </details>
Ajoutez ce qui suit à la fin de `~/.bashrc`: <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source Ajouter ce qui suit à la fin de `~/.bashrc`:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
Ajoutez ce qui suit à la fin de `~/.zshrc`: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
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 ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Seul Elvish v0.17+ est supporté
#### Ion </details>
Ajoutez ce qui suit à la fin de `~/.config/ion/initrc`: <details>
<summary>Fish</summary>
```sh Ajoutez le code suivant à la fin de `~/.config/fish/config.fish`:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**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 ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
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`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) Ajoutez ce qui suit à la fin de `~/.tcshrc`:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua Ajouter ce qui suit à la fin de `~/.xonshrc`:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**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 ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### É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 ## 🤝 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 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 ## 💭Inspiré par
Jetez un œil aux précédents projets qui ont inspiré la création de starship. 🙏 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.
<p align="center"> <p align="center">
<br> <br>
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Icône de fusée de Starship"> <img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Icône de roquette de Starship">
</p> </p>
## 📝 License ## 📝 License
Copyright © 2019-présent, [Contributeurs Starship](https://github.com/starship/starship/graphs/contributors).<br /> 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).<br /> Ce projet est sous licence [ISC](https://github.com/starship/starship/blob/master/LICENSE).

View File

@ -109,7 +109,7 @@ Pour que l'invite utilise l'ancienne configuration `use_symbol_for_status = true
error_symbol = "[✖](bold red)" 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 nen ajoutons pas une exprès dans les exemples de dessus.
#### Temps d'exécution #### Temps d'exécution

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -18,7 +18,7 @@ features:
footer: Berlisensi ISC | Hak Cipta © 2019-sekarang Kontributor Starship footer: Berlisensi ISC | Hak Cipta © 2019-sekarang Kontributor Starship
#Used for the description meta tag, for SEO #Used for the description meta tag, for SEO
metaTitle: "Starship: Prompt Lintas Shell" 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.
--- ---
<div class="center"> <div class="center">
@ -119,7 +119,7 @@ description: Starship merupakan sebuah prompt yang minimal, super cepat, dan san
#### Elvish #### 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`: 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 ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 ```bash
function blastoff(){ function blastoff(){
@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) eval $(starship init bash)
set +o functrace
``` ```
## Custom pre-prompt and pre-execution Commands in PowerShell ## 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 ```bash
function set_win_title(){ 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 ```bash
starship_precmd_user_func="set_win_title" starship_precmd_user_func="set_win_title"
``` ```
In `zsh`, add this to the `precmd_functions` array: Dalam `zsh`, pada array `precmd_functions`, tambahkan:
```bash ```bash
precmd_functions+=(set_win_title) 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 ```bash
function set_win_title(){ function set_win_title(){
@ -145,7 +147,7 @@ format = """$character"""
right_format = """$all""" 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 ▶ 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `PowerShell`
### Contoh ### Contoh
@ -176,26 +178,26 @@ continuation_prompt = "▶▶"
## Menata String ## 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` - `bold`
- `italic` - `italic`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `inverted`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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 `<color>` merupakan sebuah penentu warna (dibahas di bawah). `fg:<color>` dan `<color>` 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`). - 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). - Menuliskannya dengan menggunakan `#` dan diikuti oleh enam digit angka hexadesimal. Spesifikasi [kode heksadesimal pada warna RGB](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). - 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.

File diff suppressed because it is too large Load Diff

View File

@ -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? ## 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? ## I see symbols I don't understand or expect, what do they mean?

View File

@ -2,7 +2,7 @@
<img <img
width="400" width="400"
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png" src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
alt="Starship Cross-shell prompt" alt="Starship Prompt antar-shell"
/> />
</p> </p>
@ -10,12 +10,12 @@
<a href="https://github.com/starship/starship/actions" <a href="https://github.com/starship/starship/actions"
><img ><img
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square" src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
alt="GitHub Actions workflow status" alt="Status alur kerja GitHub Actions"
/></a> /></a>
<a href="https://crates.io/crates/starship" <a href="https://crates.io/crates/starship"
><img ><img
src="https://img.shields.io/crates/v/starship?style=flat-square" src="https://img.shields.io/crates/v/starship?style=flat-square"
alt="Crates.io version" alt="Versi Crates.io"
/></a> /></a>
<a href="https://repology.org/project/starship/versions" <a href="https://repology.org/project/starship/versions"
><img ><img
@ -25,21 +25,21 @@
<a href="https://discord.gg/starship" <a href="https://discord.gg/starship"
><img ><img
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square" src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
alt="Chat on Discord" alt="Mengobrol di Discord"
/></a> /></a>
<a href="https://twitter.com/StarshipPrompt" <a href="https://twitter.com/StarshipPrompt"
><img ><img
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Follow @StarshipPrompt on Twitter" alt="Ikuti @StarshipPrompt di Twitter"
/></a> /></a>
</p> </p>
<p align="center"> <p align="center">
<a href="https://starship.rs">Website</a> <a href="https://starship.rs">Situs Web</a>
· ·
<a href="#🚀-installation">Installation</a> <a href="#🚀-installation">Pemasangan</a>
· ·
<a href="https://starship.rs/config/">Configuration</a> <a href="https://starship.rs/config/">Konfigurasi</a>
</p> </p>
<p align="center"> <p align="center">
@ -150,202 +150,270 @@
**Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!** **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. - **Customizable:** configure every aspect of your prompt.
- **Universal:** works on any shell, on any operating system. - **Universal:** bekerja pada shell apapun, pada sistem operasi apa saja.
- **Intelligent:** shows relevant information at a glance. - **Cerdas:** menampilkan sekilas informasi yang relevan.
- **Feature rich:** support for all your favorite tools. - **Kaya akan fitur:** dukungan untuk semua alat favoritmu.
- **Easy:** quick to install  start using it in minutes. - **Mudah:** pemasangan singkat  mulai menggunakannya dalam hitungan menit.
<p align="center"> <p align="center">
<a href="https://starship.rs/config/"><strong>Explore the Starship docs&nbsp;&nbsp;</strong></a> <a href="https://starship.rs/config/"><strong>Jelajahi dokumentasi Starship&nbsp;&nbsp;</strong></a>
</p> </p>
<a name="🚀-installation"></a> <a name="🚀-installation"></a>
## 🚀 Installation ## 🚀 Pemasangan
### Prasyarat ### 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**: <details>
<summary>Android</summary>
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` |
</details>
##### From prebuilt binary, with Shell: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
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. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### Dengan [Scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
Tambahkan skrip berikut pada baris akhir `~/.bashrc:`: <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source Tambahkan skrip berikut pada baris akhir `~/.bashrc:`:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
Tambahkan skrip berikut pada baris akhir `~/.zshrc`: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
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 ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
Tambahkan skrip berikut pada baris akhir `~/.config/ion/initrc`: <details>
<summary>Fish</summary>
```sh Tambahkan skrip berikut pada baris akhir `~/.config/fish/config.fish`:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**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 ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
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`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) Tambahkan skrip berikut pada baris akhir `~/.tcshrc`:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua Tambahkan skrip berikut pada baris akhir `~/.xonshrc`:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**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 ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Contributing </details>
### 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). 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 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. 🙏 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.
<p align="center"> <p align="center">
<br> <br>
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon"> <img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Ikon roket Starship">
</p> </p>
## 📝 License ## 📝 Lisensi
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed. Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.

View File

@ -109,7 +109,7 @@ Untuk mengkonfigurasi prompt agar menggunakan konfigurasi `use_symbol_for_status
error_symbol = "[✖](bold red)" 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 #### Durasi Perintah

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -119,7 +119,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
#### Elvish #### 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`: Aggiungi quanto segue alla fine di `~/.elvish/rc.elv`:
@ -147,9 +147,9 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
```toml ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 ```bash
function blastoff(){ function blastoff(){
@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) eval $(starship init bash)
set +o functrace
``` ```
## Custom pre-prompt and pre-execution Commands in PowerShell ## 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 ```bash
function set_win_title(){ 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 ```bash
starship_precmd_user_func="set_win_title" 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 ```bash
precmd_functions+=(set_win_title) 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 ```bash
function set_win_title(){ 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `PowerShell`
### Esempio ### Esempio
@ -176,26 +178,26 @@ continuation_prompt = "▶▶"
## Stile delle Stringhe ## 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` - `bold`
- `italic` - `italic`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `inverted`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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 `<color>` è un colore specifico (discusso in seguito). `fg:<color>` e `<color>` 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`). - 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). - Un `#` seguito da un valore esadecimale a sei cifre. Questo specifica un [colore esagesimale in RGB](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). - 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à.

View File

@ -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): Tutta la configurazione per starship è fatta in questo file [TOML](https://github.com/toml-lang/toml):
```toml ```toml
# Inserisce una riga vuota tra gli prompt della shell # Inserts a blank line between shell prompts
add_newline = true add_newline = true
# Sostituisci il simbolo "" nel prompt con "➜" # Replace the "" symbol in the prompt with "➜"
[character] # Il nome del modulo che stiamo configurando è "character" [character] # The name of the module we are configuring is "character"
success_symbol = "[➜](grassetto)" # Il segmento "success_symbol" è impostato a "➜" con il colore "bold green" 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] [package]
disabled = true disabled = true
``` ```
@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star
### Logging ### 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 ```sh
export STARSHIP_CACHE=~/.starship/cache export STARSHIP_CACHE=~/.starship/cache
@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp')
### Terminologia ### 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 ### 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 #### 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`. - `$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`. - `$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 #### 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. - `[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. - `[⌘ $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 #### 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 - `"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 - `"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 - `"bold italic fg:purple"` imposta il testo viola in corsivo e grassetto
- `""` disabilita esplicitamente tutti gli stili - `""` 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 #### 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. - `(@$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. - `(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). | | `command_timeout` | `500` | Timeout per i comandi eseguiti da starship (in millisecondi). |
| `add_newline` | `true` | Inserisce una riga vuota tra i prompt della shell. | | `add_newline` | `true` | Inserisce una riga vuota tra i prompt della shell. |
### Esempio ### Esempio
```toml ```toml
@ -185,6 +184,7 @@ format = "$all"
format = """ format = """
$username\ $username\
$hostname\ $hostname\
$localip\
$shlvl\ $shlvl\
$singularity\ $singularity\
$kubernetes\ $kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\ $package\
$cmake\ $cmake\
$cobol\ $cobol\
$container\
$dart\ $dart\
$deno\ $deno\
$dotnet\ $dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml ```toml
# Move the directory to the second line # Move the directory to the second line
format="$all$directory$character" format = "$all$directory$character"
``` ```
## AWS ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### Esempio #### Esempio
```toml ```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 threshold = 10
style = "bold red" 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 threshold = 30
style = "bold yellow" style = "bold yellow"
discharging_symbol = "💦" discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed # when capacity is over 30%, the battery indicator will not be displayed
``` ```
## Character ## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## Durata del comando
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Opzioni ### Opzioni
| Opzione | Default | Descrizione | | Opzione | Default | Descrizione |
| -------------------- | ----------------------------- | ---------------------------------------------------------- | | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | | `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | | `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. | | `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | Lo stile per il modulo. | | `style` | `"bold yellow"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `cmd_duration` module. | | `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. | | `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | | `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. |
::: 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`.
:::
### Variables ### 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 | | duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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) " 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 ## 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: 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno ## 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 `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 - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Opzioni ### 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 | | path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | | 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 ### Esempio
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1002,16 +1030,17 @@ The `env_var` module displays the current value of a selected environment variab
- The `variable` configuration option matches an existing environment variable - The `variable` configuration option matches an existing environment variable
- The `variable` configuration option is not defined, but the `default` configuration option is - The `variable` configuration option is not defined, but the `default` configuration option is
::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character. ::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character.
Example: following configuration will display value of USER environment variable Example: following configuration will display value of USER environment variable
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[env_var.USER] [env_var.USER]
default = "unknown user" default = "unknown user"
``` ```
::: :::
### Opzioni ### Opzioni
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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 ### Esempio
@ -1045,6 +1074,7 @@ default = "unknown shell"
``` ```
Displaying multiple environmental variables: Displaying multiple environmental variables:
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
@ -1083,7 +1113,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
format="AA $fill BB $fill CC" format = "AA $fill BB $fill CC"
[fill] [fill]
symbol = "-" symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
``` ```
AA -------------------------------------------- BB -------------------------------------------- CC AA -------------------------------------------- BB -------------------------------------------- CC
``` ```
## Google Cloud (`gcloud`) ## Google Cloud (`gcloud`)
@ -1150,7 +1179,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -1212,7 +1241,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1248,7 +1277,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
| hash | `b703eb3` | The current git commit hash | | hash | `b703eb3` | The current git commit hash |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1288,7 +1317,7 @@ The `git_state` module will show in directories which are part of a git reposito
| progress_total | `2` | The total operation progress | | progress_total | `2` | The total operation progress |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1329,7 +1358,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| added_style\* | | Mirrors the value of option `added_style` | | added_style\* | | Mirrors the value of option `added_style` |
| deleted_style\* | | Mirrors the value of option `deleted_style` | | deleted_style\* | | Mirrors the value of option `deleted_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 ### Esempio
@ -1382,7 +1411,7 @@ The following variables can be used in `format`:
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
| style\* | Mirrors the value of option `style` | | 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 following variables can be used in `diverged`: The following variables can be used in `diverged`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰" behind = "😰"
diverged = "😵" diverged = "😵"
up_to_date = "✓" up_to_date = "✓"
untracked = "🤷" untracked = "🤷"
stashed = "📦" stashed = "📦"
modified = "📝" modified = "📝"
staged = '[++\($count\)](green)' staged = '[++\($count\)](green)'
@ -1461,7 +1490,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1500,7 +1529,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer | | hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname] [hostname]
ssh_only = false ssh_only = false
format = "on [$hostname](bold red) " format = "on [$hostname](bold red) "
trim_at = ".companyname.com" trim_at = ".companyname.com"
disabled = false disabled = false
``` ```
@ -1574,7 +1603,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## Jobs ## Jobs
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running. The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is: The default functionality is:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| Opzione | Default | Descrizione | | Opzione | Default | Descrizione |
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | | ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
| `threshold`\* | `1` | Show number of jobs if exceeded. | | `threshold`* | `1` | Show number of jobs if exceeded. |
| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. |
| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | | `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. |
| `format` | `"[$symbol$number]($style) "` | The format for the module. | | `format` | `"[$symbol$number]($style) "` | The format for the module. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | | `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | Lo stile per il modulo. | | `style` | `"bold blue"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | Disables the `jobs` module. |
\*: This option is deprecated, please use the
`number_threshold` and `symbol_threshold` options instead. *: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead.
### Variables ### Variables
@ -1630,7 +1658,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ " symbol = "∴ "
``` ```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### Opzioni
| Opzione | Default | Descrizione |
| ---------- | ------------------------- | ------------------------------------------------------ |
| `ssh_only` | `true` | Only show IP address when connected to an SSH session. |
| `format` | `"[$localipv4]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | Lo stile per il modulo. |
| `disabled` | `true` | Disables the `localip` module. |
### Variables
| Variable | Esempio | Descrizione |
| --------- | ------------ | ----------------------------------- |
| localipv4 | 192.168.1.13 | Contains the primary IPv4 address |
| 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
[localip]
ssh_only = false
format = "@[$localipv4](bold red) "
disabled = false
```
## Kotlin ## Kotlin
The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met:
@ -1711,7 +1772,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1759,7 +1820,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1845,7 +1906,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1889,7 +1950,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | `🐏` | Mirrors the value of option `symbol` | | symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | style\* | | Mirrors the value of option `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
### Esempio ### Esempio
@ -1926,7 +1987,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -1969,7 +2030,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2005,7 +2066,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2036,7 +2097,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | | `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` |
| `symbol` | `" "` | A format string representing the symbol of Node.js. | | `symbol` | `" "` | A format string representing the symbol of Node.js. |
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Quali estensioni dovrebbero attivare questo modulo. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `["package.json", ".node-version"]` | Quali nomi di file dovrebbero attivare questo modulo. | | `detect_files` | `["package.json", ".node-version"]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `["node_modules"]` | Quali cartelle dovrebbero attivare questo modulo. | | `detect_folders` | `["node_modules"]` | Quali cartelle dovrebbero attivare questo modulo. |
@ -2052,7 +2113,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2187,7 +2248,7 @@ The `package` module is shown when the current directory is the repository for a
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2267,7 +2328,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi ## 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 ::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Opzioni ### Opzioni
| Opzione | Default | Descrizione | | Opzione | Default | Descrizione |
| ---------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | | ---------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | | `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | | `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. | | `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | Lo stile per il modulo. | | `style` | `"bold 5"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `pulumi` module. | | `disabled` | `false` | Disables the `pulumi` module. |
### Variables ### Variables
@ -2309,10 +2370,11 @@ By default the module will be shown if any of the following conditions are met:
| --------- | ---------- | ------------------------------------ | | --------- | ---------- | ------------------------------------ |
| version | `v0.12.24` | The version of `pulumi` | | version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack | | stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi] [pulumi]
symbol = "🛥 " symbol = "🛥 "
format = "[$symbol$stack]($style) " format = "[$symbol$stack]($style) "
``` ```
## PureScript ## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2702,7 +2763,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| indicator | | Mirrors the value of `indicator` for currently used shell. | | indicator | | Mirrors the value of `indicator` for currently used shell. |
| style\* | | Mirrors the value of option `style`. | | 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 ### Examples
@ -2740,7 +2801,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status ## 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`. The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer.
::: tip ::: tip
@ -2812,7 +2873,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting | | `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes | | `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `pipestatus_format` | `\\[$pipestatus\\] => [$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. | | `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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[status] [status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true map_symbol = true
disabled = false disabled = false
``` ```
## Sudo ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[sudo] [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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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. | | ora | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Esempio
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V ## 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 `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 file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file - 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` | | 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 #### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml # ~/.config/starship.toml
[custom.foo] [custom.foo]
command = "echo foo" # shows output of command command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """ when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)" format = " transcending [$output]($style)"
[custom.time] [custom.time]
command = "time /T" command = "time /T"
extensions = ["pst"] # filters *.pst files extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
``` ```

View File

@ -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? ## 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? ## Vedo simboli che non capisco o mi aspetto, cosa significano?

View File

@ -103,7 +103,7 @@
><img ><img
height="20" height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
alt="Português do Brasil" alt="Portoghese del Brasile"
/></a> /></a>
&nbsp; &nbsp;
<a <a
@ -111,7 +111,7 @@
><img ><img
height="20" height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
alt="Русский" alt="Russo"
/></a> /></a>
&nbsp; &nbsp;
<a <a
@ -169,159 +169,227 @@
- Un [Nerd Font](https://www.nerdfonts.com/) installato e abilitato nel tuo terminale (per esempio, prova [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). - Un [Nerd Font](https://www.nerdfonts.com/) installato e abilitato nel tuo terminale (per esempio, prova [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
### Inizia ### Step 1. Install Starship
**Nota**: a causa della proliferazione di piattaforme diverse, un sottoinsieme di piattaforme supportate sono mostrate di seguito. Non riesci a vedere la tua? Dai un'occhiata alle [istruzioni aggiuntive della piattaforma](https://starship.rs/it-IT/installing/). Select your operating system from the list below to view installation instructions:
1. Installa il binario **starship**: <details>
<summary>Android</summary>
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` |
</details>
##### Da un binario precompilato, con Shell: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
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. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### Con [Scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
Aggiungi quanto segue alla fine di `~/.bashrc`: <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source Aggiungi quanto segue alla fine di `~/.bashrc`:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
Aggiungi quanto segue alla fine di `~/.zshrc`: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
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 ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
Aggiungi quanto segue alla fine di `~/.config/ion/initrc`: <details>
<summary>Fish</summary>
```sh Aggiungi quanto segue alla fine di `~/.config/fish/config.fish`:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**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 ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
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`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) Aggiungi quanto segue alla fine di `~/.tcshrc`:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua Aggiungi quanto segue alla fine di `~/.xonshrc`:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**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 ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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 ## 🤝 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. 🙏 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.
<p align="center"> <p align="center">
<br> <br>

View File

@ -109,7 +109,7 @@ Per configurare il prompt al fine di usare la vecchia configurazione `use_symbol
error_symbol = "[✖](bold red)" 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 #### Durata del comando

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -119,7 +119,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
#### Elvish #### Elvish
::: warning Only elvish v0.17 or higher is supported. ::: ::: warning elvish v0.17以上のみサポートされています。 :::
`~/.elvish/rc.elv` の最後に以下を追記してください。 `~/.elvish/rc.elv` の最後に以下を追記してください。
@ -147,9 +147,9 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
```toml ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 ```bash
function blastoff(){ function blastoff(){
@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) eval $(starship init bash)
set +o functrace
``` ```
## Custom pre-prompt and pre-execution Commands in PowerShell ## 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 ```bash
function set_win_title(){ 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 ```bash
starship_precmd_user_func="set_win_title" starship_precmd_user_func="set_win_title"
``` ```
In `zsh`, add this to the `precmd_functions` array: `zsh`では関数を `precmd_functions` の配列に追加してください。
```bash ```bash
precmd_functions+=(set_win_title) 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 ```bash
function set_win_title(){ function set_win_title(){
@ -125,11 +127,11 @@ function Invoke-Starship-PreCommand {
Invoke-Expression (&starship init powershell) 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. `right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd.
@ -145,7 +147,7 @@ format = """$character"""
right_format = """$all""" right_format = """$all"""
``` ```
Produces a prompt like the following: 次のようなプロンプトが生成されます:
``` ```
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s ▶ 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `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` - `bold`
- `italic` - `italic`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `inverted`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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. ここで、 `<color>` は色を指定します(以下で述べます)。 現在 `fg:<color>``<color>` は同様の動作ですが、将来変更される可能性があります。 `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`). - 標準的なターミナルカラーの `black``red``green``blue``yellow``purple``cyan``white`。 必要に応じて、より明るい色を得るために `bright-` を前につけることができます。(例えば、 `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). - `#` に続く16進数。 [RGB の16進数カラーコード](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). - 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. 複数の色が文字色/背景色に指定された際には、最後の指定が優先して選ばれます。

File diff suppressed because it is too large Load Diff

View File

@ -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? ## 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.
## よくわからない記号を見つけました。これはどういった意味ですか? ## よくわからない記号を見つけました。これはどういった意味ですか?

View File

@ -169,159 +169,227 @@
- [Nerd Font](https://www.nerdfonts.com/)がインストールされ、端末にて有効になっている(例えば、[Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)を試してみてください)。 - [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** のバイナリをインストール <details>
<summary>Android</summary>
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` |
</details>
##### ビルド済みのバイナリをインストール <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
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` |
**※**インストールスクリプトのデフォルト値は上書きすることができます。詳しくはヘルプを参照してください。 </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### [ Scoop ](https://scoop.sh)の場合: Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
`~/.bashrc` の最後に以下を追記してください <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source `~/.bashrc` の最後に以下を追記してください
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
`~/.zshrc` の最後に以下を追記してください <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
`Microsoft.PowerShell_profile.ps1` の最後に以下を追記してください。 PowerShell 上で `$PROFILE` 変数を問い合わせると、ファイルの場所を確認できます。 通常、パスは `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` または -Nix 上では `~/.config/powershell/Microsoft.PowerShell_profile.ps1` です。 `~/.elvish/rc.elv` の最後に以下を追記してください。
```powershell ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
`~/.config/ion/initrc `の最後に次を追加してください <details>
<summary>Fish</summary>
```sh `~/.config/fish/config.fish` の最後に以下を追記してください
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**Warning** Only elvish v0.17 or higher is supported. `~/.elvish/rc.elv` の最後に以下を追記してください。 `~/.config/ion/initrc `の最後に次を追加してください
```sh ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
#### Xonsh ```powershell
Invoke-Expression (&starship init powershell)
```
`~/.xonshrc` の最後に以下を追加してください: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) `~/.tcshrc` の最後に以下を追加します:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua `~/.xonshrc` の最後に以下を追加してください:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**Warning** This will change in the future. nu バージョン 0.33 以降のみサポートされます。 Add the following to your nu config file. nu で`config path`を実行することで、設定ファイルの場所を確認できます。 `~/.zshrc` の最後に以下を追記してください
```toml ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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 の作成に影響を与えた、これまでのプロジェクトをチェックしてください 🙏 よければ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.
<p align="center"> <p align="center">
<br> <br>

View File

@ -109,7 +109,7 @@ v0.45.0 のリリースでは、ステータスコードがゼロでないとき
error_symbol = "[✖](bold red)" error_symbol = "[✖](bold red)"
``` ```
*注意:* `character` 要素は自動的にスペースを後ろに追加するため、他の `format` 文字列とは異なり、上記の例では特にスペースを追加していません。 _注意:_ `character` 要素は自動的にスペースを後ろに追加するため、他の `format` 文字列とは異なり、上記の例では特にスペースを追加していません。
#### Command Duration #### Command Duration

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -28,13 +28,13 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
</video> </video>
</div> </div>
### 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
sh -c "$(curl -fsSL https://starship.rs/install.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 brew install starship
``` ```
With [Scoop](https://scoop.sh): [Scoop](https://scoop.sh)을 통한 설치:
```powershell ```powershell
scoop install starship scoop install starship
``` ```
1. 쉘 설정에 시동 스크립트를 추가: 1. 쉘 설정 파일에 init 스크립트 추가:
#### Bash #### Bash
`~/.bashrc`에 아래 라인을 추가 `~/.bashrc`의 끝부분에 아래 라인을 추가:
```sh ```sh
# ~/.bashrc # ~/.bashrc
@ -77,7 +77,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Fish #### Fish
`~/.config/fish/config.fish`에 아래 라인을 추가 `~/.config/fish/config.fish`의 끝부분에 아래 라인을 추가:
```sh ```sh
# ~/.config/fish/config.fish # ~/.config/fish/config.fish
@ -88,7 +88,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Zsh #### Zsh
`~/.zshrc`에 아래 라인을 추가 `~/.zshrc`의 끝부분에 아래 라인을 추가
```sh ```sh
# ~/.zshrc # ~/.zshrc
@ -99,7 +99,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Powershell #### 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 ```sh
Invoke-Expression (&starship init powershell) Invoke-Expression (&starship init powershell)
@ -108,7 +108,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Ion #### Ion
아래의 라인을 `~/.config/ion/initrc` 마지막에 추가: `~/.config/ion/initrc` 의 끝부분에 아래 라인을 추가:
```sh ```sh
# ~/.config/ion/initrc # ~/.config/ion/initrc
@ -119,9 +119,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Elvish #### Elvish
::: warning Only elvish v0.17 or higher is supported. ::: ::: 주의 elvish 버전 v0.17 이상에서만 지원됩니다. :::
아래의 라인을 `~/.elvish/rc.elv` 마지막에 추가: `~/.elvish/rc.elv` 의 끝부분에 아래 라인을 추가:
```sh ```sh
# ~/.elvish/rc.elv # ~/.elvish/rc.elv
@ -132,7 +132,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Tcsh #### Tcsh
아래의 라인을 `~/.tcshrc` 마지막에 추가: `~/.tcshrc` 의 끝부분에 아래 라인을 추가:
```sh ```sh
# ~/.tcshrc # ~/.tcshrc
@ -143,13 +143,13 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Nushell #### 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 ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```
@ -157,7 +157,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Xonsh #### Xonsh
Add the following to the end of `~/.xonshrc`: `~/.xonshrc` 의 끝부분에 아래 라인을 추가:
```sh ```sh
# ~/.xonshrc # ~/.xonshrc
@ -168,7 +168,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Cmd #### 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 ```lua
-- starship.lua -- starship.lua

View File

@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) eval $(starship init bash)
set +o functrace
``` ```
## Custom pre-prompt and pre-execution Commands in PowerShell ## 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `파워셀` - `파워셀`
### Example ### 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: 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`
- `italic` - `italic`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `inverted`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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. where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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: 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`). - 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 `#` 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). - 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. If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la
add_newline = true add_newline = true
# Replace the "" symbol in the prompt with "➜" # Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character" [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" 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 # Disable the package module, hiding it from the prompt completely
[package] [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). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. | | `add_newline` | `true` | Inserts blank line between shell prompts. |
### Example ### Example
```toml ```toml
@ -185,6 +184,7 @@ format = "$all"
format = """ format = """
$username\ $username\
$hostname\ $hostname\
$localip\
$shlvl\ $shlvl\
$singularity\ $singularity\
$kubernetes\ $kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\ $package\
$cmake\ $cmake\
$cobol\ $cobol\
$container\
$dart\ $dart\
$deno\ $deno\
$dotnet\ $dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml ```toml
# Move the directory to the second line # Move the directory to the second line
format="$all$directory$character" format = "$all$directory$character"
``` ```
## AWS ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### Example #### Example
```toml ```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 threshold = 10
style = "bold red" 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 threshold = 30
style = "bold yellow" style = "bold yellow"
discharging_symbol = "💦" discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed # when capacity is over 30%, the battery indicator will not be displayed
``` ```
## Character ## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| -------------------- | ----------------------------- | ---------------------------------------------------------- | | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | | `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | | `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. | | `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. | | `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. | | `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. | | `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | | `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. |
::: 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`.
:::
### Variables ### 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 | | duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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) " 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 ## 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: 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno ## 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 `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 - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options ### 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 | | path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | | 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 ### Example
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1002,16 +1030,17 @@ The `env_var` module displays the current value of a selected environment variab
- The `variable` configuration option matches an existing environment variable - The `variable` configuration option matches an existing environment variable
- The `variable` configuration option is not defined, but the `default` configuration option is - The `variable` configuration option is not defined, but the `default` configuration option is
::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character. ::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character.
Example: following configuration will display value of USER environment variable Example: following configuration will display value of USER environment variable
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[env_var.USER] [env_var.USER]
default = "unknown user" default = "unknown user"
``` ```
::: :::
### Options ### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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 ### Example
@ -1045,6 +1074,7 @@ default = "unknown shell"
``` ```
Displaying multiple environmental variables: Displaying multiple environmental variables:
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
@ -1083,7 +1113,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
format="AA $fill BB $fill CC" format = "AA $fill BB $fill CC"
[fill] [fill]
symbol = "-" symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
``` ```
AA -------------------------------------------- BB -------------------------------------------- CC AA -------------------------------------------- BB -------------------------------------------- CC
``` ```
## Google Cloud (`gcloud`) ## Google Cloud (`gcloud`)
@ -1150,7 +1179,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -1212,7 +1241,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1248,7 +1277,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
| hash | `b703eb3` | The current git commit hash | | hash | `b703eb3` | The current git commit hash |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1288,7 +1317,7 @@ The `git_state` module will show in directories which are part of a git reposito
| progress_total | `2` | The total operation progress | | progress_total | `2` | The total operation progress |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1329,7 +1358,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| added_style\* | | Mirrors the value of option `added_style` | | added_style\* | | Mirrors the value of option `added_style` |
| deleted_style\* | | Mirrors the value of option `deleted_style` | | deleted_style\* | | Mirrors the value of option `deleted_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 ### Example
@ -1382,7 +1411,7 @@ The following variables can be used in `format`:
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
| style\* | Mirrors the value of option `style` | | 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 following variables can be used in `diverged`: The following variables can be used in `diverged`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰" behind = "😰"
diverged = "😵" diverged = "😵"
up_to_date = "✓" up_to_date = "✓"
untracked = "🤷" untracked = "🤷"
stashed = "📦" stashed = "📦"
modified = "📝" modified = "📝"
staged = '[++\($count\)](green)' staged = '[++\($count\)](green)'
@ -1461,7 +1490,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1500,7 +1529,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer | | hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname] [hostname]
ssh_only = false ssh_only = false
format = "on [$hostname](bold red) " format = "on [$hostname](bold red) "
trim_at = ".companyname.com" trim_at = ".companyname.com"
disabled = false disabled = false
``` ```
@ -1574,7 +1603,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## Jobs ## Jobs
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running. The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is: The default functionality is:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| Option | Default | Description | | Option | Default | Description |
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | | ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
| `threshold`\* | `1` | Show number of jobs if exceeded. | | `threshold`* | `1` | Show number of jobs if exceeded. |
| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. |
| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | | `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. |
| `format` | `"[$symbol$number]($style) "` | The format for the module. | | `format` | `"[$symbol$number]($style) "` | The format for the module. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | | `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the module. | | `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | Disables the `jobs` module. |
\*: This option is deprecated, please use the
`number_threshold` and `symbol_threshold` options instead. *: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead.
### Variables ### Variables
@ -1630,7 +1658,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ " symbol = "∴ "
``` ```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### Options
| Option | Default | Description |
| ---------- | ------------------------- | ------------------------------------------------------ |
| `ssh_only` | `true` | Only show IP address when connected to an SSH session. |
| `format` | `"[$localipv4]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `true` | Disables the `localip` module. |
### Variables
| Variable | Example | Description |
| --------- | ------------ | ----------------------------------- |
| localipv4 | 192.168.1.13 | Contains the primary IPv4 address |
| 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
[localip]
ssh_only = false
format = "@[$localipv4](bold red) "
disabled = false
```
## Kotlin ## Kotlin
The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met:
@ -1711,7 +1772,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1759,7 +1820,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1845,7 +1906,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1889,7 +1950,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | `🐏` | Mirrors the value of option `symbol` | | symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | style\* | | Mirrors the value of option `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
### Example ### Example
@ -1926,7 +1987,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1969,7 +2030,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2005,7 +2066,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2036,7 +2097,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string representing the symbol of Node.js. | | `symbol` | `" "` | A format string representing the symbol of Node.js. |
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
@ -2052,7 +2113,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2187,7 +2248,7 @@ The `package` module is shown when the current directory is the repository for a
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2267,7 +2328,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi ## 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 ::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | | `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. | | `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. | | `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. | | `disabled` | `false` | Disables the `pulumi` module. |
### Variables ### Variables
@ -2309,10 +2370,11 @@ By default the module will be shown if any of the following conditions are met:
| --------- | ---------- | ------------------------------------ | | --------- | ---------- | ------------------------------------ |
| version | `v0.12.24` | The version of `pulumi` | | version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack | | stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi] [pulumi]
symbol = "🛥 " symbol = "🛥 "
format = "[$symbol$stack]($style) " format = "[$symbol$stack]($style) "
``` ```
## PureScript ## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2702,7 +2763,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| indicator | | Mirrors the value of `indicator` for currently used shell. | | indicator | | Mirrors the value of `indicator` for currently used shell. |
| style\* | | Mirrors the value of option `style`. | | 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 ### Examples
@ -2740,7 +2801,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status ## 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`. The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer.
::: tip ::: tip
@ -2812,7 +2873,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting | | `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes | | `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `pipestatus_format` | `\\[$pipestatus\\] => [$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. | | `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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[status] [status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true map_symbol = true
disabled = false disabled = false
``` ```
## Sudo ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[sudo] [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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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. | | time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V ## 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 `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 file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file - 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` | | 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 #### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml # ~/.config/starship.toml
[custom.foo] [custom.foo]
command = "echo foo" # shows output of command command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """ when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)" format = " transcending [$output]($style)"
[custom.time] [custom.time]
command = "time /T" command = "time /T"
extensions = ["pst"] # filters *.pst files extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
``` ```

View File

@ -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? ## 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? ## I see symbols I don't understand or expect, what do they mean?

View File

@ -150,178 +150,246 @@
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!** **The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
- **Fast:** it's fast _really really_ fast! 🚀 - ** Fast:** 빨라요 _엄청 엄청_ 빠릅니다! 🚀
- **Customizable:** configure every aspect of your prompt. - ** Customizable:** 프롬프트의 모든 측면을 커스텀 가능합니다.
- **Universal:** works on any shell, on any operating system. - **Universal:** 어떤 쉘 위에서도, 어떤 운영체제 위에서도 동작합니다.
- **Intelligent:** shows relevant information at a glance. - **Intelligent:** 관련 정보를 한눈에 보여줍니다.
- **Feature rich:** support for all your favorite tools. - **Feature rich:** 원하는 모든 도구를 지원합니다.
- **Easy:** quick to install  start using it in minutes. - **Easy:** 빠른 설치 - 몇 분 안에 사용할 수 있습니다.
<p align="center"> <p align="center">
<a href="https://starship.rs/config/"><strong>Explore the Starship docs&nbsp;&nbsp;</strong></a> <a href="https://starship.rs/config/"><strong>Starship 문서 보기&nbsp;&nbsp;</strong></a>
</p> </p>
<a name="🚀-installation"></a> <a name="🚀-installation"></a>
## 🚀 설치 ## 🚀 설치
### 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** 바이러니 설치: <details>
<summary>Android</summary>
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` |
</details>
##### From prebuilt binary, with Shell: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
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. | 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. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### With [Scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
`~/.bashrc`에 아래 라인을 추가 <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### Fish ### Step 2. 쉘에 Starship 적용하기
`~/.config/fish/config.fish`에 아래 라인을 추가 쉘에 Starship 초기 설정을 합니다. 아래의 리스트 중에 해당하는 것을 고르세요:
```sh <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source `~/.bashrc`의 끝부분에 아래 라인을 추가:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
`~/.zshrc`에 아래 라인을 추가 <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### 파워셀 <details>
<summary>Elvish</summary>
`Microsoft.PowerShell_profile.ps1`의 끝부분에 아래 내용을 추가. 해당 설정파일은 파워쉘에서 `$PROFILE` 변수 확인을 통해 확인 가능. 일반적으로 해당 파일은 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 혹은 -Nix의 경우 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`에 위치. `~/.elvish/rc.elv` 의 끝부분에 아래 라인을 추가:
```powershell ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
아래의 라인을 `~/.config/ion/initrc` 마지막에 추가: <details>
<summary>Fish</summary>
```sh `~/.config/fish/config.fish`의 끝부분에 아래 라인을 추가:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**Warning** Only elvish v0.17 or higher is supported. 아래의 라인을 `~/.elvish/rc.elv` 마지막에 추가: `~/.config/ion/initrc` 의 끝부분에 아래 라인을 추가:
```sh ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>Powershell</summary>
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`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) `~/.tcshrc` 의 끝부분에 아래 라인을 추가:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua `~/.xonshrc` 의 끝부분에 아래 라인을 추가:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**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 ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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. 🙏 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.
<p align="center"> <p align="center">
<br> <br>

View File

@ -11,7 +11,7 @@ There are so many platforms out there that they didn't fit into the main README.
## [Chocolatey](https://chocolatey.org) ## [Chocolatey](https://chocolatey.org)
### Prerequisites ### 준비 사항
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey. 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) ## [termux](https://termux.com)
### Prerequisites ### 준비 사항
```sh ```sh
pkg install getconf pkg install getconf

View File

@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
error_symbol = "[✖](bold red)" error_symbol = "[✖](bold red)"
``` ```
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. _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 #### Command Duration

View File

@ -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) ![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) - 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] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -147,9 +147,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```toml ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```

View File

@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) eval $(starship init bash)
set +o functrace
``` ```
## Custom pre-prompt and pre-execution Commands in PowerShell ## 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `PowerShell`
### Example ### 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: 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`
- `italic` - `italic`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `inverted`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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. where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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: 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`). - 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 `#` 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). - 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. If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la
add_newline = true add_newline = true
# Replace the "" symbol in the prompt with "➜" # Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character" [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" 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 # Disable the package module, hiding it from the prompt completely
[package] [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). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. | | `add_newline` | `true` | Inserts blank line between shell prompts. |
### Example ### Example
```toml ```toml
@ -185,6 +184,7 @@ format = "$all"
format = """ format = """
$username\ $username\
$hostname\ $hostname\
$localip\
$shlvl\ $shlvl\
$singularity\ $singularity\
$kubernetes\ $kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\ $package\
$cmake\ $cmake\
$cobol\ $cobol\
$container\
$dart\ $dart\
$deno\ $deno\
$dotnet\ $dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml ```toml
# Move the directory to the second line # Move the directory to the second line
format="$all$directory$character" format = "$all$directory$character"
``` ```
## AWS ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### Example #### Example
```toml ```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 threshold = 10
style = "bold red" 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 threshold = 30
style = "bold yellow" style = "bold yellow"
discharging_symbol = "💦" discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed # when capacity is over 30%, the battery indicator will not be displayed
``` ```
## Character ## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| -------------------- | ----------------------------- | ---------------------------------------------------------- | | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | | `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | | `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. | | `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. | | `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. | | `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. | | `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | | `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. |
::: 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`.
:::
### Variables ### 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 | | duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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) " 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 ## 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: 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno ## 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 `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 - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options ### 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 | | path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | | 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 ### Example
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1002,16 +1030,17 @@ The `env_var` module displays the current value of a selected environment variab
- The `variable` configuration option matches an existing environment variable - The `variable` configuration option matches an existing environment variable
- The `variable` configuration option is not defined, but the `default` configuration option is - The `variable` configuration option is not defined, but the `default` configuration option is
::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character. ::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character.
Example: following configuration will display value of USER environment variable Example: following configuration will display value of USER environment variable
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[env_var.USER] [env_var.USER]
default = "unknown user" default = "unknown user"
``` ```
::: :::
### Options ### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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 ### Example
@ -1045,6 +1074,7 @@ default = "unknown shell"
``` ```
Displaying multiple environmental variables: Displaying multiple environmental variables:
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
@ -1083,7 +1113,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
format="AA $fill BB $fill CC" format = "AA $fill BB $fill CC"
[fill] [fill]
symbol = "-" symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
``` ```
AA -------------------------------------------- BB -------------------------------------------- CC AA -------------------------------------------- BB -------------------------------------------- CC
``` ```
## Google Cloud (`gcloud`) ## Google Cloud (`gcloud`)
@ -1150,7 +1179,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -1212,7 +1241,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1248,7 +1277,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
| hash | `b703eb3` | The current git commit hash | | hash | `b703eb3` | The current git commit hash |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1288,7 +1317,7 @@ The `git_state` module will show in directories which are part of a git reposito
| progress_total | `2` | The total operation progress | | progress_total | `2` | The total operation progress |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1329,7 +1358,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| added_style\* | | Mirrors the value of option `added_style` | | added_style\* | | Mirrors the value of option `added_style` |
| deleted_style\* | | Mirrors the value of option `deleted_style` | | deleted_style\* | | Mirrors the value of option `deleted_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 ### Example
@ -1382,7 +1411,7 @@ The following variables can be used in `format`:
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
| style\* | Mirrors the value of option `style` | | 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 following variables can be used in `diverged`: The following variables can be used in `diverged`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰" behind = "😰"
diverged = "😵" diverged = "😵"
up_to_date = "✓" up_to_date = "✓"
untracked = "🤷" untracked = "🤷"
stashed = "📦" stashed = "📦"
modified = "📝" modified = "📝"
staged = '[++\($count\)](green)' staged = '[++\($count\)](green)'
@ -1461,7 +1490,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1500,7 +1529,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer | | hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname] [hostname]
ssh_only = false ssh_only = false
format = "on [$hostname](bold red) " format = "on [$hostname](bold red) "
trim_at = ".companyname.com" trim_at = ".companyname.com"
disabled = false disabled = false
``` ```
@ -1574,7 +1603,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## Jobs ## Jobs
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running. The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is: The default functionality is:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| Option | Default | Description | | Option | Default | Description |
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | | ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
| `threshold`\* | `1` | Show number of jobs if exceeded. | | `threshold`* | `1` | Show number of jobs if exceeded. |
| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. |
| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | | `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. |
| `format` | `"[$symbol$number]($style) "` | The format for the module. | | `format` | `"[$symbol$number]($style) "` | The format for the module. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | | `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the module. | | `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | Disables the `jobs` module. |
\*: This option is deprecated, please use the
`number_threshold` and `symbol_threshold` options instead. *: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead.
### Variables ### Variables
@ -1630,7 +1658,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ " symbol = "∴ "
``` ```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### Options
| Option | Default | Description |
| ---------- | ------------------------- | ------------------------------------------------------ |
| `ssh_only` | `true` | Only show IP address when connected to an SSH session. |
| `format` | `"[$localipv4]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `true` | Disables the `localip` module. |
### Variables
| Variable | Example | Description |
| --------- | ------------ | ----------------------------------- |
| localipv4 | 192.168.1.13 | Contains the primary IPv4 address |
| 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
[localip]
ssh_only = false
format = "@[$localipv4](bold red) "
disabled = false
```
## Kotlin ## Kotlin
The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met:
@ -1711,7 +1772,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1759,7 +1820,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1845,7 +1906,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1889,7 +1950,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | `🐏` | Mirrors the value of option `symbol` | | symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | style\* | | Mirrors the value of option `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
### Example ### Example
@ -1926,7 +1987,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1969,7 +2030,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2005,7 +2066,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2036,7 +2097,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string representing the symbol of Node.js. | | `symbol` | `" "` | A format string representing the symbol of Node.js. |
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
@ -2052,7 +2113,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2187,7 +2248,7 @@ The `package` module is shown when the current directory is the repository for a
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2267,7 +2328,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi ## 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 ::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | | `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. | | `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. | | `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. | | `disabled` | `false` | Disables the `pulumi` module. |
### Variables ### Variables
@ -2309,10 +2370,11 @@ By default the module will be shown if any of the following conditions are met:
| --------- | ---------- | ------------------------------------ | | --------- | ---------- | ------------------------------------ |
| version | `v0.12.24` | The version of `pulumi` | | version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack | | stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi] [pulumi]
symbol = "🛥 " symbol = "🛥 "
format = "[$symbol$stack]($style) " format = "[$symbol$stack]($style) "
``` ```
## PureScript ## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2702,7 +2763,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| indicator | | Mirrors the value of `indicator` for currently used shell. | | indicator | | Mirrors the value of `indicator` for currently used shell. |
| style\* | | Mirrors the value of option `style`. | | 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 ### Examples
@ -2740,7 +2801,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status ## 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`. The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer.
::: tip ::: tip
@ -2812,7 +2873,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting | | `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes | | `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `pipestatus_format` | `\\[$pipestatus\\] => [$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. | | `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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[status] [status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true map_symbol = true
disabled = false disabled = false
``` ```
## Sudo ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[sudo] [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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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. | | time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V ## 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 `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 file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file - 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` | | 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 #### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml # ~/.config/starship.toml
[custom.foo] [custom.foo]
command = "echo foo" # shows output of command command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """ when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)" format = " transcending [$output]($style)"
[custom.time] [custom.time]
command = "time /T" command = "time /T"
extensions = ["pst"] # filters *.pst files extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
``` ```

View File

@ -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? ## 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? ## I see symbols I don't understand or expect, what do they mean?

View File

@ -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)). - 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: <details>
<summary>Android</summary>
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` |
</details>
##### Vooraf gebouwde binary, met shell: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
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. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### Met [Scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
Voeg het volgende toe aan het einde van `~/.bashrc`: <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source Voeg het volgende toe aan het einde van `~/.bashrc`:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
Add the following to the end of `~/.zshrc`: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
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 ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
Add the following to the end of `~/.config/ion/initrc`: <details>
<summary>Fish</summary>
```sh Add the following to the end of `~/.config/fish/config.fish`:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**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 ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
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`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) Add the following to the end of `~/.tcshrc`:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua Add the following to the end of `~/.xonshrc`:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**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 ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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 ## 🤝 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. 🙏 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.
<p align="center"> <p align="center">
<br> <br>

View File

@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
error_symbol = "[✖](bold red)" error_symbol = "[✖](bold red)"
``` ```
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. _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 #### Command Duration

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -147,9 +147,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```toml ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```

View File

@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) eval $(starship init bash)
set +o functrace
``` ```
## Custom pre-prompt and pre-execution Commands in PowerShell ## 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `PowerShell`
### Example ### 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: 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`
- `italic` - `italic`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `inverted`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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. where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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: 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`). - 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 `#` 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). - 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. If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ Cała konfiguracja starship jest wykonywana w tym pliku [TOML](https://github.co
add_newline = true add_newline = true
# Replace the "" symbol in the prompt with "➜" # Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character" [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" 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 # Disable the package module, hiding it from the prompt completely
[package] [package]
@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star
### Logi ### 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 ```sh
export STARSHIP_CACHE=~/.starship/cache export STARSHIP_CACHE=~/.starship/cache
@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp')
### Glosariusz ### 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 ### 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 #### 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`. - `$version` to ciąg formatujący ze zmienną o nazwie `version`.
- `$git_branch$git_commit` zawiera dwie zmienne: `git_branch` i `git_commit`. - `$git_branch$git_commit` zawiera dwie zmienne: `git_branch` i `git_commit`.
@ -83,13 +83,13 @@ For example:
#### Grupy tekstowe #### 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. 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. - `[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. - `[⌘ $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. 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. - `(@$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. - `(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). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. | | `add_newline` | `true` | Inserts blank line between shell prompts. |
### Example ### Example
```toml ```toml
@ -185,6 +184,7 @@ format = "$all"
format = """ format = """
$username\ $username\
$hostname\ $hostname\
$localip\
$shlvl\ $shlvl\
$singularity\ $singularity\
$kubernetes\ $kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\ $package\
$cmake\ $cmake\
$cobol\ $cobol\
$container\
$dart\ $dart\
$deno\ $deno\
$dotnet\ $dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml ```toml
# Move the directory to the second line # Move the directory to the second line
format="$all$directory$character" format = "$all$directory$character"
``` ```
## AWS ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### Example #### Example
```toml ```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 threshold = 10
style = "bold red" 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 threshold = 30
style = "bold yellow" style = "bold yellow"
discharging_symbol = "💦" discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed # when capacity is over 30%, the battery indicator will not be displayed
``` ```
## Character ## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| -------------------- | ----------------------------- | ---------------------------------------------------------- | | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | | `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | | `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. | | `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. | | `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. | | `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. | | `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | | `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. |
::: 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`.
:::
### Variables ### 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 | | duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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) " 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 ## 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: 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno ## 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 `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 - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options ### 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 | | path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | | 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 ### Example
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1002,16 +1030,17 @@ The `env_var` module displays the current value of a selected environment variab
- The `variable` configuration option matches an existing environment variable - The `variable` configuration option matches an existing environment variable
- The `variable` configuration option is not defined, but the `default` configuration option is - The `variable` configuration option is not defined, but the `default` configuration option is
::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character. ::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character.
Example: following configuration will display value of USER environment variable Example: following configuration will display value of USER environment variable
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[env_var.USER] [env_var.USER]
default = "unknown user" default = "unknown user"
``` ```
::: :::
### Options ### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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 ### Example
@ -1045,6 +1074,7 @@ default = "unknown shell"
``` ```
Displaying multiple environmental variables: Displaying multiple environmental variables:
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
@ -1083,7 +1113,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
format="AA $fill BB $fill CC" format = "AA $fill BB $fill CC"
[fill] [fill]
symbol = "-" symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
``` ```
AA -------------------------------------------- BB -------------------------------------------- CC AA -------------------------------------------- BB -------------------------------------------- CC
``` ```
## Google Cloud (`gcloud`) ## Google Cloud (`gcloud`)
@ -1150,7 +1179,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -1212,7 +1241,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1248,7 +1277,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
| hash | `b703eb3` | The current git commit hash | | hash | `b703eb3` | The current git commit hash |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1288,7 +1317,7 @@ The `git_state` module will show in directories which are part of a git reposito
| progress_total | `2` | The total operation progress | | progress_total | `2` | The total operation progress |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1329,7 +1358,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| added_style\* | | Mirrors the value of option `added_style` | | added_style\* | | Mirrors the value of option `added_style` |
| deleted_style\* | | Mirrors the value of option `deleted_style` | | deleted_style\* | | Mirrors the value of option `deleted_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 ### Example
@ -1382,7 +1411,7 @@ The following variables can be used in `format`:
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
| style\* | Mirrors the value of option `style` | | 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 following variables can be used in `diverged`: The following variables can be used in `diverged`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰" behind = "😰"
diverged = "😵" diverged = "😵"
up_to_date = "✓" up_to_date = "✓"
untracked = "🤷" untracked = "🤷"
stashed = "📦" stashed = "📦"
modified = "📝" modified = "📝"
staged = '[++\($count\)](green)' staged = '[++\($count\)](green)'
@ -1461,7 +1490,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1500,7 +1529,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer | | hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname] [hostname]
ssh_only = false ssh_only = false
format = "on [$hostname](bold red) " format = "on [$hostname](bold red) "
trim_at = ".companyname.com" trim_at = ".companyname.com"
disabled = false disabled = false
``` ```
@ -1574,7 +1603,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## Jobs ## Jobs
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running. The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is: The default functionality is:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| Option | Default | Description | | Option | Default | Description |
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | | ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
| `threshold`\* | `1` | Show number of jobs if exceeded. | | `threshold`* | `1` | Show number of jobs if exceeded. |
| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. |
| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | | `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. |
| `format` | `"[$symbol$number]($style) "` | The format for the module. | | `format` | `"[$symbol$number]($style) "` | The format for the module. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | | `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the module. | | `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | Disables the `jobs` module. |
\*: This option is deprecated, please use the
`number_threshold` and `symbol_threshold` options instead. *: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead.
### Variables ### Variables
@ -1630,7 +1658,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ " symbol = "∴ "
``` ```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### Options
| Option | Default | Description |
| ---------- | ------------------------- | ------------------------------------------------------ |
| `ssh_only` | `true` | Only show IP address when connected to an SSH session. |
| `format` | `"[$localipv4]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `true` | Disables the `localip` module. |
### Variables
| Zmienne | Example | Description |
| --------- | ------------ | ----------------------------------- |
| localipv4 | 192.168.1.13 | Contains the primary IPv4 address |
| 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
[localip]
ssh_only = false
format = "@[$localipv4](bold red) "
disabled = false
```
## Kotlin ## Kotlin
The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met:
@ -1711,7 +1772,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1759,7 +1820,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1845,7 +1906,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1889,7 +1950,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | `🐏` | Mirrors the value of option `symbol` | | symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | style\* | | Mirrors the value of option `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
### Example ### Example
@ -1926,7 +1987,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1969,7 +2030,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2005,7 +2066,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2036,7 +2097,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string representing the symbol of Node.js. | | `symbol` | `" "` | A format string representing the symbol of Node.js. |
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
@ -2052,7 +2113,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2187,7 +2248,7 @@ The `package` module is shown when the current directory is the repository for a
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2267,7 +2328,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi ## 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 ::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | | `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. | | `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. | | `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. | | `disabled` | `false` | Disables the `pulumi` module. |
### Variables ### Variables
@ -2309,10 +2370,11 @@ By default the module will be shown if any of the following conditions are met:
| --------- | ---------- | ------------------------------------ | | --------- | ---------- | ------------------------------------ |
| version | `v0.12.24` | The version of `pulumi` | | version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack | | stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi] [pulumi]
symbol = "🛥 " symbol = "🛥 "
format = "[$symbol$stack]($style) " format = "[$symbol$stack]($style) "
``` ```
## PureScript ## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2702,7 +2763,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| indicator | | Mirrors the value of `indicator` for currently used shell. | | indicator | | Mirrors the value of `indicator` for currently used shell. |
| style\* | | Mirrors the value of option `style`. | | 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 ### Examples
@ -2740,7 +2801,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status ## 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`. The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer.
::: tip ::: tip
@ -2812,7 +2873,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting | | `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes | | `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `pipestatus_format` | `\\[$pipestatus\\] => [$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. | | `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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[status] [status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true map_symbol = true
disabled = false disabled = false
``` ```
## Sudo ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[sudo] [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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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. | | time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V ## 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 `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 file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file - 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` | | 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 #### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml # ~/.config/starship.toml
[custom.foo] [custom.foo]
command = "echo foo" # shows output of command command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """ when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)" format = " transcending [$output]($style)"
[custom.time] [custom.time]
command = "time /T" command = "time /T"
extensions = ["pst"] # filters *.pst files extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
``` ```

View File

@ -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? ## 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ą? ## W wierszu poleceń zauważyłem symbole których się nie spodziewałem bądź nie rozumiem. Co one oznaczają?

View File

@ -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)). - 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**: <details>
<summary>Android</summary>
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` |
</details>
##### Z wstępnie zbudowanego pliku wykonywalnego, za pomocą powłoki Shell: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
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. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### Za pomocą [Scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
Dodaj na koniec pliku `~/.bashrc`: <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source Dodaj na koniec pliku `~/.bashrc`:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
Dodaj na koniec pliku `~/.zshrc`: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
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 ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
Dodaj na koniec pliku `~/.config/ion/initrc`: <details>
<summary>Fish</summary>
```sh Dodaj na koniec pliku `~/.config/fish/config.fish`:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**Warning** Only elvish v0.17 or higher is supported. Dodaj na koniec pliku `~/.elvish/rc.elv`: Dodaj na koniec pliku `~/.config/ion/initrc`:
```sh ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
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`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) Dodaj na koniec pliku `~/.tcshrc`:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua Dodaj na koniec pliku `~/.xonshrc`:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**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 ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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 ## 🤝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. 🙏 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.
<p align="center"> <p align="center">
<br> <br>

View File

@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
error_symbol = "[✖](bold red)" error_symbol = "[✖](bold red)"
``` ```
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. _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 #### Command Duration

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -18,7 +18,7 @@ features:
footer: Licenciado pelo ISC | Todos os direitos reservados © 2019-Presente | Contribuidores Starship footer: Licenciado pelo ISC | Todos os direitos reservados © 2019-Presente | Contribuidores Starship
#Used for the description meta tag, for SEO #Used for the description meta tag, for SEO
metaTitle: "Starship: Cross-Shell Prompt" 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.
--- ---
<div class="center"> <div class="center">
@ -147,9 +147,9 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
```toml ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```
@ -168,7 +168,7 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
#### Cmd #### 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 ```lua
-- starship.lua -- starship.lua

View File

@ -1,18 +1,18 @@
# Configuração avançada # 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 <code>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. 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 ```lua
function starship_preprompt_user_func(prompt) function starship_preprompt_user_func(prompt)
@ -22,7 +22,7 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 ```lua
function starship_precmd_user_func(line) function starship_precmd_user_func(line)
@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 ```bash
function blastoff(){ function blastoff(){
@ -45,21 +45,23 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" 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) 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 ```powershell
function Invoke-Starship-PreCommand { 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 ```bash
function set_win_title(){ 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 ```bash
starship_precmd_user_func="set_win_title" 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 ```bash
precmd_functions+=(set_win_title) 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 ```bash
function set_win_title(){ function set_win_title(){
@ -104,7 +106,7 @@ function set_win_title(){
starship_precmd_user_func="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 ```lua
function starship_preprompt_user_func(prompt) function starship_preprompt_user_func(prompt)
@ -114,88 +116,88 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 ```powershell
# edit $PROFILE # editar $PROFILE
function Invoke-Starship-PreCommand { 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 ### Exemplo
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
# A minimal left prompt # Um prompt mínimo à esquerda
format = """$character""" format = """$character"""
# move the rest of the prompt to the right # movw o restante do prompt para a direita
right_format = """$all""" 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 ▶ 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` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `PowerShell`
### Exemplo ### Exemplo
```toml ```toml
# ~/.config/starship.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 = "▶▶" continuation_prompt = "▶▶"
``` ```
## Estilo dos textos ## 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` - `bold`
- `italic` - `italic`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `inverted`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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 `<color>` é um especificador de cor (discutido abaixo). `fg:<color>` e `<color>` 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`). - 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`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). - 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).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). - 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.

File diff suppressed because it is too large Load Diff

View File

@ -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.`? ## 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? ## 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: Se o Starship foi instalado usando o script de instalação, o comando abaixo irá remover o binário:
```sh ```sh
# Locate and delete the starship binary # Localiza e exclui o binário do starship
sh -c 'rm "$(command -v 'starship')"' sh -c 'rm "$(command -v 'starship')"'
``` ```

View File

@ -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)). - 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**: <details>
<summary>Android</summary>
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` |
</details>
##### Binário pré-compilado, utilizando o shell: <details>
<summary>BSD</summary>
```sh Instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
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. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### Com o [Scoop](https://scoop.sh): Instale a versão mais recente no seu sistema:
```powershell ```sh
scoop install starship 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 </details>
Adicione o seguinte comando no final do arquivo `~/.bashrc`: <details>
<summary>Windows</summary>
```sh Instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source Adicione o seguinte comando no final do arquivo `~/.bashrc`:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
Adicione o seguinte comando no final do arquivo `~/.zshrc`: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
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 ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Nota: Somente o Elvish v0.17 + é suportado
#### Ion </details>
Adicione o seguinte comando no final do arquivo `~/.config/ion/initrc`: <details>
<summary>Fish</summary>
```sh Adicione o seguinte comando no final do arquivo `~/.config/fish/config.fish`:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**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 ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
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`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) Adicione ao final do arquivo `~/.tcshrc`:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua Adicione o seguinte ao final do arquivo `~/.xonshrc`:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**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 ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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 ## 🤝 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 ## 💭 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.
<p align="center"> <p align="center">
<br> <br>
@ -348,4 +416,4 @@ Por favor, confira estes projetos anteriores que ajudaram a inspirar a criação
## 📝 Licença ## 📝 Licença
Todos os direitos reservados © 2019-Presente, [Contribuidores Starship](https://github.com/starship/starship/graphs/contributors).<br /> 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).<br /> Este projeto é licenciado pelo [ISC](https://github.com/starship/starship/blob/master/LICENSE).

View File

@ -109,7 +109,7 @@ Para configurar o prompt para usar a configuração antiga `use_symbol_for_statu
error_symbol = "[✖](bold red)" 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 #### Tempo de execução do comando

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -147,9 +147,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```toml ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```

View File

@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) eval $(starship init bash)
set +o functrace
``` ```
## Custom pre-prompt and pre-execution Commands in PowerShell ## 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `PowerShell`
### Example ### 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: 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`
- `italic` - `italic`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `inverted`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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. where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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: 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`). - 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 `#` 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). - 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. If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la
add_newline = true add_newline = true
# Replace the "" symbol in the prompt with "➜" # Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character" [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" 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 # Disable the package module, hiding it from the prompt completely
[package] [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). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. | | `add_newline` | `true` | Inserts blank line between shell prompts. |
### Example ### Example
```toml ```toml
@ -185,6 +184,7 @@ format = "$all"
format = """ format = """
$username\ $username\
$hostname\ $hostname\
$localip\
$shlvl\ $shlvl\
$singularity\ $singularity\
$kubernetes\ $kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\ $package\
$cmake\ $cmake\
$cobol\ $cobol\
$container\
$dart\ $dart\
$deno\ $deno\
$dotnet\ $dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml ```toml
# Move the directory to the second line # Move the directory to the second line
format="$all$directory$character" format = "$all$directory$character"
``` ```
## AWS ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### Example #### Example
```toml ```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 threshold = 10
style = "bold red" 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 threshold = 30
style = "bold yellow" style = "bold yellow"
discharging_symbol = "💦" discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed # when capacity is over 30%, the battery indicator will not be displayed
``` ```
## Character ## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| -------------------- | ----------------------------- | ---------------------------------------------------------- | | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | | `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | | `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. | | `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. | | `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. | | `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. | | `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | | `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. |
::: 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`.
:::
### Variables ### 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 | | duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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) " 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 ## 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: 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno ## 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 `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 - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options ### 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 | | path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | | 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 ### Example
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1002,16 +1030,17 @@ The `env_var` module displays the current value of a selected environment variab
- The `variable` configuration option matches an existing environment variable - The `variable` configuration option matches an existing environment variable
- The `variable` configuration option is not defined, but the `default` configuration option is - The `variable` configuration option is not defined, but the `default` configuration option is
::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character. ::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character.
Example: following configuration will display value of USER environment variable Example: following configuration will display value of USER environment variable
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[env_var.USER] [env_var.USER]
default = "unknown user" default = "unknown user"
``` ```
::: :::
### Options ### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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 ### Example
@ -1045,6 +1074,7 @@ default = "unknown shell"
``` ```
Displaying multiple environmental variables: Displaying multiple environmental variables:
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
@ -1083,7 +1113,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
format="AA $fill BB $fill CC" format = "AA $fill BB $fill CC"
[fill] [fill]
symbol = "-" symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
``` ```
AA -------------------------------------------- BB -------------------------------------------- CC AA -------------------------------------------- BB -------------------------------------------- CC
``` ```
## Google Cloud (`gcloud`) ## Google Cloud (`gcloud`)
@ -1150,7 +1179,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Examples
@ -1212,7 +1241,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1248,7 +1277,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
| hash | `b703eb3` | The current git commit hash | | hash | `b703eb3` | The current git commit hash |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1288,7 +1317,7 @@ The `git_state` module will show in directories which are part of a git reposito
| progress_total | `2` | The total operation progress | | progress_total | `2` | The total operation progress |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1329,7 +1358,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| added_style\* | | Mirrors the value of option `added_style` | | added_style\* | | Mirrors the value of option `added_style` |
| deleted_style\* | | Mirrors the value of option `deleted_style` | | deleted_style\* | | Mirrors the value of option `deleted_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 ### Example
@ -1382,7 +1411,7 @@ The following variables can be used in `format`:
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
| style\* | Mirrors the value of option `style` | | 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 following variables can be used in `diverged`: The following variables can be used in `diverged`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰" behind = "😰"
diverged = "😵" diverged = "😵"
up_to_date = "✓" up_to_date = "✓"
untracked = "🤷" untracked = "🤷"
stashed = "📦" stashed = "📦"
modified = "📝" modified = "📝"
staged = '[++\($count\)](green)' staged = '[++\($count\)](green)'
@ -1461,7 +1490,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1500,7 +1529,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer | | hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname] [hostname]
ssh_only = false ssh_only = false
format = "on [$hostname](bold red) " format = "on [$hostname](bold red) "
trim_at = ".companyname.com" trim_at = ".companyname.com"
disabled = false disabled = false
``` ```
@ -1574,7 +1603,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## Jobs ## Jobs
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running. The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is: The default functionality is:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| Option | Default | Description | | Option | Default | Description |
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | | ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
| `threshold`\* | `1` | Show number of jobs if exceeded. | | `threshold`* | `1` | Show number of jobs if exceeded. |
| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. |
| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | | `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. |
| `format` | `"[$symbol$number]($style) "` | The format for the module. | | `format` | `"[$symbol$number]($style) "` | The format for the module. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | | `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the module. | | `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | Disables the `jobs` module. |
\*: This option is deprecated, please use the
`number_threshold` and `symbol_threshold` options instead. *: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead.
### Variables ### Variables
@ -1630,7 +1658,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ " symbol = "∴ "
``` ```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### Options
| Option | Default | Description |
| ---------- | ------------------------- | ------------------------------------------------------ |
| `ssh_only` | `true` | Only show IP address when connected to an SSH session. |
| `format` | `"[$localipv4]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `true` | Disables the `localip` module. |
### Variables
| Variable | Example | Description |
| --------- | ------------ | ----------------------------------- |
| localipv4 | 192.168.1.13 | Contains the primary IPv4 address |
| 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
[localip]
ssh_only = false
format = "@[$localipv4](bold red) "
disabled = false
```
## Kotlin ## Kotlin
The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met:
@ -1711,7 +1772,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1759,7 +1820,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1845,7 +1906,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1889,7 +1950,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | `🐏` | Mirrors the value of option `symbol` | | symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | style\* | | Mirrors the value of option `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
### Example ### Example
@ -1926,7 +1987,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -1969,7 +2030,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2005,7 +2066,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2036,7 +2097,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string representing the symbol of Node.js. | | `symbol` | `" "` | A format string representing the symbol of Node.js. |
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
@ -2052,7 +2113,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2187,7 +2248,7 @@ The `package` module is shown when the current directory is the repository for a
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2267,7 +2328,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi ## 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 ::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | | `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. | | `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. | | `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. | | `disabled` | `false` | Disables the `pulumi` module. |
### Variables ### Variables
@ -2309,10 +2370,11 @@ By default the module will be shown if any of the following conditions are met:
| --------- | ---------- | ------------------------------------ | | --------- | ---------- | ------------------------------------ |
| version | `v0.12.24` | The version of `pulumi` | | version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack | | stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi] [pulumi]
symbol = "🛥 " symbol = "🛥 "
format = "[$symbol$stack]($style) " format = "[$symbol$stack]($style) "
``` ```
## PureScript ## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2702,7 +2763,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| indicator | | Mirrors the value of `indicator` for currently used shell. | | indicator | | Mirrors the value of `indicator` for currently used shell. |
| style\* | | Mirrors the value of option `style`. | | 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 ### Examples
@ -2740,7 +2801,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status ## 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`. The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer.
::: tip ::: tip
@ -2812,7 +2873,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting | | `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes | | `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | | `pipestatus_format` | `\\[$pipestatus\\] => [$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. | | `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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[status] [status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) ' format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true map_symbol = true
disabled = false disabled = false
``` ```
## Sudo ## 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
```toml ```toml
# ~/.config/starship.toml # ~/.config/starship.toml
[sudo] [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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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. | | time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### Example
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V ## 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 `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 file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file - 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` | | 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 ### 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` | | symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` | | 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 ### 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` | | symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` | | 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 #### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml # ~/.config/starship.toml
[custom.foo] [custom.foo]
command = "echo foo" # shows output of command command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """ when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)" format = " transcending [$output]($style)"
[custom.time] [custom.time]
command = "time /T" command = "time /T"
extensions = ["pst"] # filters *.pst files extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
``` ```

View File

@ -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? ## 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? ## I see symbols I don't understand or expect, what do they mean?

View File

@ -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)). - 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: <details>
<summary>Android</summary>
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` |
</details>
##### From prebuilt binary, with Shell: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
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. | 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. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### With [Scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
Add the following to the end of `~/.bashrc`: <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source Add the following to the end of `~/.bashrc`:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
Add the following to the end of `~/.zshrc`: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
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 ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
Add the following to the end of `~/.config/ion/initrc`: <details>
<summary>Fish</summary>
```sh Add the following to the end of `~/.config/fish/config.fish`:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**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 ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
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`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) Add the following to the end of `~/.tcshrc`:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua Add the following to the end of `~/.xonshrc`:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**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 ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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 ## 🤝 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. 🙏 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.
<p align="center"> <p align="center">
<br> <br>

View File

@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
error_symbol = "[✖](bold red)" error_symbol = "[✖](bold red)"
``` ```
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. _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 #### Command Duration

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -28,9 +28,9 @@ description: Starship - минимальная, быстрая и бесконе
</video> </video>
</div> </div>
### Требования ### Обязательные требования
- 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 #### 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 ```sh
Invoke-Expression (&starship init powershell) Invoke-Expression (&starship init powershell)
@ -119,7 +119,7 @@ description: Starship - минимальная, быстрая и бесконе
#### Elvish #### Elvish
::: warning Only elvish v0.17 or higher is supported. ::: ::: warning Поддерживается только elvish v0.17 или выше. :::
Добавьте следующую строку в конец `~/.elvish/rc.elv`: Добавьте следующую строку в конец `~/.elvish/rc.elv`:
@ -143,13 +143,13 @@ description: Starship - минимальная, быстрая и бесконе
#### Nushell #### 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 ```toml
startup = [ startup = [
"mkdir ~/.cache/starship", "mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu", "starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" "source ~/.cache/starship/init.nu",
] ]
prompt = "starship_prompt" prompt = "starship_prompt"
``` ```
@ -157,7 +157,7 @@ description: Starship - минимальная, быстрая и бесконе
#### Xonsh #### Xonsh
Add the following to the end of `~/.xonshrc`: Добавьте следующее в конец `~/.xonshrc`:
```sh ```sh
# ~/.xonshrc # ~/.xonshrc

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))() 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 ```bash
function blastoff(){ function blastoff(){
@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="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 ```bash
function blastoff(){ function blastoff(){
echo "🚀" echo "🚀"
} }
trap blastoff DEBUG # Trap DEBUG *before* running starship trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash) eval $(starship init bash)
set +o functrace
``` ```
## Custom pre-prompt and pre-execution Commands in PowerShell ## 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 ```bash
function set_win_title(){ 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 ```bash
starship_precmd_user_func="set_win_title" starship_precmd_user_func="set_win_title"
``` ```
In `zsh`, add this to the `precmd_functions` array: В `zsh`, добавьте это в массив `precmd_functions`:
```bash ```bash
precmd_functions+=(set_win_title) 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. 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 ```bash
function set_win_title(){ 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: Note: Continuation prompts are only available in the following shells:
- `bash` - `bash`
- `zsh` - `zsh`
- `PowerShell` - `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` - `bold`
- `italic` - `italic`
- `underline` - `underline`
- `dimmed` - `dimmed`
- `inverted` - `inverted`
- `bg:<color>` - `bg:<color>`
- `fg:<color>` - `fg:<color>`
- `<color>` - `<color>`
- `none` - `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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. где `<color>` является цветовым спецификатором (обсуждается ниже). `fg:<color>` and `<color>` 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`). - 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). - `#`, за которой следует шестизначное шестнадцатеричное число. Это определяет [шестнадцатеричный код цвета RGB](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). - Число от 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. Если для переднего плана/фона задано несколько цветов, то последняя из строк будет иметь приоритет.

File diff suppressed because it is too large Load Diff

View File

@ -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? ## 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? ## I see symbols I don't understand or expect, what do they mean?

View File

@ -169,163 +169,231 @@
- Установленный и включённый [шрифт Powerline](https://www.nerdfonts.com/) (например, [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). - Установленный и включённый [шрифт 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**: <details>
<summary>Android</summary>
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` |
</details>
##### Из прекомпилированного двоичного файла, с Shell: <details>
<summary>BSD</summary>
```sh Install Starship using any of the following package managers:
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Для обновления 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` |
**Примечание** - Значения по умолчанию из установочного скрипта могут быть переопределены. Для уточнения смотрите встроенную справку. </details>
```sh <details>
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help <summary>Linux</summary>
```
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` <br /> `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 </details>
brew install starship
```
<details>
<summary>macOS</summary>
##### С [Scoop](https://scoop.sh): Install the latest version for your system:
```powershell ```sh
scoop install starship 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 </details>
Добавьте следующее в конец `~/.bashrc`: <details>
<summary>Windows</summary>
```sh Install Starship using any of the following package managers:
# ~/.bashrc
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` |
</details>
#### 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 <details>
# ~/.config/fish/config.fish <summary>Bash</summary>
starship init fish | source Добавьте следующее в конец `~/.bashrc`:
```
```sh
eval "$(starship init bash)"
```
#### Zsh </details>
Добавьте следующее в конец `~/.zshrc`: <details>
<summary>Cmd</summary>
```sh 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:
# ~/.zshrc
eval "$(starship init zsh)" ```lua
``` load(io.popen('starship init cmd'):read("*a"))()
```
</details>
#### PowerShell <details>
<summary>Elvish</summary>
Добавьте следующее в конец `Microsoft.PowerShell_profile.ps1`. Вы можете проверить местоположение этого файла, запросив переменную `$PROFILE` в PowerShell. Обычно он находится в `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` или `~/.config/powershell/Microsoft.PowerShell_profile.ps1` на -Nix. Добавьте следующую строку в конец `~/.elvish/rc.elv`:
```powershell ```sh
Invoke-Expression (&starship init powershell) eval (starship init elvish)
``` ```
Note: Only Elvish v0.17+ is supported
#### Ion </details>
Добавьте следующее в конец `~/.config/ion/initrc`: <details>
<summary>Fish</summary>
```sh Добавьте следующее в конец `~/.config/fish/config.fish`:
# ~/.config/ion/initrc
eval $(starship init ion) ```fish
``` starship init fish | source
```
</details>
#### Elvish <details>
<summary>Ion</summary>
**Warning** Only elvish v0.17 or higher is supported. Добавьте следующую строку в конец `~/.elvish/rc.elv`: Добавьте следующее в конец `~/.config/ion/initrc`:
```sh ```sh
# ~/.elvish/rc.elv eval $(starship init ion)
```
eval (starship init elvish) </details>
```
<details>
<summary>Nushell</summary>
#### 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 </details>
# ~/.tcshrc
eval `starship init tcsh` <details>
``` <summary>PowerShell</summary>
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`: </details>
```sh <details>
# ~/.xonshrc <summary>Tcsh</summary>
execx($(starship init xonsh)) Добавьте следующее в конец `~/.tcshrc`:
```
```sh
eval `starship init tcsh`
```
#### Cmd </details>
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: <details>
<summary>Xonsh</summary>
```lua Добавьте следующее в конец `~/.xonshrc`:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))() ```python
``` execx($(starship init xonsh))
```
</details>
#### Nushell <details>
<summary>Zsh</summary>
**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 ```sh
startup = [ eval "$(starship init zsh)"
"mkdir ~/.cache/starship", ```
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu" </details>
]
prompt = "starship_prompt" ### 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/). Если Вы свободно владеете иностранным языком отличным от английского, мы высоко оценим любую помощь в переводе нашей документации на другие языки и поддержании ее в актуальном состоянии. Если вы хотите помочь, переводы могут быть сделаны на платформе [Starship Crowdin](https://translate.starship.rs/).
@ -335,11 +403,11 @@
Пожалуйста, ознакомьтесь с этими предыдущими работами, которые помогли вдохновить создание Starship. 🙏 Пожалуйста, ознакомьтесь с этими предыдущими работами, которые помогли вдохновить создание 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.
<p align="center"> <p align="center">
<br> <br>

View File

@ -11,7 +11,7 @@ There are so many platforms out there that they didn't fit into the main README.
## [Chocolatey](https://chocolatey.org) ## [Chocolatey](https://chocolatey.org)
### Требования ### Обязательные требования
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey. 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) ## [termux](https://termux.com)
### Требования ### Обязательные требования
```sh ```sh
pkg install getconf pkg install getconf

View File

@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
error_symbol = "[✖](bold red)" error_symbol = "[✖](bold red)"
``` ```
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. _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.
#### Длительность команды #### Длительность команды

View File

@ -60,6 +60,9 @@ symbol = " "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs]
symbol = " "
[package] [package]
symbol = " " symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'
[cmd_duration] [cmd_duration]
format = '\[[⏱ $duration ]($style)\]' format = '\[[⏱ $duration]($style)\]'
[cobol] [cobol]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

Some files were not shown because too many files have changed in this diff Show More