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

View File

@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### مثال
@ -178,15 +180,15 @@ continuation_prompt = "▶▶"
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<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.
@ -194,8 +196,8 @@ The `none` token overrides all other tokens in a string if it is not part of a `
A color specifier can be one of the following:
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la
add_newline = true
# Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
# Disable the package module, hiding it from the prompt completely
[package]
@ -75,7 +75,7 @@ Format strings are the format that a module prints all its variables with. Most
A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`.
For example:
على سبيل المثال:
- `$version` is a format string with a variable named `version`.
- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`.
@ -89,7 +89,7 @@ The first part, which is enclosed in a `[]`, is a [format string](#format-string
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
For example:
على سبيل المثال:
- `[on](red bold)` will print a string `on` with bold text colored red.
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
@ -112,7 +112,7 @@ Note that what styling looks like will be controlled by your terminal emulator.
A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty.
For example:
على سبيل المثال:
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options.
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
### مثال
```toml
@ -185,6 +184,7 @@ format = "$all"
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\
$cmake\
$cobol\
$container\
$dart\
$deno\
$dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml
# Move the directory to the second line
format="$all$directory$character"
format = "$all$directory$character"
```
## AWS
@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### مثال
```toml
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
threshold = 10
style = "bold red"
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
threshold = 30
style = "bold yellow"
discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed
```
## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## COBOL / GNUCOBOL
@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options
| Option | الافتراضي | الوصف |
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
::: tip
Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
:::
| Option | الافتراضي | الوصف |
| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
| `notification_timeout` | | Duration to show notification for (in milliseconds). If unset, notification timeout will be determined by daemon. Not all notification daemons honor this option. |
### Variables
@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s
| duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
format = "[$symbol$environment](dimmed green) "
```
## Container
The `container` module displays a symbol and container name, if inside a container.
### Options
| Option | الافتراضي | الوصف |
| ---------- | ------------------------------------ | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
| Variable | مثال | الوصف |
| --------- | ------------------- | ------------------------------------ |
| name | `fedora-toolbox:35` | The name of the container |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### مثال
```toml
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
```
## Crystal
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met:
@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno
The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options
@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -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 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.
Example: following configuration will display value of USER environment variable
```toml
# ~/.config/starship.toml
[env_var.USER]
default = "unknown user"
```
:::
### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -1045,6 +1074,7 @@ default = "unknown shell"
```
Displaying multiple environmental variables:
```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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
# ~/.config/starship.toml
format="AA $fill BB $fill CC"
format = "AA $fill BB $fill CC"
[fill]
symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
```
AA -------------------------------------------- BB -------------------------------------------- CC
```
## 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| 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. |
| style\* | Mirrors the value of option `style` |
\*: This variable 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`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰"
diverged = "😵"
up_to_date = "✓"
untracked = "🤷"
untracked = "🤷"
stashed = "📦"
modified = "📝"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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]
ssh_only = false
format = "on [$hostname](bold red) "
format = "on [$hostname](bold red) "
trim_at = ".companyname.com"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
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:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| 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`. |
| `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. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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 = "∴ "
```
## 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
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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. |
| `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_files` | `["package.json", ".node-version"]` | Which filenames 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
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
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options
| Option | الافتراضي | الوصف |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
| Option | الافتراضي | الوصف |
| ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `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` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
### 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` |
| stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi]
symbol = "🛥 "
format = "[$symbol$stack]($style) "
```
## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -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. |
| style\* | | Mirrors the value of option `style`. |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
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
@ -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 |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `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 |
| `disabled` | `true` | Disables the `status` module. |
@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
```toml
# ~/.config/starship.toml
[status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true
disabled = false
```
## Sudo
@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
```toml
# ~/.config/starship.toml
[sudo]
@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met:
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### مثال
@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
#### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml
[custom.foo]
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)"
[custom.time]
command = "time /T"
extensions = ["pst"] # filters *.pst files
extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
```

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?
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?

View File

@ -169,159 +169,227 @@
- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك (على سبيل المثال، جرب [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
### البدء مع Starship
### Step 1. Install Starship
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
Select your operating system from the list below to view installation instructions:
1. تثبيت **starship**:
<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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
لتحديث Starship نفسه، أعد تشغيل البرنامج النصي أعلاه. سيتم استبدال الإصدار الحالي بدون لمس تكوين Starship.
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**ملاحظة** - يمكن تجاوز الإعدادات الافتراضية لنص التثبيت لرؤية المساعدة المدمجة.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### بإستخدام [Scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. أضف ما يلي إلى ملف تكوين موجه الأوامر الخاص بك:
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
أضف ما يلي إلى نهاية `~/.bashrc`:
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<summary>Bash</summary>
starship init fish | source
```
أضف ما يلي إلى نهاية `~/.bashrc`:
```sh
eval "$(starship init bash)"
```
#### Zsh
</details>
أضف ما يلي إلى نهاية `~/.zshrc`:
<details>
<summary>Cmd</summary>
```sh
# ~/.zshrc
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
eval (starship init elvish)
```
Note: Only Elvish v0.17+ is supported
#### Ion
</details>
أضف ما يلي إلى نهاية `~/.config/ion/initrc`:
<details>
<summary>Fish</summary>
```sh
# ~/.config/ion/initrc
أضف ما يلي إلى نهاية `~/.config/fish/config.fish`:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
أضف ما يلي إلى نهاية `~/.xonshrc`:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Step 3. Configure Starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
If you're looking to further customize Starship:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝 المساهمة
@ -335,11 +403,11 @@
يرجى التحقق من هذه الأعمال السابقة التي ساعدت على إنشاء starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<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)"
```
*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

View File

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

View File

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

View File

@ -32,9 +32,9 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
## فرمانە کڕیاڕخوازەکانی pre-prompt و pre-execution لە Bashـدا
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
بەپێچەوانەی شێلەکانی دیکە Bash هیچ چوارچێوەیەکی فەرمی preexec/precmdـی نییە. لەبەر ئەوە، دابین کردنی قولابە تەواو کڕیارخوازکراوەکان ئاسان نییە لە `Bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### نموونە
@ -178,24 +180,24 @@ continuation_prompt = "▶▶"
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `تۆخ`
- `لار`
- `بنهێڵ`
- `کاڵ کراو`
- `پێچەوانە کراو`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `هیچ`
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.
A color specifier can be one of the following:
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
add_newline = true
# Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
# Disable the package module, hiding it from the prompt completely
[package]
@ -75,7 +75,7 @@ Format strings are the format that a module prints all its variables with. Most
A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`.
For example:
بۆ نموونە:
- `$version` is a format string with a variable named `version`.
- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`.
@ -89,7 +89,7 @@ The first part, which is enclosed in a `[]`, is a [format string](#format-string
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
For example:
بۆ نموونە:
- `[on](red bold)` will print a string `on` with bold text colored red.
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
@ -112,7 +112,7 @@ Note that what styling looks like will be controlled by your terminal emulator.
A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty.
For example:
بۆ نموونە:
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options.
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
### نموونە
```toml
@ -185,6 +184,7 @@ format = "$all"
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\
$cmake\
$cobol\
$container\
$dart\
$deno\
$dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml
# Move the directory to the second line
format="$all$directory$character"
format = "$all$directory$character"
```
## AWS
@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### نموونە
```toml
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
threshold = 10
style = "bold red"
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
threshold = 30
style = "bold yellow"
discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed
```
## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## COBOL / GNUCOBOL
@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options
| Option | Default | Description |
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
::: tip
Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
:::
| Option | Default | Description |
| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
| `notification_timeout` | | Duration to show notification for (in milliseconds). If unset, notification timeout will be determined by daemon. Not all notification daemons honor this option. |
### Variables
@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s
| duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
format = "[$symbol$environment](dimmed green) "
```
## Container
The `container` module displays a symbol and container name, if inside a container.
### Options
| Option | Default | Description |
| ---------- | ------------------------------------ | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
| گۆڕاو | نموونە | Description |
| --------- | ------------------- | ------------------------------------ |
| name | `fedora-toolbox:35` | The name of the container |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### نموونە
```toml
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
```
## Crystal
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met:
@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno
The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options
@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -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 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.
Example: following configuration will display value of USER environment variable
```toml
# ~/.config/starship.toml
[env_var.USER]
default = "unknown user"
```
:::
### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -1045,6 +1074,7 @@ default = "unknown shell"
```
Displaying multiple environmental variables:
```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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
# ~/.config/starship.toml
format="AA $fill BB $fill CC"
format = "AA $fill BB $fill CC"
[fill]
symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
```
AA -------------------------------------------- BB -------------------------------------------- CC
```
## 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| 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. |
| style\* | Mirrors the value of option `style` |
\*: This variable 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`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰"
diverged = "😵"
up_to_date = "✓"
untracked = "🤷"
untracked = "🤷"
stashed = "📦"
modified = "📝"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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]
ssh_only = false
format = "on [$hostname](bold red) "
format = "on [$hostname](bold red) "
trim_at = ".companyname.com"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
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:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| 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`. |
| `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. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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 = "∴ "
```
## 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
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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. |
| `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_files` | `["package.json", ".node-version"]` | Which filenames 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
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
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options
| Option | Default | Description |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
| Option | Default | Description |
| ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `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` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
### 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` |
| stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi]
symbol = "🛥 "
format = "[$symbol$stack]($style) "
```
## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -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. |
| style\* | | Mirrors the value of option `style`. |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
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
@ -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 |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `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 |
| `disabled` | `true` | Disables the `status` module. |
@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
```toml
# ~/.config/starship.toml
[status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true
disabled = false
```
## Sudo
@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
```toml
# ~/.config/starship.toml
[sudo]
@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met:
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### نموونە
@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
#### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml
[custom.foo]
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)"
[custom.time]
command = "time /T"
extensions = ["pst"] # filters *.pst files
extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
```

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?
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?

View File

@ -99,7 +99,7 @@
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
alt="Português do Brasil"
alt="پورتوگالیی بەڕازیل"
/></a>
&nbsp;
<a
@ -165,159 +165,227 @@
- فۆنتێکی [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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
بۆ نوێکردنەوەی Starship خۆی، نووسینەکەی سەرەوە ڕەن بکەوە. وەشانی ئێستا دەگۆڕێت بێ ئەوەی دەسکاری ڕێکخستنەکانی Starship بکات.
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**تێبینی** - بنەڕەتییەکانی سکریپتی دامەزراندن ئەتوانرێ بگۆڕدرێ سەیری یارمەتی نێوخۆیی بکە.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### لەگەڵ [Scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. نوسینی init زیادبکە بۆ فایلی ڕێکخستنی شێڵەکەت:
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.bashrc`:
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<summary>Bash</summary>
starship init fish | source
```
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.bashrc`:
```sh
eval "$(starship init bash)"
```
#### Zsh
</details>
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.zshrc`:
<details>
<summary>Cmd</summary>
```sh
# ~/.zshrc
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
eval (starship init elvish)
```
Note: Only Elvish v0.17+ is supported
#### Ion
</details>
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/ion/initrc`:
<details>
<summary>Fish</summary>
```sh
# ~/.config/ion/initrc
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/fish/config.fish`:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
ئەمەی دێت زیادبکە بۆ کۆتایی پەڕگەی `~/.xonshrc`:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Step 3. Configure Starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
If you're looking to further customize Starship:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝 بەژداریکردن
@ -331,11 +399,11 @@
تکایە ئەم کارە کۆنانە سەیربکەوە کە ئیلهامی دروستکردنی starship دا. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - یەکێ لە promptـەکانی ZSH بۆ ئاسمانەوانان.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - ڕووکاری robbyrussellـی شێڵ نەناس کە بە جاڤاسکریپت نووسراوە.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - یەکێ لە promptـە شێڵ نەناسە دڵخوازکراوەکان کە لە powerline دەچێ لەگەڵ ئایکۆندا.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<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)"
```
*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

View File

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

View File

@ -119,7 +119,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
#### Elvish
::: warning Only elvish v0.17 or higher is supported. :::
::: warning Nur elvish v0.17 oder höher ist unterstützt. :::
Trage folgendes am Ende von `~/.config/fish/rc.elv` ein:
@ -147,9 +147,9 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu",
]
prompt = "starship_prompt"
```

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
## Benutzerdefinierte Pre-Prompt- und Pre-Execution-Befehle in der Bash
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Starship bietet daher die begrenzte Möglichkeit, eigene Funktionen in das prompt rendering Verfahren einzufügen:
Die Bash Shell hat, im Gegensatz zu vielen anderen Shells, kein konventionelles preexec/precmd Framework. Daher gestaltet es sich schwierig, vollständig anpassbare Hooks für `bash` anzubieten. Starship bietet daher die begrenzte Möglichkeit, eigene Funktionen in das prompt rendering Verfahren einzufügen:
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
- Um eine benutzerdefinierte Funktion kurz vor Anzeige der Eingabeaufforderung auszuführen, definiere eine neue Funktion und weise den Namen `starship_precmd_user_func` zu. Um beispielsweise eine Rakete anzuzeigen, bevor die Eingabeaufforderung erscheint, würde man folgendes tun
```bash
function blastoff(){
@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- Um eine benutzerdefinierte Funktion direkt vor der Ausführung eines Befehls auszulösen, kann man den [`DEBUG` trap](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/) Mechanismus verwenden. Allerdings **muss** das DEBUG Signal _vor_ der Initialisierung von Starship getrapped werden! Starship kann den Wert der DEBUG-trap speichern. Wenn der Wert der DEBUG-trap überschrieben wird nachdem Starship gestartet ist kann es zu Fehlern im Bezug auf die verwendete DEBUG-trap kommen.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
@ -67,27 +69,27 @@ function Invoke-Starship-PreCommand {
}
```
## Change Window Title
## Fenstertitel anpassen
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish ist standardmäßig so konfiguriert. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
First, define a window title change function (identical in bash and zsh):
Zuerst wird eine Funktion definiert um den Fenstertitel zu ändern ( für bash und zsh ist die Funktion identisch):
```bash
function set_win_title(){
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
echo -ne "\033]0; DEIN_FENSTERTITEL_HIER \007"
}
```
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
Sie können Variablen verwenden, um diesen Titel anzupassen (`$USER`, `$HOSTNAME`, `$PWD`).
In `bash`, set this function to be the precmd starship function:
Für `bash` muss die Funktion als "precmd starship"-Funktion gesetzt werden:
```bash
starship_precmd_user_func="set_win_title"
```
In `zsh`, add this to the `precmd_functions` array:
Füge dies in `Zsh` zum `precmd_functions`-Array hinzu:
```bash
precmd_functions+=(set_win_title)
@ -95,7 +97,7 @@ precmd_functions+=(set_win_title)
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
Zum Beispiel, wenn sie ihr aktuelles Verzeichnis als Terminal Title anzeigen wollen, fügen Sie folgenden Code-Schnipsel zu ihrer `~/.bashrc` oder `~/.zshrc` hinzu:
```bash
function set_win_title(){
@ -151,51 +153,51 @@ Produces a prompt like the following:
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
```
## Continuation Prompt
## Fortsetzungsprompt
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
Einige Shells unterstützen einen speziellen Fortsetzungsprompt zusätzlich zum normalen Prompt. Dieser Prompt wird anstelle des normalen Prompts ausgegeben, wenn der Benutzer ein unvollständiges Kommando eingegeben hat (etwa wie eine einzelne linke Klammer oder ein einzelnes Anführungszeichen).
Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `"[∙](bright-black) "`.
Starship kann das Aussehen des Fortsetzungs-Prompts mit der `continuation_prompt` Option einstellen. The default prompt is `"[∙](bright-black) "`.
Note: `continuation_prompt` should be set to a literal string without any variables.
Hinweis: Die `continuation_prompt` Anweisung sollte auf einen literalen String ohne Variablen gesetzt werden.
Note: Continuation prompts are only available in the following shells:
Hinweis: Fortsetzungs-Prompts sind nur für folgende Shells verfügbar:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### Beispiel
```toml
# ~/.config/starship.toml
# A continuation prompt that displays two filled in arrows
# Ein Fortsetzungs-Prompt der 2 ausgefüllte Pfeile darstellt
continuation_prompt = "▶▶"
```
## Style-Strings
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben keine Groß- und Kleinschreibung (z.B. `bold` und `BoLd` werden als dieselbe Zeichenkette betrachtet). Jedes Wort kann eines der folgenden sein:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic`
- `underline`
- `dimmed`
- `invertiert`
- `bg:<color>`
- `fg:<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.
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`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- Eine `#` gefolgt von einer sechsstelligen Hexadezimalnummer. Dies ergibt einen [RGB hex Farbcode](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Eine Zahl zwischen 0-255. Dies ergibt einen [8-bit ANSI-Farbcode](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Wenn mehrere Farben für Vordergrund oder Hintergrund angegeben werden, hat die letzte Farbe der Zeichenkette Priorität.

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?
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?

View File

@ -103,7 +103,7 @@
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
alt="Português do Brasil"
alt="Portugiesisch (Brasilien)"
/></a>
&nbsp;
<a
@ -111,7 +111,7 @@
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
alt="Русский"
alt="Russisch"
/></a>
&nbsp;
<a
@ -119,7 +119,7 @@
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
alt="Tiếng Việt"
alt="Vietnamesisch"
/></a>
&nbsp;
<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)).
### 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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
Um Starship selbst zu aktualisieren, lasse das Skript oben nochmal laufen. Es wird die vorhandene Version ersetzen, ohne die Konfiguration von Starship zu berühren.
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**Hinweis** - Die Standardwerte des Installationsskripts können überschrieben werden, sehen Sie die integrierte Hilfe.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### Mit [scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. Füge das init-Skript zur Konfigurationsdatei deiner Shell hinzu:
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
Trage folgendes am Ende der `~/.bashrc` ein:
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<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
# ~/.zshrc
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
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
# ~/.config/ion/initrc
Trage folgendes am Ende der `~/.config/fish/config.fish` ein:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
Füge folgendes an das Ende von `~/.xonshrc` hinzu:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Step 3. Configure Starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
If you're looking to further customize Starship:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝 Mitwirken
@ -329,17 +397,17 @@ Wir laden Leute **aller Erfahrungsstufen** herzlich ein mitzumachen! Falls du di
Wenn du eine andere Sprache flüssig sprichts, würden wir uns sehr freuen wenn du helfen würdest die Dokumentation in anderen Sprachen auf dem aktuellsten Stand zu halten. Hier kannst du bei der Übersetzung helfen [Starship Crowdin](https://translate.starship.rs/).
Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Leitfaden zum Mitwirken](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord-Server](https://discord.gg/8Jzqu3T) vorbei. 👋
Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord server](https://discord.gg/8Jzqu3T) vorbei. 👋
## 💭 Inspiriert durch
Checkt bitte diese älteren Projekte, die das Entstehen von Starhip inspiriert haben. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Ein ZSH-Prompt für Astronauten.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Ein Shell-übergreifendes und in JavaScript geschriebenes robbyrussell-Theme.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - Shell-übergreifendes, anpassbares und Powerline-ähnliches Prompt mit Symbolen.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<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)"
```
*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

View File

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

View File

@ -119,7 +119,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
#### Elvish
::: warning Only elvish v0.17 or higher is supported. :::
::: advertencia Solo se admite Elvish v0.17 o superior. :::
Añade el siguiente código al final de `~/.elvish/rc.elv`:
@ -147,9 +147,9 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu",
]
prompt = "starship_prompt"
```

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
## Comandos pre-prompt y pre-ejecucución personalizados en Bash
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Sin embargo, Starship te da la posibilidad de insertar de forma limitada tus propias funciones en el proceso de renderizado del prompt:
Bash no posee un framework oficial de preexec/precmd como la mayoría de los demás intérpretes de comandos. Debido a esto, es difícil proporcionar "hooks" totalmente personalizables en `Bash`. Sin embargo, Starship te da la posibilidad de insertar de forma limitada tus propias funciones en el proceso de renderizado del prompt:
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
- Para ejecutar una función personalizada previa al renderizado del prompt, define una nueva función y asigna su nombre a `starship_precmd_user_func`. Por ejemplo, para dibujar un cohete antes del prompt, se puede realizar así:
```bash
function blastoff(){
@ -45,21 +45,23 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- Para ejecutar una función personalizada antes de que un comando sea ejecutado, es posible usar el [mecanismo de trampa `DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No obstante, ¡**debes** atrapar la señal DEBUG _antes_ de inicializar Starship! Starship puede preservar el valor de la trampa DEBUG, pero si la trampa es reemplazada después de que Starship inicie, alguna funcionalidad fallará.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
## Comandos pre-prompt y pre-ejecución personalizados en PowerShell
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Sin embargo, Starship te da la posibilidad de insertar de forma limitada tus propias funciones en el proceso de renderizado del prompt:
Powershell no posee un framework oficial de preexec/precmd como la mayoría de los demás intérpretes de comandos. Debido a esto, es difícil proporcionar "hooks" totalmente personalizables en `Powershell`. Sin embargo, Starship te da la posibilidad de insertar de forma limitada tus propias funciones en el proceso de renderizado del prompt:
Create a function named `Invoke-Starship-PreCommand`
Crea una función llamada `Invoke-Starship-PreCommand`
```powershell
function Invoke-Starship-PreCommand {
@ -69,33 +71,33 @@ function Invoke-Starship-PreCommand {
## Cambiar título de la ventana
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
Algunos intérpretes de comandos van a cambiar automáticamente el título de la ventana por ti (p. ej., para mostrar tu directorio actual). Fish incluso lo hace por defecto. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
First, define a window title change function (identical in bash and zsh):
Primero, define una función para el cambio de título de la ventana (idéntico en Bash y zsh):
```bash
function set_win_title(){
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
echo -ne "\033]0; TU_TÍTULO_DE_VENTANA_AQUÍ \007"
}
```
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
Puedes usar variables para personalizar este título (`$USER`, `$HOSTNAME` y `$PWD` son opciones populares).
In `bash`, set this function to be the precmd starship function:
En `Bash`, establece que esta función sea la función precmd de Starship:
```bash
starship_precmd_user_func="set_win_title"
```
In `zsh`, add this to the `precmd_functions` array:
En `zsh`, añade esto al array `precmd_functions`:
```bash
precmd_functions+=(set_win_title)
```
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
Si te gusta el resultado, añade estas líneas a tu archivo de configuración del intérprete de comandos (`~/.bashrc` o `~/.zsrhc`) para hacerlo permanente.
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
Por ejemplo, si quieres mostrar tu directorio actual en el título de la pestaña de la terminal, añade el siguiente fragmento a tu `~/.bashrc` o `~/.zshrc`:
```bash
function set_win_title(){
@ -114,7 +116,7 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
También puede establecer una salida similar con PowerShell creando una función llamada `Invoke-Starship-PreCommand`.
```powershell
# edit $PROFILE
@ -125,27 +127,27 @@ function Invoke-Starship-PreCommand {
Invoke-Expression (&starship init powershell)
```
## Enable Right Prompt
## Gabilitar Prompt Derecho
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
Algunos intérpretes de órdenes soportan un prompt derecho que se renderiza en la misma línea que la entrada. Starship puede establecer el contenido del prompt correcto usando la opción `right_format`. Cualquier módulo que pueda ser usado en `format` también es soportado en `right_format`. La variable `$all` solo contendrá módulos no utilizados explícitamente en `format` o `right_format`.
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo fill](/config/#fill).
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd.
### Ejemplo
```toml
# ~/.config/starship.toml
# ~/.config/starship. oml
# A minimal left prompt
# Un prompt izquierdo mínimo
format = """$character"""
# move the rest of the prompt to the right
# mueve el resto del mensaje a la derecha
right_format = """$all"""
```
Produces a prompt like the following:
Produce un prompt como el siguiente:
```
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### Ejemplo
@ -176,26 +178,26 @@ continuation_prompt = "▶▶"
## Cadenas de estilo
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
Las cadenas de estilo son una lista de palabras, separadas por espacios en blanco. Las palabras no son sensibles a mayúsculas (es decir, `negrita` y `NeGriTa` se consideran la misma cadena). Cada palabra puede ser una de las siguientes:
- `negrita`
- `cursiva`
- `subrayado`
- `atenuado`
- `invertido`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `ninguno`
- `negrita`
- `cursiva`
- `subrayado`
- `atenuado`
- `invertido`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `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`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- Un `#` seguido de un número hexadecimal de seis dígitos. Esto especifica un [código hexadecimal de color RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Un número entre 0-255. Esto especifica un [Código de color ANSI de 8-bits](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Si se especifican varios colores para el primer plano/fondo, el último en la cadena tendrá prioridad.

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?
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?

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)).
### 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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
Para actualizar Starship, vuelve a ejecutar el guión anterior. Reemplazará la versión actual sin tocar la configuración de Starship.
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**Nota** - Los valores por defecto del guión de instalación se pueden anular (ver la ayuda incorporada).
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### Con [Scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. Añade el guión de inicio al archivo de configuración de tu intérprete de comandos:
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
Añade el siguiente código al final de `~/.bashrc`:
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<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
# ~/.zshrc
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
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
# ~/.config/ion/initrc
Añade el siguiente código al final de `~/.config/fish/config.fish`:
eval $(starship init ion)
```
```fish
starship init fish | source
```
</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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
Añade lo siguiente al final de `~/.xonshrc`:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Step 3. Configure Starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
If you're looking to further customize Starship:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝 Colaborando
¡Siempre estamos buscando colaboradores de **todos los niveles y habilidades**! Si estas buscando una manera fácil de ayudar este proyecto, puedes intentar resolver un problema con la etiqueta "[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)".
¡Siempre estamos buscando colaboradores de **todos los niveles y habilidades**! Si estás interesado en empezar en el proyecto con algo sencillo, prueba con un problema etiquetado como [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
Si hablas con fluidez en un idioma que no sea inglés, agradecemos mucho cualquier ayuda para mantener nuestros documentos traducidos y actualizados en otros idiomas. Si quieres ayudar, puedes contribuir con las traducciones en el [Crowdin de Starship](https://translate.starship.rs/).
Si quieres ayudar a colaborar a Starship, por favor mira nuestra [Guía de Colaboradores](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Además, siéntete libre de entrar en nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y di "¡Hola!". 👋
Si estás interesado en ayudar contribuyendo a starship, por favor échale un vistazo a [Guía de Colaboración](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). También siéntete libre de pasarte por nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y saludarnos. 👋
## 💭 Inspirado por
Por favor, revisa estos proyectos previos que inspiraron la creación de Starship. 🙏
Por favor, revisa estos proyectos que inspiraron la creación de Starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt ZSH para astronautas.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - robbyrussel, tema multi-intérprete de comandos escrito en JavaScript.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - Un prompt multi-intérprete de comandos personalizable, basada en Powerline con iconos.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<br>
@ -348,4 +416,4 @@ Por favor, revisa estos proyectos previos que inspiraron la creación de Starshi
## 📝 Licencia
Derechos de autor © 2019-presente, [Colaboradores de Starship](https://github.com/starship/starship/graphs/contributors).<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)"
```
*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

View File

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

View File

@ -147,9 +147,9 @@ description: Starship est une invite minimaliste, ultra-rapide et hautement pers
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu",
]
prompt = "starship_prompt"
```
@ -168,7 +168,7 @@ description: Starship est une invite minimaliste, ultra-rapide et hautement pers
#### Cmd
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
Vous devez utiliser [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) avec Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
```lua
-- starship.lua

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
## Commandes pré-commande et pré-exécution personnalisées en Bash
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt :
Bash n'a pas de structure officielle préexec/précmd comme la plupart des autres shells. C'est pourquoi il est difficile de fournir des hooks entièrement personnalisables dans `bash`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt :
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
- Pour exécuter une fonction personnalisée juste avant que le prompt ne soit dessiné, définissez une nouvelle fonction et assignez son nom à `starship_precmd_user_func`. Par exemple, pour dessiner une fusée avant la commande, vous feriez
```bash
function blastoff(){
@ -45,21 +45,23 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- Pour exécuter une fonction personnalisée juste avant l'exécution d'une commande, vous pouvez utiliser le [ mécanisme d'interruption du signal ` DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Cependant, vous **devez** piéger le signal DEBUG _avant_ l'initialisation de Starship ! Starship peut préserver la valeur du piège DEBUG, mais si le piège est écrasé après le démarrage de Starship, certaines fonctionnalités vont casser.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
## Commandes pré-invite et pré-exécution personnalisées dans PowerShell
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt :
Powershell n'a pas de système de préexec/précmd officiel comme la plupart des autres shells. C'est pourquoi il est difficile de fournir des hooks entièrement personnalisables dans `powershell`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt :
Create a function named `Invoke-Starship-PreCommand`
Créez une fonction nommée `Invoke-Starship-PreCommand`
```powershell
function Invoke-Starship-PreCommand {
@ -67,35 +69,35 @@ function Invoke-Starship-PreCommand {
}
```
## Change Window Title
## Changer le titre de la fenêtre
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
Certaines commandes du shell changeront automatiquement le titre de la fenêtre (par exemple, pour refléter votre répertoire de travail). Fish le fait même par défaut. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
First, define a window title change function (identical in bash and zsh):
Tout d'abord, définissez une fonction de changement de titre de fenêtre (identique en bash et zsh) :
```bash
function set_win_title(){
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
function set_titre_fenetre(){
echo -ne "\033]0; VOTRE_TITRE_ICI\007"
}
```
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
Vous pouvez utiliser des variables pour personnaliser ce titre (`$USER`, `$HOSTNAME`, et `$PWD` sont des choix populaires).
In `bash`, set this function to be the precmd starship function:
Dans `bash`, définissez cette fonction comme la fonction précommande Starship :
```bash
starship_precmd_user_func="set_win_title"
starship_precmd_user_func="set_titre_fenetre"
```
In `zsh`, add this to the `precmd_functions` array:
Dans `zsh`, ajoutez ceci au tableau `precmd_functions` :
```bash
precmd_functions+=(set_win_title)
precmd_functions+=(set_titre_fenetre)
```
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
Si vous aimez le résultat, ajoutez ces lignes à votre fichier de configuration shell (`~/.bashrc` ou `~/.zshrc`) pour le rendre permanent.
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
Par exemple, si vous voulez afficher votre répertoire actuel dans le titre de l'onglet de votre terminal, ajoutez le code suivant à votre `~/.bashrc` ou `~/.zshrc`:
```bash
function set_win_title(){
@ -125,7 +127,7 @@ function Invoke-Starship-PreCommand {
Invoke-Expression (&starship init powershell)
```
## Enable Right Prompt
## Mettre 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`.
@ -138,20 +140,20 @@ Note: The right prompt is a single line following the input location. To right a
```toml
# ~/.config/starship.toml
# A minimal left prompt
# Une invite minimale à gauche
format = """$character"""
# move the rest of the prompt to the right
# déplace le reste de linvite à droite
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
```
## Continuation Prompt
## Invite de continuation
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### Exemple
@ -176,26 +178,26 @@ continuation_prompt = "▶▶"
## Chaînes de style
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
Les chaînes de style sont une liste de mots, séparés par des espaces blancs. Les mots ne sont pas sensibles à la casse (` bold ` et ` boLd ` sont considérés comme la même string). Chaque mot peut être l'un des suivants :
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic (italique)`
- `underline`
- `dimmed`
- `inverted`
- `bg:<couleur>`
- `fg:<couleur>`
- `<couleur>`
- `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`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- Un `#` suivi d'un nombre hexadécimal de six chiffres. Ceci spécifie un [ Code hexadécimal de couleur RVB ](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Un nombre entre 0 et 255. Ceci spécifie un [code de couleur ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Si plusieurs couleurs sont spécifiées pour le premier plan/arrière-plan, la dernière dans le string prendra la priorité.

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.`?
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 ?

View File

@ -155,7 +155,7 @@
- **Universel:** fonctionne avec n'importe quel shell, sur n'importe quel système d'exploitation.
- **Intelligent:** affiche les informations utiles en un coup d'œil.
- **Riche en fonctionnalités:** supporte tous vos outils favoris.
- **Facile:** rapide à installer - commencez à l'utiliser en quelques minutes.
- **Facile:** rapide à installer  commencez à l'utiliser en quelques minutes.
<p align="center">
<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)).
### 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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
Pour mettre à jour Starship, relancez le script ci-dessus. Cela remplacera la version actuelle sans toucher à la configuration de Starship.
| Distribution | Dépôt | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**Note** - Les valeurs par défaut du script d'installation peuvent être remplacées, voir l'aide intégrée.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### Avec [Scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. Ajoutez le script 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
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Dépôt | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<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
# ~/.zshrc
Vous devez utiliser [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) avec Cmd. Créez un fichier avec le chemin `%LocalAppData%\clink\starship.lua` et le contenu suivant:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
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
# ~/.config/ion/initrc
Ajoutez le code suivant à la fin de `~/.config/fish/config.fish`:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
Ajouter ce qui suit à la fin de `~/.xonshrc`:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Étape 3. Configurer Starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
If you're looking to further customize Starship:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝 Contribuer
Nous sommes toujours à la recherche de contributeurs de **tous niveaux de compétence**! Si vous cherchez à faciliter votre entrée dans le projet, essayez un [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
Nous sommes toujours à la recherche de contributeurs de **tous les niveaux de compétence**! Si vous cherchez à faciliter votre entrée dans le projet, essayez un [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
Si vous parlez couramment une langue autre que l'anglais, nous apprécions grandement toute aide pour que nos documents soient traduits et mis à jour dans d'autres langues. Si vous souhaitez nous aider, les traductions peuvent êtres suggérées sur le [Crowdin de Starship](https://translate.starship.rs/).
Si vous êtes intéressé pour aider et contribuer à Starship, veuillez jeter un coup d'œil à notre [Guide de contribution](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Aussi, n'hésitez pas à vous rendre sur notre [serveur Discord](https://discord.gg/8Jzqu3T) pour dire bonjour. 👋
Si vous êtes intéressé à aider à contribuer à Starship, veuillez jeter un coup d'oeil à notre [Guide de contribution](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Aussi, n'hésitez pas à vous rendre sur notre [serveur Discord](https://discord.gg/8Jzqu3T) pour dire bonjour. 👋
## 💭Inspiré par
Jetez un œil aux précédents projets qui ont inspiré la création de starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Une invite de commande ZSH pour les astronautes.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Thème multi-shell robbyrussell écrit en JavaScript.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - Un shell multi-plateformes de type powerline personnalisable avec des icônes.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<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>
## 📝 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)"
```
*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

View File

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

View File

@ -18,7 +18,7 @@ features:
footer: Berlisensi ISC | Hak Cipta © 2019-sekarang Kontributor Starship
#Used for the description meta tag, for SEO
metaTitle: "Starship: Prompt Lintas Shell"
description: Starship merupakan sebuah prompt yang minimal, super cepat, dan sangat bisa untuk dikustomisasi untuk shell apapun! Bisa menampilkan informasi yang kamu butuhkan, namun tetap bisa tampil dengan ramping dan minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.
description: Starship merupakan sebuah prompt yang minimal, super cepat, dan sangat bisa untuk dikustomisasi untuk shell apapun! Bisa menampilkan informasi yang kamu butuhkan, namun tetap bisa tampil dengan ramping dan minimal. Pemasangan singkat tersedia untuk Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, dan PowerShell.
---
<div class="center">
@ -119,7 +119,7 @@ description: Starship merupakan sebuah prompt yang minimal, super cepat, dan san
#### Elvish
::: warning Only elvish v0.17 or higher is supported. :::
::: warning Hanya elvish v0.17 atau versi yang lebih baru yang mendapat dukungan pengembangan. :::
Tambahkan skrip berikut pada baris akhir `~/.elvish/rc.elv`:
@ -147,9 +147,9 @@ description: Starship merupakan sebuah prompt yang minimal, super cepat, dan san
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu",
]
prompt = "starship_prompt"
```

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
## Kustomisasi Perintah pre-prompt dan pre-execution Pada Bash
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering:
Bash tidak memiliki framework preexec/precmd yang tetap seperti kebanyakan shell pada umumnya. Oleh karena itu, sulit halnya untuk membuat hook yang dapat dikustomisasi sepenuhnya di dalam `bash`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering:
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
- Untuk menjalankan fungsi yang dikustomisasi tepat sebelum prompt, buatlah sebuah fungsi baru lalu berikan nama `starship_precmd_user_func` ke fungsi tersebut. Sebagai contoh, untuk menampilkan gambar roket sebelum prompt, kamu bisa melakukannya dengan cara
```bash
function blastoff(){
@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- Untuk menjalankan fungsi yang dikustomisasi tepat sebelum commands berjalan, kamu bisa menggunakan [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Akan tetapi, kamu **harus** melakukan proses trap pada DEBUG signal _sebelum_ menjalankan Starship! Starship bisa menyimpan nilai dari DEBUG trap, tapi jika trap diganti setelah starship berjalan, beberapa fungsi akan rusak.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
@ -67,35 +69,35 @@ function Invoke-Starship-PreCommand {
}
```
## Change Window Title
## Mengubah Judul Window
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
Beberapa prompt shell dengan otomatis akan mengubah judul window-nya untukmu (mis. untuk merefleksikan direktori kerjamu). Fish bahkan mengaturnya sebagai bawaan. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
First, define a window title change function (identical in bash and zsh):
Pertama, buatlah fungsi untuk mengubah judul window (bekerja pada bash dan zsh):
```bash
function set_win_title(){
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
echo -ne "\033]0; JUDUL_WINDOW_MU \007"
}
```
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
Kamu bisa menggunakan variabel untuk mengkustomisasi judulnya (`$USER`, `$HOSTNAME`, dan `$PWD` adalah opsi yang populer).
In `bash`, set this function to be the precmd starship function:
Di dalam `bash`, atur fungsi berikut menjadi fungsi precmd untuk starship:
```bash
starship_precmd_user_func="set_win_title"
```
In `zsh`, add this to the `precmd_functions` array:
Dalam `zsh`, pada array `precmd_functions`, tambahkan:
```bash
precmd_functions+=(set_win_title)
```
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
Kalau kamu suka hasilnya, tambahkan baris (`~/.bashrc` or `~/.zshrc`) ke dalam file konfigurasi shell milikmu untuk membuatnya permanen.
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
Sebagai contoh, kalau kamu mau menampilkan lokasi direktori pada judul label terminalmu, tambahkan bagian berikut ke dalam `~/.bashrc` atau `~/.zshrc`:
```bash
function set_win_title(){
@ -145,7 +147,7 @@ format = """$character"""
right_format = """$all"""
```
Produces a prompt like the following:
Menghasilkan prompt seperti berikut:
```
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### Contoh
@ -176,26 +178,26 @@ continuation_prompt = "▶▶"
## Menata String
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
Style strings are a list of words, separated by whitespace. Kumpulan katanya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<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.
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`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- Menuliskannya dengan menggunakan `#` dan diikuti oleh enam digit angka hexadesimal. Spesifikasi [kode heksadesimal pada warna RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Menggunakan bilangan antara 0-255. Spesifikasi [8-bit Kode Warna ANSI](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Jika warna yang dipakai pada latar depan/latar belakang banyak, maka warna yang terbaru pada string yang akan diprioritaskan.

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?
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?

View File

@ -2,7 +2,7 @@
<img
width="400"
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
alt="Starship Cross-shell prompt"
alt="Starship Prompt antar-shell"
/>
</p>
@ -10,12 +10,12 @@
<a href="https://github.com/starship/starship/actions"
><img
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 href="https://crates.io/crates/starship"
><img
src="https://img.shields.io/crates/v/starship?style=flat-square"
alt="Crates.io version"
alt="Versi Crates.io"
/></a>
<a href="https://repology.org/project/starship/versions"
><img
@ -25,21 +25,21 @@
<a href="https://discord.gg/starship"
><img
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
alt="Chat on Discord"
alt="Mengobrol di Discord"
/></a>
<a href="https://twitter.com/StarshipPrompt"
><img
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Follow @StarshipPrompt on Twitter"
alt="Ikuti @StarshipPrompt di Twitter"
/></a>
</p>
<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 align="center">
@ -150,202 +150,270 @@
**Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!**
- **Fast:** it's fast _really really_ fast! 🚀
- **Cepat:** Starship itu cepat _sangat sangat_ cepat! 🚀
- **Customizable:** configure every aspect of your prompt.
- **Universal:** works on any shell, on any operating system.
- **Intelligent:** shows relevant information at a glance.
- **Feature rich:** support for all your favorite tools.
- **Easy:** quick to install  start using it in minutes.
- **Universal:** bekerja pada shell apapun, pada sistem operasi apa saja.
- **Cerdas:** menampilkan sekilas informasi yang relevan.
- **Kaya akan fitur:** dukungan untuk semua alat favoritmu.
- **Mudah:** pemasangan singkat  mulai menggunakannya dalam hitungan menit.
<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>
<a name="🚀-installation"></a>
## 🚀 Installation
## 🚀 Pemasangan
### Prasyarat
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
- Sebuah [Nerd Font](https://www.nerdfonts.com/) terpasang dan aktif pada terminal (contohnya, coba [Nerd Font Fira Code](https://www.nerdfonts.com/font-downloads)).
### Getting Started
### Langkah 1. Pasang Starship
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
Select your operating system from the list below to view installation instructions:
1. Instalasi dengan menggunakan binary **starship**:
<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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
Untuk memperbarui Starship, jalankan kembali skrip di atas. Hal ini dapat memperbarui versi yang terpasang tanpa menyentuh konfigurasi Starship.
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**Note** - The defaults of the install script can be overridden see the built-in help.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### Dengan [Scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. Tambahkan skrip init ke file konfigurasi Shell:
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
Tambahkan skrip berikut pada baris akhir `~/.bashrc:`:
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<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
# ~/.zshrc
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
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
# ~/.config/ion/initrc
Tambahkan skrip berikut pada baris akhir `~/.config/fish/config.fish`:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
Tambahkan skrip berikut pada baris akhir `~/.xonshrc`:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
## 🤝 Contributing
</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).
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
Jika kamu tertarik untuk membantu berkontribusi ke starship, silakan lihat [Pedoman Berkontribusi](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) kami. Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
## 💭 Inspired By
## 💭 Terinspirasi Oleh
Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<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>
## 📝 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.

View File

@ -109,7 +109,7 @@ Untuk mengkonfigurasi prompt agar menggunakan konfigurasi `use_symbol_for_status
error_symbol = "[✖](bold red)"
```
*Catatan:* Element `character` secara otomatis menambahkan sebuah spasi setelahnya, jadi tidak seperti `format` string yang lain, kami secara spesifik tidak menambahkannya pada contoh di atas.
_Catatan:_ Element `character` secara otomatis menambahkan sebuah spasi setelahnya, jadi tidak seperti `format` string yang lain, kami secara spesifik tidak menambahkannya pada contoh di atas.
#### Durasi Perintah

View File

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

View File

@ -119,7 +119,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
#### Elvish
::: warning Only elvish v0.17 or higher is supported. :::
::: warning È supportato solo elvish v0.17 o superiore. :::
Aggiungi quanto segue alla fine di `~/.elvish/rc.elv`:
@ -147,9 +147,9 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu",
]
prompt = "starship_prompt"
```

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
## Comandi personalizzati di pre-prompt e pre-esecuzione per Bash
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Tuttavia, Starship dà la limitata possibilità di inserire le tue funzioni nella procedura prompt-rendering:
Bash non ha un framework preexec/precmd formale come la maggior parte delle altre shell. Per questo motivo, è difficile fornire hook completamente personalizzabile in `bash`. Tuttavia, Starship dà la limitata possibilità di inserire le tue funzioni nella procedura prompt-rendering:
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
- Per eseguire una funzione personalizzata a destra del prompt prima che venga disegnato, definisci una nuova funzione e assegna il suo nome a `starship_precmd_user_func`. Per esempio, per visualizzare l'icona di un razzo prima del prompt, si può usare il codice seguente
```bash
function blastoff(){
@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- Per eseguire una funzione personalizzata prima dell'esecuzione di un comando, è possibile utilizzare il meccanismo trappola [`DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Tuttavia, **devi** intrappolare il segnale DEBUG _prima di_ inizializzare Starship! Starship può preservare il valore trappola di DEBUG, ma se la trappola viene sovrascritta dopo l'avvio di Starship, alcune funzionalità non funzioneranno.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
@ -67,35 +69,35 @@ function Invoke-Starship-PreCommand {
}
```
## Change Window Title
## Cambia il titolo della finestra
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
Alcune shell prompt cambieranno automaticamente il titolo della finestra (ad esempio per riflettere la directory di lavoro). Fish lo fa per impostazione predefinita. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
First, define a window title change function (identical in bash and zsh):
Innanzitutto, bisogna definire una funzione per il cambio del titolo della finestra (identica sia per bash che zsh):
```bash
function set_win_title(){
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
echo -ne "\033]0; IL_TUO_TITOLO_QUI \007"
}
```
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
Puoi usare delle variabili per personalizzare questo titolo (`$USER`, `$HOSTNAME`, e `$PWD` sono le scelte più popolari).
In `bash`, set this function to be the precmd starship function:
In `bash`, impostare questa funzione per essere la precmd Starship function:
```bash
starship_precmd_user_func="set_win_title"
```
In `zsh`, add this to the `precmd_functions` array:
In `zsh`, aggiungi questo `precmd_functions` all'array:
```bash
precmd_functions+=(set_win_title)
```
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
Se ti piace il risultato, aggiungi queste righe al tuo file shell di configurazione (`~/.bashrc` o `~/.zshrc`) per renderlo permanente.
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
Ad esempio, se desideri visualizzare la directory corrente nel titolo della scheda del terminale, aggiungi la seguente snippet al tuo `~/.bashrc` or `~/.zshrc`:
```bash
function set_win_title(){
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### Esempio
@ -176,26 +178,26 @@ continuation_prompt = "▶▶"
## Stile delle Stringhe
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le parole non sono sensibili alle maiuscole (cioè `grassetto` e `BoLd` sono considerate la stessa stringa). Ogni parola può essere una delle seguenti:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<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.
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`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- Un `#` seguito da un valore esadecimale a sei cifre. Questo specifica un [colore esagesimale in RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Un numero compreso tra 0-255. Specifica un [codice colore ANSI a 8 bit](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Se sono specificati più colori per il primo piano/sfondo, l'ultimo nella stringa avrà la priorità.

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):
```toml
# Inserisce una riga vuota tra gli prompt della shell
# Inserts a blank line between shell prompts
add_newline = true
# Sostituisci il simbolo "" nel prompt con "➜"
[character] # Il nome del modulo che stiamo configurando è "character"
success_symbol = "[➜](grassetto)" # Il segmento "success_symbol" è impostato a "➜" con il colore "bold green"
# Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
# Disabilita il modulo del pacchetto, nasconderlo dal prompt completamente
# Disable the package module, hiding it from the prompt completely
[package]
disabled = true
```
@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star
### Logging
By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable:
Per impostazione predefinita, starship salva i warning e gli errori in un file chiamato `~/.cache/starship/session_${STARSHIP_SESSION_KEY}. og`, dove la chiave di sessione è corrispondente a un'istanza del tuo terminale. Questo, tuttavia, può essere modificato utilizzando la variabile di ambiente `STARSHIP_CACHE`:
```sh
export STARSHIP_CACHE=~/.starship/cache
@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp')
### Terminologia
**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project.
**Modulo**: Un componente nel prompt che dà informazioni basate su informazioni contestuali dal tuo sistema operativo. Ad esempio, il modulo "nodejs" mostra la versione di Node.js attualmente installata sul computer, se la directory corrente è un progetto Node.js.
**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
**Variable**: Sotto-componenti più piccoli che contengono informazioni fornite dal modulo. Per esempio, la variabile "version" nel modulo "nodejs" contiene la versione corrente di Node.js.
By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix.
Per convenzione, la maggior parte dei moduli ha un prefisso di colore predefinito del terminale (ad esempio `via` in "nodejs") e uno spazio vuoto come suffisso.
### Formato Stringhe
Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string.
Le stringhe di formato sono il formato con cui un modulo stampa tutte le sue variabili. La maggior parte dei moduli ha una voce chiamata `formato` che configura il formato di visualizzazione del modulo. È possibile utilizzare testi, variabili e gruppi di testo in una stringa di formato.
#### Variable
A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`.
Una variabile contiene un simbolo `$` seguito dal nome della variabile. The name of a variable can only contain letters, numbers and `_`.
For example:
Per esempio:
- `$version` è una stringa di formato con una variabile chiamata `version`.
- `$git_branch$git_commit` è una stringa di formato con due variabili denominate `git_branch` e `git_commit`.
@ -83,13 +83,13 @@ For example:
#### Gruppo Testo
A text group is made up of two different parts.
Un gruppo di testo è composto da due parti diverse.
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
La prima parte, che è racchiusa tra `[]`, è una [format string](#format-strings). È possibile aggiungere testi, variabili o anche gruppi annidati di testo.
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
Nella seconda parte, che è racchiusa tra `()`, è presente una [style string](#style-strings). Questa può essere usata per modificare lo stile della prima parte.
For example:
Per esempio:
- `[on](rosso grassetto)` stamperà una stringa `on` con testo in grassetto di colore rosso.
- `[⌘ $version](grassetto verde)` stamperà un simbolo `⌘` seguito dal contenuto della variabile `version`, con testo grassetto di colore verde.
@ -97,7 +97,7 @@ For example:
#### Stile delle Stringhe
Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/).
La maggior parte dei moduli in starship ti permettono di configurare i loro stili di visualizzazione. Questo viene fatto con una voce (solitamente chiamata `style`) che è una stringa che specifica la configurazione. Ecco alcuni esempi di stringhe di stile per quello che fanno. Per maggiori dettagli sulla sintassi completa, consulta la [guida di configurazione avanzata](/advanced-config/).
- `"fg:green bg:blue"` imposta il testo verde su uno sfondo blu
- `"bg:blue fg:bright-green"` imposta un testo verde brillante su uno sfondo blu
@ -106,13 +106,13 @@ Most modules in starship allow you to configure their display styles. This is do
- `"bold italic fg:purple"` imposta il testo viola in corsivo e grassetto
- `""` disabilita esplicitamente tutti gli stili
Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics.
Nota che quello che assomiglia allo stile sarà controllato dal tuo emulatore terminale. Ad esempio, alcuni emulatori di terminale renderanno luminosi i colori invece del testo in grassetto, e alcuni temi colorati useranno gli stessi valori per i colori normali e luminosi. Inoltre, per ottenere il testo in corsivo, il tuo terminale deve supportare il corsivo.
#### Formattazione condizionale delle stringhe
A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty.
Una stringa di formato condizionale inserita in `(` e `)` non verrà presentata se tutte le variabili interne sono vuote.
For example:
Per esempio:
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options.
| `command_timeout` | `500` | Timeout per i comandi eseguiti da starship (in millisecondi). |
| `add_newline` | `true` | Inserisce una riga vuota tra i prompt della shell. |
### Esempio
```toml
@ -185,6 +184,7 @@ format = "$all"
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\
$cmake\
$cobol\
$container\
$dart\
$deno\
$dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml
# Move the directory to the second line
format="$all$directory$character"
format = "$all$directory$character"
```
## AWS
@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### Esempio
```toml
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
threshold = 10
style = "bold red"
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
threshold = 30
style = "bold yellow"
discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed
```
## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## COBOL / GNUCOBOL
@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## Durata del comando
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Opzioni
| Opzione | Default | Descrizione |
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
::: tip
Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
:::
| Opzione | Default | Descrizione |
| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
| `notification_timeout` | | Duration to show notification for (in milliseconds). If unset, notification timeout will be determined by daemon. Not all notification daemons honor this option. |
### Variables
@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s
| duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
format = "[$symbol$environment](dimmed green) "
```
## Container
The `container` module displays a symbol and container name, if inside a container.
### Opzioni
| Opzione | Default | Descrizione |
| ---------- | ------------------------------------ | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | Lo stile per il modulo. |
| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
| Variable | Esempio | Descrizione |
| --------- | ------------------- | ------------------------------------ |
| name | `fedora-toolbox:35` | The name of the container |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Esempio
```toml
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
```
## Crystal
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met:
@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno
The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Opzioni
@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -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 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.
Example: following configuration will display value of USER environment variable
```toml
# ~/.config/starship.toml
[env_var.USER]
default = "unknown user"
```
:::
### Opzioni
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -1045,6 +1074,7 @@ default = "unknown shell"
```
Displaying multiple environmental variables:
```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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml
# ~/.config/starship.toml
format="AA $fill BB $fill CC"
format = "AA $fill BB $fill CC"
[fill]
symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
```
AA -------------------------------------------- BB -------------------------------------------- CC
```
## 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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` |
| 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
@ -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. |
| style\* | Mirrors the value of option `style` |
\*: This variable 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`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰"
diverged = "😵"
up_to_date = "✓"
untracked = "🤷"
untracked = "🤷"
stashed = "📦"
modified = "📝"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -1500,7 +1529,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname]
ssh_only = false
format = "on [$hostname](bold red) "
format = "on [$hostname](bold red) "
trim_at = ".companyname.com"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## 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:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| 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`. |
| `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. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | Lo stile per il modulo. |
| `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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ "
```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### 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
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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` |
| 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -1969,7 +2030,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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. |
| `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_files` | `["package.json", ".node-version"]` | Quali nomi di file 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -2267,7 +2328,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version.
::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Opzioni
| Opzione | Default | Descrizione |
| ---------------- | -------------------------------- | -------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
| `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. |
| `style` | `"bold 5"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `pulumi` module. |
| Opzione | Default | Descrizione |
| ---------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `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` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `pulumi` module. |
### 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` |
| stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi]
symbol = "🛥 "
format = "[$symbol$stack]($style) "
```
## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -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. |
| style\* | | Mirrors the value of option `style`. |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status
The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`.
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
@ -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 |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `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 |
| `disabled` | `true` | Disables the `status` module. |
@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
```toml
# ~/.config/starship.toml
[status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true
disabled = false
```
## Sudo
@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
```toml
# ~/.config/starship.toml
[sudo]
@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met:
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| ora | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Esempio
@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
#### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml
[custom.foo]
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)"
[custom.time]
command = "time /T"
extensions = ["pst"] # filters *.pst files
extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
```

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?
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?

View File

@ -103,7 +103,7 @@
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
alt="Português do Brasil"
alt="Portoghese del Brasile"
/></a>
&nbsp;
<a
@ -111,7 +111,7 @@
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
alt="Русский"
alt="Russo"
/></a>
&nbsp;
<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)).
### 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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
Per aggiornare Starship stesso, riavviare lo script sopra. Sostituirà la versione corrente senza toccare la configurazione di Starship.
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**Nota** - I valori predefiniti dello script di installazione possono essere sovrascritti, vedi la guida integrata.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### Con [Scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. Aggiungi lo script di inizializzazione al file di configurazione della shell:
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
Aggiungi quanto segue alla fine di `~/.bashrc`:
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<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
# ~/.zshrc
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
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
# ~/.config/ion/initrc
Aggiungi quanto segue alla fine di `~/.config/fish/config.fish`:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
Aggiungi quanto segue alla fine di `~/.xonshrc`:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Step 3. Configure Starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
If you're looking to further customize Starship:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝 Contribuire
@ -335,11 +403,11 @@ Se sei interessato ad aiutare a contribuire a Starship, dai un'occhiata alla nos
Ti invito di controllare questi lavori precedenti che hanno contribuito a ispirare la creazione di Starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt ZSH per astronauti.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Tema robbyrussell Cross-shell scritto in JavaScript.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - Un prompt multi-shell personalizzabile powerline-like con icone.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<br>

View File

@ -109,7 +109,7 @@ Per configurare il prompt al fine di usare la vecchia configurazione `use_symbol
error_symbol = "[✖](bold red)"
```
*Nota:* L'elemento `carattere` aggiunge dopo automaticamente uno spazio, quindi a differenza delle altre stringhe `formato`, non ne aggiungiamo uno specificamente agli esempi di cui sopra.
_Nota:_ L'elemento `carattere` aggiunge dopo automaticamente uno spazio, quindi a differenza delle altre stringhe `formato`, non ne aggiungiamo uno specificamente agli esempi di cui sopra.
#### Durata del comando

View File

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

View File

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

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
## Bashのカスタムの事前プロンプトおよび事前実行コマンド
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. ただし、Starship はプロンプトを描画する一連の流れに、限定的に独自の関数を挿入することができます。
Bashには、他のほとんどのシェルとは違い、正式な preexec / precmd フレームワークを持っていません。 そのため、 `bash`で完全にカスタマイズ可能なフックを提供することは困難です。 ただし、Starship はプロンプトを描画する一連の流れに、限定的に独自の関数を挿入することができます。
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
- 関数をプロンプトが描画される直前に実行するためには、新しい関数を定義して `starship_precmd_user_func` に割り当ててください。 例として、ロケットをプロンプトの前に表示させたければ、下記のようにしてください。
```bash
function blastoff(){
@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- コマンドの直前に関数を実行するために、[`DEBUG` トラップの仕組み](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/)を使うことができます。 However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship は DEBUGトラップの値を保護できますが、 starship の起動後にトラップが上書きされると、いくつかの機能は壊れてしまうでしょう。
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
@ -67,11 +69,11 @@ function Invoke-Starship-PreCommand {
}
```
## Change Window Title
## ウィンドウのタイトルの変更
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
いくつかのシェルプロンプトはあなたのためにウィンドウのタイトルを自動的に変更します(例えば、カレントディレクトリを反映するために)。 特に Fish はデフォルトで変更を行います。 Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
First, define a window title change function (identical in bash and zsh):
まず、ウィンドウのタイトルを変更する関数を定義してください( bash も zsh も同様に)
```bash
function set_win_title(){
@ -79,23 +81,23 @@ function set_win_title(){
}
```
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
タイトルをカスタマイズするために変数を利用することができます (`$USER` 、 `$HOSTNAME``$PWD` が一般的です)。
In `bash`, set this function to be the precmd starship function:
`bash` では関数を starship の precmd 関数としてセットしてください。
```bash
starship_precmd_user_func="set_win_title"
```
In `zsh`, add this to the `precmd_functions` array:
`zsh`では関数を `precmd_functions` の配列に追加してください。
```bash
precmd_functions+=(set_win_title)
```
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
もし結果に満足したら、永続化のためそれぞれの行をシェルの設定ファイル (`~/.bashrc` もしくは `~/.zshrc`) に追加してください。
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
たとえば、現在のディレクトリをターミナルタブのタイトルに表示したい場合は、 `~/.bashrc`または`~/.zshrc`に以下のスニペットを追加します。
```bash
function set_win_title(){
@ -125,11 +127,11 @@ function Invoke-Starship-PreCommand {
Invoke-Expression (&starship init powershell)
```
## Enable Right Prompt
## 右プロンプトの有効化
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
シェルによっては、入力と同じ行にレンダリングされる右プロンプトをサポートしています。 Starship では `right_format` オプションを使って右プロンプトの内容を設定できます。 `format`で使用できるモジュールはすべて`right_format`でも使用できます。 変数`$all`には、`format`や`right_format`で明示的に使用されていないモジュールのみが格納されます。
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
注意: 右プロンプトは入力の場所に続く単一の行です。 複数行のプロンプトで入力行の上を右寄せにするには、[fillモジュール](/config/#fill)を参照してください。
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd.
@ -145,7 +147,7 @@ format = """$character"""
right_format = """$all"""
```
Produces a prompt like the following:
次のようなプロンプトが生成されます:
```
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### 設定例
@ -176,26 +178,26 @@ continuation_prompt = "▶▶"
## スタイルの設定
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
スタイル文字列は空白で区切られた単語のリストです。 大文字小文字を区別しません(例えば、 `bold` と`BoLd` は同じだとみなされます)。 それぞれ以下のいずれか一つが該当します。
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<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.
`none` トークンは、文字列中の`bg:` 指定子の一部でない場合、他のすべてのトークンをオーバーライドします。そのため、たとえば、`fg:red none fg:blue` と指定した場合、スタイルなしの文字列が作られます。 `bg:none` は背景色をデフォルトの色にセットするので、`fg:red bg:none` は `red``fg:red` と同じ意味になり、`bg:green fg:red bg:none` も `fg:red``red` と同じ意味になります。 将来 `none` を他の単語と一緒に使用することはエラーになるかもしれません。
A color specifier can be one of the following:
色は以下のいずれか1つを指定できます。
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- 標準的なターミナルカラーの `black``red``green``blue``yellow``purple``cyan``white`。 必要に応じて、より明るい色を得るために `bright-` を前につけることができます。(例えば、 `bright-white`
- `#` に続く16進数。 [RGB の16進数カラーコード](https://www.w3schools.com/colors/colors_hexadecimal.asp)を表します。
- 0-255 までの間の数字。 [8-bit ANSI カラーコード](https://i.stack.imgur.com/KTSQa.png) を表します。
If multiple colors are specified for foreground/background, the last one in the string will take priority.
複数の色が文字色/背景色に指定された際には、最後の指定が優先して選ばれます。

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?
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)を試してみてください)。
### 入門
### 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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
Starship自体を更新するには、上記のスクリプトを再度実行してください。 最新のバージョンに置き換わり、設定ファイルには変更を加えません。
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**※**インストールスクリプトのデフォルト値は上書きすることができます。詳しくはヘルプを参照してください。
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### [ Scoop ](https://scoop.sh)の場合:
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. 初期化のためのスクリプトをシェルの設定ファイルに追加
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
`~/.bashrc` の最後に以下を追記してください
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<summary>Bash</summary>
starship init fish | source
```
`~/.bashrc` の最後に以下を追記してください
```sh
eval "$(starship init bash)"
```
#### Zsh
</details>
`~/.zshrc` の最後に以下を追記してください
<details>
<summary>Cmd</summary>
```sh
# ~/.zshrc
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
eval (starship init elvish)
```
Note: Only Elvish v0.17+ is supported
#### Ion
</details>
`~/.config/ion/initrc `の最後に次を追加してください
<details>
<summary>Fish</summary>
```sh
# ~/.config/ion/initrc
`~/.config/fish/config.fish` の最後に以下を追記してください
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
`~/.xonshrc` の最後に以下を追加してください:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Step 3. Configure Starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
If you're looking to further customize Starship:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝 貢献
@ -335,11 +403,11 @@
よければStarship の作成に影響を与えた、これまでのプロジェクトをチェックしてください 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 宇宙飛行士のための ZSH プロンプト。
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - 多くの shell に対応した JavaScript で書かれた robbyrussell テーマ。
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - 多くの shell に対応しているカスタマイズ可能でアイコンを表示できる powerline のようなプロンプト。
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<br>

View File

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

View File

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

View File

@ -28,13 +28,13 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
</video>
</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 -c "$(curl -fsSL https://starship.rs/install.sh)"
```
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
Starship을 업데이트하고 싶은 경우에도 위의 스크립트를 실행시키면 됩니다. Starship의 설정은 변경되지 않고 버전만 최근 버전으로 대체될 것입니다.
#### 패키지 매니저를 이용한 설치
@ -55,18 +55,18 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
brew install starship
```
With [Scoop](https://scoop.sh):
[Scoop](https://scoop.sh)을 통한 설치:
```powershell
scoop install starship
```
1. 쉘 설정에 시동 스크립트를 추가:
1. 쉘 설정 파일에 init 스크립트 추가:
#### Bash
`~/.bashrc`에 아래 라인을 추가
`~/.bashrc`의 끝부분에 아래 라인을 추가:
```sh
# ~/.bashrc
@ -77,7 +77,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Fish
`~/.config/fish/config.fish`에 아래 라인을 추가
`~/.config/fish/config.fish`의 끝부분에 아래 라인을 추가:
```sh
# ~/.config/fish/config.fish
@ -88,7 +88,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Zsh
`~/.zshrc`에 아래 라인을 추가
`~/.zshrc`의 끝부분에 아래 라인을 추가
```sh
# ~/.zshrc
@ -99,7 +99,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Powershell
`Microsoft.PowerShell_profile.ps1`의 끝부분에 아래 내용을 추가. 해당 설정파일은 파워쉘에서 `$PROFILE` 변수 확인을 통해 확인 가능. 일반적으로 해당 파일은 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 혹은 -Nix의 경우 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`위치.
`Microsoft.PowerShell_profile.ps1`의 끝부분에 아래 내용을 추가합니다. 해당 설정파일은 파워쉘에서 `$PROFILE` 변수 확인을 통해 확인 가능합니다. 일반적으로 해당 파일은 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 혹은 -Nix의 경우 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`있습니다.
```sh
Invoke-Expression (&starship init powershell)
@ -108,7 +108,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Ion
아래의 라인을 `~/.config/ion/initrc` 마지막에 추가:
`~/.config/ion/initrc` 의 끝부분에 아래 라인을 추가:
```sh
# ~/.config/ion/initrc
@ -119,9 +119,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Elvish
::: warning Only elvish v0.17 or higher is supported. :::
::: 주의 elvish 버전 v0.17 이상에서만 지원됩니다. :::
아래의 라인을 `~/.elvish/rc.elv` 마지막에 추가:
`~/.elvish/rc.elv` 의 끝부분에 아래 라인을 추가:
```sh
# ~/.elvish/rc.elv
@ -132,7 +132,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Tcsh
아래의 라인을 `~/.tcshrc` 마지막에 추가:
`~/.tcshrc` 의 끝부분에 아래 라인을 추가:
```sh
# ~/.tcshrc
@ -143,13 +143,13 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
::: 주의 이는 추후 변경될 예정입니다. 버전 v0.33 이상에서만 지원됩니다. ::: 새로운 설정 파일에 아래의 내용을 추가하세요. `config path`를 실행시키면 파일의 위치를 확인할 수 있습니다.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu",
]
prompt = "starship_prompt"
```
@ -157,7 +157,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Xonsh
Add the following to the end of `~/.xonshrc`:
`~/.xonshrc` 의 끝부분에 아래 라인을 추가:
```sh
# ~/.xonshrc
@ -168,7 +168,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Cmd
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
Cmd를 이용하려면 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) 를 사용해야 합니다. `starship.lua` 파일에 아래의 라인을 추가하고 파일을 Clink scripts 폴더에 저장합니다.
```lua
-- starship.lua

View File

@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `파워셀`
- `bash`
- `zsh`
- `파워셀`
### Example
@ -178,15 +180,15 @@ continuation_prompt = "▶▶"
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<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.
@ -194,8 +196,8 @@ The `none` token overrides all other tokens in a string if it is not part of a `
A color specifier can be one of the following:
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la
add_newline = true
# Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
# Disable the package module, hiding it from the prompt completely
[package]
@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options.
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
### Example
```toml
@ -185,6 +184,7 @@ format = "$all"
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\
$cmake\
$cobol\
$container\
$dart\
$deno\
$dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml
# Move the directory to the second line
format="$all$directory$character"
format = "$all$directory$character"
```
## AWS
@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### Example
```toml
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
threshold = 10
style = "bold red"
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
threshold = 30
style = "bold yellow"
discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed
```
## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## COBOL / GNUCOBOL
@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options
| Option | Default | Description |
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
::: tip
Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
:::
| Option | Default | Description |
| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
| `notification_timeout` | | Duration to show notification for (in milliseconds). If unset, notification timeout will be determined by daemon. Not all notification daemons honor this option. |
### Variables
@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s
| duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
format = "[$symbol$environment](dimmed green) "
```
## Container
The `container` module displays a symbol and container name, if inside a container.
### Options
| Option | Default | Description |
| ---------- | ------------------------------------ | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
| Variable | Example | Description |
| --------- | ------------------- | ------------------------------------ |
| name | `fedora-toolbox:35` | The name of the container |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
```
## Crystal
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met:
@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno
The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options
@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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 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.
Example: following configuration will display value of USER environment variable
```toml
# ~/.config/starship.toml
[env_var.USER]
default = "unknown user"
```
:::
### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1045,6 +1074,7 @@ default = "unknown shell"
```
Displaying multiple environmental variables:
```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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml
# ~/.config/starship.toml
format="AA $fill BB $fill CC"
format = "AA $fill BB $fill CC"
[fill]
symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
```
AA -------------------------------------------- BB -------------------------------------------- CC
```
## 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| 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
@ -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. |
| style\* | Mirrors the value of option `style` |
\*: This variable 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`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰"
diverged = "😵"
up_to_date = "✓"
untracked = "🤷"
untracked = "🤷"
stashed = "📦"
modified = "📝"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname]
ssh_only = false
format = "on [$hostname](bold red) "
format = "on [$hostname](bold red) "
trim_at = ".companyname.com"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## 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:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| 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`. |
| `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. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ "
```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### 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
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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. |
| `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_files` | `["package.json", ".node-version"]` | Which filenames 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version.
::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options
| Option | Default | Description |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
| Option | Default | Description |
| ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `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` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
### 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` |
| stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi]
symbol = "🛥 "
format = "[$symbol$stack]($style) "
```
## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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. |
| style\* | | Mirrors the value of option `style`. |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status
The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`.
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
@ -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 |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `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 |
| `disabled` | `true` | Disables the `status` module. |
@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true
disabled = false
```
## Sudo
@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[sudo]
@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met:
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
#### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml
[custom.foo]
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)"
[custom.time]
command = "time /T"
extensions = ["pst"] # filters *.pst files
extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
```

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?
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?

View File

@ -150,178 +150,246 @@
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
- **Fast:** it's fast _really really_ fast! 🚀
- **Customizable:** configure every aspect of your prompt.
- **Universal:** works on any shell, on any operating system.
- **Intelligent:** shows relevant information at a glance.
- **Feature rich:** support for all your favorite tools.
- **Easy:** quick to install  start using it in minutes.
- ** Fast:** 빨라요 _엄청 엄청_ 빠릅니다! 🚀
- ** Customizable:** 프롬프트의 모든 측면을 커스텀 가능합니다.
- **Universal:** 어떤 쉘 위에서도, 어떤 운영체제 위에서도 동작합니다.
- **Intelligent:** 관련 정보를 한눈에 보여줍니다.
- **Feature rich:** 원하는 모든 도구를 지원합니다.
- **Easy:** 빠른 설치 - 몇 분 안에 사용할 수 있습니다.
<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>
<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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**Note** - The defaults of the install script can be overridden see the built-in help.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### With [Scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. 쉘 설정에 시동 스크립트를 추가:
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
`~/.bashrc`에 아래 라인을 추가
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</details>
#### Fish
### Step 2. 쉘에 Starship 적용하기
`~/.config/fish/config.fish`에 아래 라인을 추가
쉘에 Starship 초기 설정을 합니다. 아래의 리스트 중에 해당하는 것을 고르세요:
```sh
# ~/.config/fish/config.fish
<details>
<summary>Bash</summary>
starship init fish | source
```
`~/.bashrc`의 끝부분에 아래 라인을 추가:
```sh
eval "$(starship init bash)"
```
#### Zsh
</details>
`~/.zshrc`에 아래 라인을 추가
<details>
<summary>Cmd</summary>
```sh
# ~/.zshrc
Cmd를 이용하려면 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) 를 사용해야 합니다. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
eval (starship init elvish)
```
Note: Only Elvish v0.17+ is supported
#### Ion
</details>
아래의 라인을 `~/.config/ion/initrc` 마지막에 추가:
<details>
<summary>Fish</summary>
```sh
# ~/.config/ion/initrc
`~/.config/fish/config.fish`의 끝부분에 아래 라인을 추가:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
`~/.xonshrc` 의 끝부분에 아래 라인을 추가:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Step 3. Starship 설정하기
새로운 쉘 인스턴스를 시작하면 아름다운 새 쉘 프롬프트를 볼 수 있습니다. 기본 설정에 만족한다면, 즐기세요!
Starship을 추가로 커스터마이징 하고싶다면:
- **[Configuration](https://starship.rs/config/)** 원하는대로 프롬프트를 수정할 수 있도록 Starship 설정을 배울 수 있습니다.
- **[Presets](https://starship.rs/presets/)** 다른 사람들이 만들어둔 설정들을 보고 영감을 받을 수 있습니다.
## 🤝 기여
@ -335,11 +403,11 @@ If you are interested in helping contribute to starship, please take a look at o
Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<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)
### Prerequisites
### 준비 사항
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
@ -23,7 +23,7 @@ choco install starship
## [termux](https://termux.com)
### Prerequisites
### 준비 사항
```sh
pkg install getconf

View File

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

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)
### Prerequisites
### 준비 사항
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
@ -60,6 +60,9 @@ symbol = " "
[nix_shell]
symbol = " "
[nodejs]
symbol = " "
[package]
symbol = " "
@ -110,7 +113,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
format = '\[[$symbol($version)]($style)\]'
[cmd_duration]
format = '\[[⏱ $duration ]($style)\]'
format = '\[[⏱ $duration]($style)\]'
[cobol]
format = '\[[$symbol($version)]($style)\]'

View File

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

View File

@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### Example
@ -178,15 +180,15 @@ continuation_prompt = "▶▶"
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<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.
@ -194,8 +196,8 @@ The `none` token overrides all other tokens in a string if it is not part of a `
A color specifier can be one of the following:
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la
add_newline = true
# Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
# Disable the package module, hiding it from the prompt completely
[package]
@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options.
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
### Example
```toml
@ -185,6 +184,7 @@ format = "$all"
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\
$cmake\
$cobol\
$container\
$dart\
$deno\
$dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml
# Move the directory to the second line
format="$all$directory$character"
format = "$all$directory$character"
```
## AWS
@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### Example
```toml
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
threshold = 10
style = "bold red"
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
threshold = 30
style = "bold yellow"
discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed
```
## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## COBOL / GNUCOBOL
@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options
| Option | Default | Description |
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
::: tip
Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
:::
| Option | Default | Description |
| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
| `notification_timeout` | | Duration to show notification for (in milliseconds). If unset, notification timeout will be determined by daemon. Not all notification daemons honor this option. |
### Variables
@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s
| duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
format = "[$symbol$environment](dimmed green) "
```
## Container
The `container` module displays a symbol and container name, if inside a container.
### Options
| Option | Default | Description |
| ---------- | ------------------------------------ | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
| Variable | Example | Description |
| --------- | ------------------- | ------------------------------------ |
| name | `fedora-toolbox:35` | The name of the container |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
```
## Crystal
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met:
@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno
The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options
@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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 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.
Example: following configuration will display value of USER environment variable
```toml
# ~/.config/starship.toml
[env_var.USER]
default = "unknown user"
```
:::
### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1045,6 +1074,7 @@ default = "unknown shell"
```
Displaying multiple environmental variables:
```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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml
# ~/.config/starship.toml
format="AA $fill BB $fill CC"
format = "AA $fill BB $fill CC"
[fill]
symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
```
AA -------------------------------------------- BB -------------------------------------------- CC
```
## 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| 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
@ -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. |
| style\* | Mirrors the value of option `style` |
\*: This variable 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`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰"
diverged = "😵"
up_to_date = "✓"
untracked = "🤷"
untracked = "🤷"
stashed = "📦"
modified = "📝"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname]
ssh_only = false
format = "on [$hostname](bold red) "
format = "on [$hostname](bold red) "
trim_at = ".companyname.com"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## 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:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| 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`. |
| `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. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ "
```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### 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
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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. |
| `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_files` | `["package.json", ".node-version"]` | Which filenames 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version.
::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options
| Option | Default | Description |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
| Option | Default | Description |
| ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `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` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
### 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` |
| stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi]
symbol = "🛥 "
format = "[$symbol$stack]($style) "
```
## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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. |
| style\* | | Mirrors the value of option `style`. |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status
The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`.
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
@ -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 |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `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 |
| `disabled` | `true` | Disables the `status` module. |
@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true
disabled = false
```
## Sudo
@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[sudo]
@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met:
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
#### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml
[custom.foo]
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)"
[custom.time]
command = "time /T"
extensions = ["pst"] # filters *.pst files
extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
```

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?
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?

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)).
### 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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
Om Starship zelf bij te werken, voer je het bovenstaande script opnieuw uit. Deze vervangt de huidige versie zonder de configuratie van Starship aan te passen.
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**Opmerking** - De standaardinstellingen van het installatiescript kunnen overschreven worden; zie de ingebouwde hulp.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### Met [Scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. Voeg het initscript toe aan het configuratiebestand van uw shell:
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
Voeg het volgende toe aan het einde van `~/.bashrc`:
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<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
# ~/.zshrc
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
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
# ~/.config/ion/initrc
Add the following to the end of `~/.config/fish/config.fish`:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
Add the following to the end of `~/.xonshrc`:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Step 3. Configure Starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
If you're looking to further customize Starship:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝 Contributing
@ -333,11 +401,11 @@ If you are interested in helping contribute to starship, please take a look at o
Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<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)"
```
*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

View File

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

View File

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

View File

@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### Example
@ -178,15 +180,15 @@ continuation_prompt = "▶▶"
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<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.
@ -194,8 +196,8 @@ The `none` token overrides all other tokens in a string if it is not part of a `
A color specifier can be one of the following:
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ Cała konfiguracja starship jest wykonywana w tym pliku [TOML](https://github.co
add_newline = true
# Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
# Disable the package module, hiding it from the prompt completely
[package]
@ -41,7 +41,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star
### Logi
By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable:
Starship domyślnie loguje ostrzeżenia i błędy do pliku o nazwie`~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, gdzie klucz sesji odpowiada twojej instancji terminala. Można to zmienić za pomocą zmiennej środowiskowej `STARSHIP_CACHE`:
```sh
export STARSHIP_CACHE=~/.starship/cache
@ -61,21 +61,21 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp')
### Glosariusz
**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project.
**Moduł**: Komponent wiersza poleceń, który dostarcza informacji opartych na kontekście twojego systemu operacyjnego. Przykładowo, moduł "nodejs" pokazuje wersję Node.js, która jest obecnie zainstalowana na twoim komputerze, jeżeli znajdujesz się w folderze zawierającym projekt Node.js.
**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
**Zmienna**: Mniejszy podkomponent zawierający informacje dostarczane przez moduł. Przykładowo, zmienna "version" w module "nodejs" zawiera obecną wersję Node.js.
By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix.
W ramach konwencji większość modułów posiada przedrostek w domyślnym kolorze terminala (n.p. `via` w "nodejs") oraz pojedynczy odstęp za treścią modułu.
### Formatowanie
Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string.
Moduły wypisują swoje zmienne przy użyciu ciągów formatujących. Większość modułów posiada wpis o nazwie `format`, który konfiguruje format wyświetlania modułu. W ciągach formatujących można używać tekstu, zmiennych oraz grup tekstowych.
#### Zmienne
A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`.
Zmienna zawiera symbol `$`, po którym następuje nazwa zmiennej. The name of a variable can only contain letters, numbers and `_`.
For example:
Na przykład:
- `$version` to ciąg formatujący ze zmienną o nazwie `version`.
- `$git_branch$git_commit` zawiera dwie zmienne: `git_branch` i `git_commit`.
@ -83,13 +83,13 @@ For example:
#### Grupy tekstowe
A text group is made up of two different parts.
Grupa tekstowa składa się z dwóch oddzielnych części.
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
Pierwsza część, otoczona `[]`, to [ciąg formatujący](#format-strings). You can add texts, variables, or even nested text groups in it.
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
For example:
Na przykład:
- `[on](red bold)` will print a string `on` with bold text colored red.
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
@ -112,7 +112,7 @@ Note that what styling looks like will be controlled by your terminal emulator.
A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty.
For example:
Na przykład:
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options.
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
### Example
```toml
@ -185,6 +184,7 @@ format = "$all"
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\
$cmake\
$cobol\
$container\
$dart\
$deno\
$dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml
# Move the directory to the second line
format="$all$directory$character"
format = "$all$directory$character"
```
## AWS
@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### Example
```toml
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
threshold = 10
style = "bold red"
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
threshold = 30
style = "bold yellow"
discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed
```
## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## COBOL / GNUCOBOL
@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options
| Option | Default | Description |
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
::: tip
Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
:::
| Option | Default | Description |
| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
| `notification_timeout` | | Duration to show notification for (in milliseconds). If unset, notification timeout will be determined by daemon. Not all notification daemons honor this option. |
### Variables
@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s
| duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
format = "[$symbol$environment](dimmed green) "
```
## Container
The `container` module displays a symbol and container name, if inside a container.
### Options
| Option | Default | Description |
| ---------- | ------------------------------------ | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
| Zmienne | Example | Description |
| --------- | ------------------- | ------------------------------------ |
| name | `fedora-toolbox:35` | The name of the container |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
```
## Crystal
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met:
@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno
The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options
@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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 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.
Example: following configuration will display value of USER environment variable
```toml
# ~/.config/starship.toml
[env_var.USER]
default = "unknown user"
```
:::
### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1045,6 +1074,7 @@ default = "unknown shell"
```
Displaying multiple environmental variables:
```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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml
# ~/.config/starship.toml
format="AA $fill BB $fill CC"
format = "AA $fill BB $fill CC"
[fill]
symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
```
AA -------------------------------------------- BB -------------------------------------------- CC
```
## 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| 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
@ -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. |
| style\* | Mirrors the value of option `style` |
\*: This variable 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`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰"
diverged = "😵"
up_to_date = "✓"
untracked = "🤷"
untracked = "🤷"
stashed = "📦"
modified = "📝"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname]
ssh_only = false
format = "on [$hostname](bold red) "
format = "on [$hostname](bold red) "
trim_at = ".companyname.com"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## 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:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| 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`. |
| `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. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ "
```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### 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
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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. |
| `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_files` | `["package.json", ".node-version"]` | Which filenames 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version.
::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options
| Option | Default | Description |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
| Option | Default | Description |
| ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `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` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
### 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` |
| stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi]
symbol = "🛥 "
format = "[$symbol$stack]($style) "
```
## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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. |
| style\* | | Mirrors the value of option `style`. |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status
The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`.
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
@ -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 |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `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 |
| `disabled` | `true` | Disables the `status` module. |
@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true
disabled = false
```
## Sudo
@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[sudo]
@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met:
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
#### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml
[custom.foo]
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)"
[custom.time]
command = "time /T"
extensions = ["pst"] # filters *.pst files
extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
```

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?
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ą?

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)).
### 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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
Aby zaktualizować Starship, uruchom ponownie powyższy skrypt. Obecna wersja zostanie zastąpiona nową, bez modyfikowania konfiguracji Starship.
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**Uwaga** - Domyślne ustawienia skryptu instalacyjnego można zmienić - szczegóły znajdziesz we wbudowanym poleceniu pomocy.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### Za pomocą [Scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. Dodaj skrypt inicjalizacyjny do konfiguracji twojej powłoki:
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
Dodaj na koniec pliku `~/.bashrc`:
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<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
# ~/.zshrc
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
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
# ~/.config/ion/initrc
Dodaj na koniec pliku `~/.config/fish/config.fish`:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
Dodaj na koniec pliku `~/.xonshrc`:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Step 3. Configure Starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
If you're looking to further customize Starship:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝Wspomóż nas
@ -335,11 +403,11 @@ Jeżeli chcesz wspomóc tworzenie starship, zapoznaj się z naszym [Poradnikiem
Zapoznaj się z wcześniejszymi projektami które zainspirowały nas do stworzenia starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Wiersz poleceń ZSH dla astronautów.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Motyw robyrussell dla wielu powłok, napisany w JavaScript.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - Wiersz polecenia typu Powerline z ikonami, działa na wielu różnych powłokach.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<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)"
```
*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

View File

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

View File

@ -18,7 +18,7 @@ features:
footer: Licenciado pelo ISC | Todos os direitos reservados © 2019-Presente | Contribuidores Starship
#Used for the description meta tag, for SEO
metaTitle: "Starship: Cross-Shell Prompt"
description: O Starship é o prompt minimalista, extremamente rápido e extremamente personalizável para qualquer shell! Mostra as informações que você precisa, mantendo-se elegante e minimalista. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.
description: O Starship é o prompt minimalista, extremamente rápido e extremamente personalizável para qualquer shell! Mostra as informações que você precisa, mantendo-se elegante e minimalista. Instalação rápida disponível para Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd e PowerShell.
---
<div class="center">
@ -147,9 +147,9 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu",
]
prompt = "starship_prompt"
```
@ -168,7 +168,7 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
#### Cmd
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
Você precisa do [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) com Cmd. Adicione o seguinte num arquivo `starship.lua` e coloque este arquivo no diretório scripts do Clink:
```lua
-- starship.lua

View File

@ -1,18 +1,18 @@
# Configuração avançada
Ainda que Starship se`ja um shell versátil, às vezes você precisará fazer algumas outras coisas além de editar o arquivo <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.
:::
## Custom pre-prompt and pre-execution Commands in Cmd
## Comandos personalizados de pré-prompt e pré-execução no Cmd
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
O Clink fornece APIs extremamente flexíveis para executar comandos pré-prompt e pré-execução em Cmd shell. É bastante simples de usar com o Starship. Faça as seguintes alterações no seu arquivo `starship.lua` conforme suas necessidades:
- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do
- Para executar uma função personalizada logo antes do prompt ser inicializado, defina um novo função chamada `starship_preprompt_user_func`. Esta função recebe o prompt atual como uma string que você pode utilizar. Por exemplo, para exibir um foguete antes do prompt, você faria
```lua
function starship_preprompt_user_func(prompt)
@ -22,7 +22,7 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do
- Para executar uma função personalizada logo antes de um comando ser executado, defina um novo função chamada `starship_precmd_user_func`. Esta função recebe a linha de comando atual como uma string que você pode utilizar. Por exemplo, para imprimir o comando que está prestes a ser executado, você faria
```lua
function starship_precmd_user_func(line)
@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
## Comandos personalizados de pré-prompt e pré-execução no Bash
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering:
Bash não possui uma estrutura formal pré-prompt/pré-execução como a maioria dos outros shells. Por causa disso, é difícil fornecer ganchos totalmente personalizáveis no `bash`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering:
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
- Para executar uma função personalizada logo antes de o prompt ser inicializado, define uma nova função e, em seguida, atribui seu nome a `starship_precmd_user_func`. Por exemplo, para exibir um foguete antes do prompt, você faria
```bash
function blastoff(){
@ -45,21 +45,23 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- Para executar uma função personalizada logo antes de um comando ser executado, você pode usar o [`DEBUG` mecanismo de captura](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No entanto, você **deve** capturar o sinal DEBUG _antes_ de inicializar o Starship! Starship pode preservar o valor da captura do DEBUG, mas se a captura for substituída após a inicialização do starship, algumas funcionalidades serão interrompidas.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
trap blastoff DEBUG # Captura o DEBUG *antes* de executar a nave estelar
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
## Comandos personalizados de pré-prompt e pré-execução no PowerShell
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering:
PowerShell não possui uma estrutura formal pré-prompt/pré-execução como a maioria dos outros shells. Por causa disso, é difícil fornecer ganchos totalmente personalizáveis no `powershell`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering:
Create a function named `Invoke-Starship-PreCommand`
Crie uma função chamada `Invoke-Starship-PreCommand`
```powershell
function Invoke-Starship-PreCommand {
@ -67,11 +69,11 @@ function Invoke-Starship-PreCommand {
}
```
## Change Window Title
## Alterar Título da Janela
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
Alguns prompts do shell alterarão automaticamente o título da janela para você (ex., para refletir no seu diretório de trabalho). Fish ainda faz isso por padrão. Starship não faz isso, mas é bastante simples adicionar essa funcionalidade para `bash`, `zsh`, `cmd` ou `powershell`.
First, define a window title change function (identical in bash and zsh):
Primeiro, defina uma função de mudança de título da janela (idêntica em bash e zsh):
```bash
function set_win_title(){
@ -79,23 +81,23 @@ function set_win_title(){
}
```
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
Você pode usar variáveis para personalizar este título (`$USER`, `$HOSTNAME` e `$PWD` são escolhas populares).
In `bash`, set this function to be the precmd starship function:
No `bash`, defina esta função como a função precmd da nave estelar:
```bash
starship_precmd_user_func="set_win_title"
```
In `zsh`, add this to the `precmd_functions` array:
No `zsh`, adicione isso ao array `precmd_functions`:
```bash
precmd_functions+=(set_win_title)
```
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
Se você gostar do resultado, adicione estas linhas ao seu arquivo de configuração do shell (`~/.bashrc` ou `~/.zshrc`) para torná-lo permanente.
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
Por exemplo, se você deseja exibir seu diretório atual no título da guia do terminal, adicione o seguinte trecho ao seu `~/.bashrc` ou `~/.zshrc`:
```bash
function set_win_title(){
@ -104,7 +106,7 @@ function set_win_title(){
starship_precmd_user_func="set_win_title"
```
For Cmd, you can change the window title using the `starship_preprompt_user_func` function.
Para Cmd, você pode alterar o título da janela usando a função `starship_preprompt_user_func`.
```lua
function starship_preprompt_user_func(prompt)
@ -114,88 +116,88 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
Você também pode definir uma saída semelhante com o PowerShell criando uma função chamada `Invoke-Starship-PreCommand`.
```powershell
# edit $PROFILE
# editar $PROFILE
function Invoke-Starship-PreCommand {
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
}
Invoke-Expression (&starship init powershell)
Invoke-Expression (& starship init powershell)
```
## Enable Right Prompt
## Ativando o Prompt Direito
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
Alguns shells suportam um prompt direito que é renderizado na mesma linha que a entrada. Starship pode definir o conteúdo do prompt correto usando a opção `right_format`. Qualquer módulo que pode ser usado no `format` também é compatível com `right_format`. A variável `$all` conterá apenas módulos não usado explicitamente em `format` ou `right_format`.
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
Nota: O prompt direito é uma única linha após o local de entrada. Para alinhar à direita os módulos acima a linha de entrada em um prompt de várias linhas, consulte o [módulo fill](/config/#fill).
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd.
`right_format` é atualmente compatível com os seguintes shells: elvish, fish, zsh, xonsh, cmd.
### Exemplo
```toml
# ~/.config/starship.toml
# A minimal left prompt
# Um prompt mínimo à esquerda
format = """$character"""
# move the rest of the prompt to the right
# movw o restante do prompt para a direita
right_format = """$all"""
```
Produces a prompt like the following:
Produz um prompt como o seguinte:
```
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
```
## Continuation Prompt
## Prompt de Continuação
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
Alguns shells suportam um prompt de continuação junto com o prompt normal. Esse prompt é renderizado em vez do prompt normal quando o usuário insere uma instrução incompleta (como um único parêntese esquerdo ou aspas).
Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `"[∙](bright-black) "`.
Starship pode definir o prompt de continuação usando a opção `continuation_prompt`. O prompt padrão é `"[∙](bright-black) "`.
Note: `continuation_prompt` should be set to a literal string without any variables.
Nota: `continuation_prompt` deve ser definido como uma string literal sem nenhuma variável.
Note: Continuation prompts are only available in the following shells:
Nota: os prompts de continuação estão disponíveis apenas nos seguintes shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### Exemplo
```toml
# ~/.config/starship.toml
# A continuation prompt that displays two filled in arrows
# Um prompt de continuação que exibe duas setas preenchidas
continuation_prompt = "▶▶"
```
## Estilo dos textos
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
As strings de estilo são uma lista de palavras, separadas por espaços em branco. As palavras não diferenciam maiúsculas de minúsculas (ou seja, `bold` e `BoLd` são considerados a mesma string). Cada palavra pode ser uma das seguintes:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<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.
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`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- Uma das cores padrão do terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Você pode, opcionalmente, prefixar esses com `bright-` para obter a versão brilhante/clara (por exemplo, `bright-white`).
- Um `#` seguido por um número hexadecimal de seis dígitos. Especifica um [Código hexadecimal de cor RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Um número entre 0-255. Especifica um [Código de cores ANSI de 8 bits](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Se várias cores forem especificadas para primeiro plano/plano de fundo, a última na string terá prioridade.

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.`?
O Starship executa comandos diferentes para recuperar as informações para exibir no prompt, por exemplo a versão de um programa ou o status atual do git. Para ter certeza de que o starship não travou durante uma execução destes comandos nos definimos um limite de tempo, se um comando ultrapassar este limite o starship vai parar a execução do comando e exibe o alerta acima, esse é um comportamento esperado. Este limite de tempo é configurado usando o [`command_timeout` key](/config/#prompt) então se você quiser você pode aumentar este limite. Você pode também seguir os passos para debugar para ver qual comando esta demorando e se você pode otimizar ele. Finalmente você pode definir a variável de ambiente `STARSHIP_LOG` para `error` para esconder estes alertas.
O Starship executa comandos diferentes para recuperar as informações para exibir no prompt, por exemplo a versão de um programa ou o status atual do git. Para ter certeza de que o starship não travou durante uma execução destes comandos nos definimos um limite de tempo, se um comando ultrapassar este limite o starship vai parar a execução do comando e exibe o alerta acima, esse é um comportamento esperado. Este limite de tempo é configurado usando a [chave](/config/#prompt) `command_timeout` então se você quiser você pode aumentar este limite. Você pode também seguir os passos para debugar para ver qual comando esta demorando e se você pode otimizar ele. Finalmente você pode definir a variável de ambiente `STARSHIP_LOG` para `error` para esconder estes alertas.
## Eu vejo símbolos que não entendo ou não esperado, o que isso significa?
@ -117,6 +117,6 @@ Se o Starship foi instalando usando algum gerenciador de pacotes, por favor cons
Se o Starship foi instalado usando o script de instalação, o comando abaixo irá remover o binário:
```sh
# Locate and delete the starship binary
# Localiza e exclui o binário do starship
sh -c 'rm "$(command -v 'starship')"'
```

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)).
### 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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes:
Para atualizar o Starship de maneira manual, execute novamente o script acima. Isto irá substituir a versão atual sem alterar as configurações do Starship.
| Distribuição | Repositório | Instruções |
| -------------- | -------------------------------------------------------- | --------------------------------- |
| **_Qualquer_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**Nota** - Os padrões de instalação do script podem ser alteradas e substituídas, consulte a ajuda de built-in.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### Com o [Scoop](https://scoop.sh):
Instale a versão mais recente no seu sistema:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. Adicione o script de inicialização no arquivo de configuração do seu shell:
Ou instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes:
| Repositório | Instruções |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
Adicione o seguinte comando no final do arquivo `~/.bashrc`:
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes:
eval "$(starship init bash)"
```
| Repositório | Instruções |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<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
# ~/.zshrc
Você precisa do [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) com Cmd. Crie um arquivo neste caminho `%LocalAppData%\clink\starship.lua` com o seguinte conteúdo:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
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
# ~/.config/ion/initrc
Adicione o seguinte comando no final do arquivo `~/.config/fish/config.fish`:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
Adicione o seguinte ao final do arquivo `~/.xonshrc`:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### 3º passo. Configurar o Starship
Inicie uma nova instância de shell e você deverá ver seu belo novo prompt de shell. Se você estiver feliz com as configurações padrões, aproveite!
Se você estiver procurando personalizar ainda mais a Starship:
- **[Configuração](https://starship.rs/config/)** saiba como configurar o Starship para ajustar seu prompt ao seu gosto
- **[Predefinições](https://starship.rs/presets/)** - seja inspirado nas configurações pré-construídas pelos outros
## 🤝 Contribuindo
Nós estamos sempre procurando contribuidores de **todos os níveis de conhecimento**! Se você está buscando um caminho mais fácil para começar no projeto, veja essas [boas issues para começar](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
Nós estamos sempre procurando contribuidores de **todos os níveis de conhecimento**! Se você deseja facilitar seu caminho para o projeto, experimente uma [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
Se você é fluente em uma linguá não inglesa, nos ficaríamos gratos por qualquer ajuda em manter nossas documentações traduzidas e atualizadas em outras linguás. Se você deseja ajudar nas traduções, você pode contribuir no [Crowdin do Starship](https://translate.starship.rs/).
Se você é fluente em um idioma diferente do inglês, agradecemos qualquer ajuda para manter nossos documentos traduzidos e atualizados em outros idiomas. Se você quiser ajudar, as traduções podem ser contribuídas no [Crowdin do Starship](https://translate.starship.rs/).
Se você está interessado em ajudar contribuindo com o projeto, dê uma olhada no nosso [Guia de Contribuição](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Além disso, sinta-se à vontade para entrar no nosso [servidor no Discord](https://discord.gg/8Jzqu3T) e dizer oi. 👋
Se você estiver interessado em ajudar a contribuir com starship, dê uma olhada em nosso [Guia de Contribuição](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Além disso, sinta-se à vontade para entrar no nosso [servidor do Discord](https://discord.gg/8Jzqu3T) e diga oi. 👋
## 💭 Inspirado por
Por favor, confira estes projetos anteriores que ajudaram a inspirar a criação do startship. 🙏
Por favor, confira esses trabalhos anteriores que ajudaram a inspirar a criação do starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Um prompt ZSH para astronautas.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** Um prompt ZSH para astronautas.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Tema robbyrussell multi-shell escrito em JavaScript.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Tema robbyrussell para prompt em JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - Um prompt multi-shell personalizável com ícones como o powerline.
- **[reujab/silver](https://github.com/reujab/silver)** Um prompt personalizável com ícones do tipo powerline.
<p align="center">
<br>
@ -348,4 +416,4 @@ Por favor, confira estes projetos anteriores que ajudaram a inspirar a criação
## 📝 Licença
Todos os direitos reservados © 2019-Presente, [Contribuidores Starship](https://github.com/starship/starship/graphs/contributors).<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)"
```
*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

View File

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

View File

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

View File

@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### Example
@ -178,15 +180,15 @@ continuation_prompt = "▶▶"
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<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.
@ -194,8 +196,8 @@ The `none` token overrides all other tokens in a string if it is not part of a `
A color specifier can be one of the following:
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.

View File

@ -13,8 +13,8 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la
add_newline = true
# Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
# Disable the package module, hiding it from the prompt completely
[package]
@ -155,7 +155,6 @@ This is the list of prompt-wide configuration options.
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
### Example
```toml
@ -185,6 +184,7 @@ format = "$all"
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
@ -200,6 +200,7 @@ $docker_context\
$package\
$cmake\
$cobol\
$container\
$dart\
$deno\
$dotnet\
@ -255,7 +256,7 @@ If you just want to extend the default format, you can use `$all`; modules you e
```toml
# Move the directory to the second line
format="$all$directory$character"
format = "$all$directory$character"
```
## AWS
@ -289,7 +290,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Examples
@ -411,17 +412,16 @@ The `display` option is an array of the following table.
#### Example
```toml
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
threshold = 10
style = "bold red"
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
threshold = 30
style = "bold yellow"
discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed
```
## Character
@ -522,7 +522,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## COBOL / GNUCOBOL
@ -552,7 +552,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
## Command Duration
@ -568,21 +568,16 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options
| Option | Default | Description |
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
::: tip
Showing desktop notifications requires starship to be built with `notify-rust` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
:::
| Option | Default | Description |
| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
| `notification_timeout` | | Duration to show notification for (in milliseconds). If unset, notification timeout will be determined by daemon. Not all notification daemons honor this option. |
### Variables
@ -591,7 +586,7 @@ Showing desktop notifications requires starship to be built with `notify-rust` s
| duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -632,7 +627,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -643,6 +638,38 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
format = "[$symbol$environment](dimmed green) "
```
## Container
The `container` module displays a symbol and container name, if inside a container.
### Options
| Option | Default | Description |
| ---------- | ------------------------------------ | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | "[$symbol \\[$name\\]]($style) " | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
| Variable | Example | Description |
| --------- | ------------------- | ------------------------------------ |
| name | `fedora-toolbox:35` | The name of the container |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
```
## Crystal
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met:
@ -671,7 +698,7 @@ The `crystal` module shows the currently installed version of [Crystal](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -711,7 +738,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -725,6 +752,7 @@ format = "via [🔰 $version](bold red) "
## Deno
The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### Options
@ -809,7 +837,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| path | `"D:/Projects"` | The current directory path |
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -846,7 +874,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -901,7 +929,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -942,7 +970,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -984,7 +1012,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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 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.
Example: following configuration will display value of USER environment variable
```toml
# ~/.config/starship.toml
[env_var.USER]
default = "unknown user"
```
:::
### Options
@ -1032,7 +1061,7 @@ default = "unknown user"
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1045,6 +1074,7 @@ default = "unknown shell"
```
Displaying multiple environmental variables:
```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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1110,7 +1140,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
```toml
# ~/.config/starship.toml
format="AA $fill BB $fill CC"
format = "AA $fill BB $fill CC"
[fill]
symbol = "-"
@ -1121,7 +1151,6 @@ Produces a prompt that looks like:
```
AA -------------------------------------------- BB -------------------------------------------- CC
```
## 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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 |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| 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
@ -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. |
| style\* | Mirrors the value of option `style` |
\*: This variable 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`:
@ -1408,7 +1437,7 @@ ahead = "🏎💨"
behind = "😰"
diverged = "😵"
up_to_date = "✓"
untracked = "🤷"
untracked = "🤷"
stashed = "📦"
modified = "📝"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1532,7 +1561,7 @@ The `hostname` module shows the system hostname.
| hostname | `computer` | The hostname of the computer |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1541,7 +1570,7 @@ The `hostname` module shows the system hostname.
[hostname]
ssh_only = false
format = "on [$hostname](bold red) "
format = "on [$hostname](bold red) "
trim_at = ".companyname.com"
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1587,7 +1616,7 @@ symbol = "🌟 "
## 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:
@ -1611,16 +1640,15 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| 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`. |
| `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. |
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
| `style` | `"bold blue"` | The style for the 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1672,7 +1700,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -1683,6 +1711,39 @@ The `julia` module shows the currently installed version of [Julia](https://juli
symbol = "∴ "
```
## localip
The `localip` module shows the IPv4 address of the primary network interface.
### 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
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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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. |
| `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_files` | `["package.json", ".node-version"]` | Which filenames 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2099,7 +2160,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2132,7 +2193,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### 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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2280,7 +2341,7 @@ format = "via [🔹 $version](147 bold) "
## Pulumi
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version.
::: tip
@ -2295,13 +2356,13 @@ By default the module will be shown if any of the following conditions are met:
### Options
| Option | Default | Description |
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
| Option | Default | Description |
| ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `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` |
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
| `style` | `"bold 5"` | The style for the module. |
| `disabled` | `false` | Disables the `pulumi` module. |
### 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` |
| stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2332,7 +2394,6 @@ format = "[🛥 ($version )$stack]($style) "
[pulumi]
symbol = "🛥 "
format = "[$symbol$stack]($style) "
```
## PureScript
@ -2363,7 +2424,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2532,7 +2593,7 @@ By default the `red` module shows the currently installed version of [Red](https
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2576,7 +2637,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2615,7 +2676,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2655,7 +2716,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -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. |
| style\* | | Mirrors the value of option `style`. |
\*: This variable 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
@ -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` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2774,7 +2835,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2787,7 +2848,7 @@ format = '[📦 \[$env\]]($style) '
## Status
The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`.
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
@ -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 |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `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 |
| `disabled` | `true` | Disables the `status` module. |
@ -2831,12 +2892,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[status]
@ -2845,7 +2905,6 @@ symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true
disabled = false
```
## Sudo
@ -2875,12 +2934,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[sudo]
@ -2926,7 +2984,7 @@ By default the `swift` module shows the currently installed version of [Swift](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -2974,7 +3032,7 @@ By default the module will be shown if any of the following conditions are met:
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3027,7 +3085,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3114,7 +3172,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3128,6 +3186,7 @@ format = "via [⍱ $version](bold white) "
## V
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a file with `.v` extension
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
@ -3181,7 +3240,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3219,7 +3278,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
### Example
@ -3293,7 +3352,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
*: This variable can only be used as a part of a style string
#### Custom command shell
@ -3330,13 +3389,13 @@ Automatic detection of shells and proper parameters addition are currently imple
# ~/.config/starship.toml
[custom.foo]
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
command = "echo foo" # shows output of command
files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
format = " transcending [$output]($style)"
[custom.time]
command = "time /T"
extensions = ["pst"] # filters *.pst files
extensions = ["pst"] # filters *.pst files
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
```

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?
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?

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)).
### 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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**Note** - The defaults of the install script can be overridden see the built-in help.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### With [Scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. Add the init script to your shell's config file:
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
Add the following to the end of `~/.bashrc`:
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<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
# ~/.zshrc
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
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
# ~/.config/ion/initrc
Add the following to the end of `~/.config/fish/config.fish`:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
Add the following to the end of `~/.xonshrc`:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Step 3. Configure Starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
If you're looking to further customize Starship:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝 Contributing
@ -335,11 +403,11 @@ If you are interested in helping contribute to starship, please take a look at o
Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<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)"
```
*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

View File

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

View File

@ -28,9 +28,9 @@ description: Starship - минимальная, быстрая и бесконе
</video>
</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
Добавьте следующее в конец `Microsoft.PowerShell_profile.ps1`. Вы можете проверить местоположение этого файла, запросив переменную `$PROFILE` в PowerShell. Обычно он находится в `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` или `~/.config/powershell/Microsoft.PowerShell_profile.ps1` на -Nix.
Добавьте следующее в конец `Microsoft.PowerShell_profile.ps1`. Вы можете узнать расположение этого файла, запросив переменную `$PROFILE` в PowerShell. Обычно он находится в `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` или `~/.config/powershell/Microsoft.PowerShell_profile.ps1` на -Nix.
```sh
Invoke-Expression (&starship init powershell)
@ -119,7 +119,7 @@ description: Starship - минимальная, быстрая и бесконе
#### Elvish
::: warning Only elvish v0.17 or higher is supported. :::
::: warning Поддерживается только elvish v0.17 или выше. :::
Добавьте следующую строку в конец `~/.elvish/rc.elv`:
@ -143,13 +143,13 @@ description: Starship - минимальная, быстрая и бесконе
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
::: warning Это будет изменено. Поддерживается только nu версии v0.33 или выше. ::: Добавьте следующее в свой конфигурационный файл nu. Вы можете узнать расположение этого файла, выполнив `config path` в nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu",
]
prompt = "starship_prompt"
```
@ -157,7 +157,7 @@ description: Starship - минимальная, быстрая и бесконе
#### Xonsh
Add the following to the end of `~/.xonshrc`:
Добавьте следующее в конец `~/.xonshrc`:
```sh
# ~/.xonshrc

View File

@ -32,11 +32,11 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
## Пользовательские команды перед командной строкой и перед запуском Bash
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. Тем не менее, Starship дает вам ограниченную возможность вставить собственные функции в процедуру отображения подсказки:
Bash не имеет формальной среды preexec/precmd, как и большинство других оболочек. Из-за этого трудно предоставить полностью настраиваемые хуки в `bash`. Тем не менее, Starship дает вам ограниченную возможность вставить собственные функции в процедуру отображения подсказки:
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
- Чтобы запустить пользовательскую функцию прямо перед отображением подсказки, определите новую функцию и затем назначьте ей имя `starship_precmd_user_func`. Например, чтобы нарисовать ракету перед появлением подсказки, сделайте
```bash
function blastoff(){
@ -45,14 +45,16 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Тем не менее, вы **должны** поймать сигнал DEBUG _перед_ инициализацией Starship! Starship может сохранить значение ловушки DEBUG, но если ловушка перезаписана после запуска Starship, некоторая функциональность сломается.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
@ -67,11 +69,11 @@ function Invoke-Starship-PreCommand {
}
```
## Change Window Title
## Изменение заголовка окна
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish даже делает это по умолчанию. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
First, define a window title change function (identical in bash and zsh):
Сначала задайте функцию изменения заголовка окна (идентичную в bash и zsh):
```bash
function set_win_title(){
@ -79,15 +81,15 @@ function set_win_title(){
}
```
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
Вы можете использовать переменные для настройки этого заголовка (`$USER`, `$HOSTNAME`, и `$PWD` являются популярными вариантами).
In `bash`, set this function to be the precmd starship function:
В `bash`, установите эту функцию как функцию precmd в Starship:
```bash
starship_precmd_user_func="set_win_title"
```
In `zsh`, add this to the `precmd_functions` array:
В `zsh`, добавьте это в массив `precmd_functions`:
```bash
precmd_functions+=(set_win_title)
@ -95,7 +97,7 @@ precmd_functions+=(set_win_title)
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
Например, если вы хотите отобразить ваш текущий каталог в заголовке вкладки терминала, добавьте следующие строки в `~/. bashrc` или `~/.zshrc`:
```bash
function set_win_title(){
@ -161,9 +163,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
- `bash`
- `zsh`
- `PowerShell`
### Пример
@ -176,26 +178,26 @@ continuation_prompt = "▶▶"
## Строки стиля
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
Строки стиля - это список слов, разделенных пробелами. Слова не чувствительны к регистру (то есть `bold` и `BoLd` считаются одной строкой). Каждое слово может быть одним из следующих:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `bg:<color>`
- `fg:<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>` 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`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- `#`, за которой следует шестизначное шестнадцатеричное число. Это определяет [шестнадцатеричный код цвета RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Число от 0 до 255. Это определяет [8-битный код цвета ANSI](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Если для переднего плана/фона задано несколько цветов, то последняя из строк будет иметь приоритет.

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?
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?

View File

@ -169,163 +169,231 @@
- Установленный и включённый [шрифт Powerline](https://www.nerdfonts.com/) (например, [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
### Начало работы
### Step 1. Install Starship
**Примечание**: из-за распространения большого количества операционных систем, список поддерживаемых указан ниже. Can't see yours? Ознакомьтесь с [дополнительными инструкциями по платформе](https://starship.rs/installing/).
Select your operating system from the list below to view installation instructions:
1. Установите двоичный файл **starship**:
<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
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
Install Starship using any of the following package managers:
Для обновления Starship перезапустите этот скрипт. Он заменит текущую версию без изменения конфигурации.
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
**Примечание** - Значения по умолчанию из установочного скрипта могут быть переопределены. Для уточнения смотрите встроенную справку.
</details>
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
```
<details>
<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
brew install starship
```
</details>
<details>
<summary>macOS</summary>
##### С [Scoop](https://scoop.sh):
Install the latest version for your system:
```powershell
scoop install starship
```
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
2. Добавить сценарий инициализации в конфигурационный файл вашей оболочки:
Alternatively, install Starship using any of the following package managers:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
#### Bash
</details>
Добавьте следующее в конец `~/.bashrc`:
<details>
<summary>Windows</summary>
```sh
# ~/.bashrc
Install Starship using any of the following package managers:
eval "$(starship init bash)"
```
| Repository | Instructions |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
</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
# ~/.config/fish/config.fish
<details>
<summary>Bash</summary>
starship init fish | source
```
Добавьте следующее в конец `~/.bashrc`:
```sh
eval "$(starship init bash)"
```
#### Zsh
</details>
Добавьте следующее в конец `~/.zshrc`:
<details>
<summary>Cmd</summary>
```sh
# ~/.zshrc
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
eval "$(starship init zsh)"
```
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</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
Invoke-Expression (&starship init powershell)
```
```sh
eval (starship init elvish)
```
Note: Only Elvish v0.17+ is supported
#### Ion
</details>
Добавьте следующее в конец `~/.config/ion/initrc`:
<details>
<summary>Fish</summary>
```sh
# ~/.config/ion/initrc
Добавьте следующее в конец `~/.config/fish/config.fish`:
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
# ~/.elvish/rc.elv
```sh
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
# ~/.tcshrc
</details>
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
# ~/.xonshrc
<details>
<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
-- starship.lua
Добавьте следующее в конец `~/.xonshrc`:
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
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
```sh
eval "$(starship init zsh)"
```
</details>
### Step 3. Configure Starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
If you're looking to further customize Starship:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝 Помощь
Мы всегда ищем помощь людей **всех уровней навыков**! Если вы хотите облегчить свой путь к проекту, посмотрите хорошие первые ошибки ([first good issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)).
Мы всегда ищем помощников **всех уровней навыков**! Если вы хотите облегчить свой путь к проекту, попробуйте [хорошие первые задачи](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
Если Вы свободно владеете иностранным языком отличным от английского, мы высоко оценим любую помощь в переводе нашей документации на другие языки и поддержании ее в актуальном состоянии. Если вы хотите помочь, переводы могут быть сделаны на платформе [Starship Crowdin](https://translate.starship.rs/).
@ -335,11 +403,11 @@
Пожалуйста, ознакомьтесь с этими предыдущими работами, которые помогли вдохновить создание Starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - командная строка ZSH для астронавтов.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - меж-оболочная тема robbyrussell, написаная на JavaScript.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - меж-оболочная настраиваемая командная строка с иконками.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<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)
### Требования
### Обязательные требования
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
@ -23,7 +23,7 @@ choco install starship
## [termux](https://termux.com)
### Требования
### Обязательные требования
```sh
pkg install getconf

View File

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

View File

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

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