diff --git a/docs/de-DE/config/README.md b/docs/de-DE/config/README.md
index fe12ce53..fe803aa9 100644
--- a/docs/de-DE/config/README.md
+++ b/docs/de-DE/config/README.md
@@ -1,18 +1,12 @@
# Konfiguration
-::: tip
-
-🔥 Die Konfiguration befindet sich derzeit noch in der Entwicklung. Viele neue Konfigurationsoptionen werden in den kommenden Versionen verfügbar sein.
-
-:::
-
-Um mit der Konfiguration von Starship zu beginnen, musst du die folgende Datei erstellen: `~/.config/starship.toml`.
+To get started configuring starship, create the following file: `~/.config/starship.toml`.
```sh
mkdir -p ~/.config && touch ~/.config/starship.toml
```
-Die gesamte Konfiguration von Starship wird über diese [TOML](https://github.com/toml-lang/toml)-Datei durchgeführt:
+All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
```toml
# Don't print a new line at the start of the prompt
@@ -27,7 +21,7 @@ success_symbol = "[➜](bold green)" # The "success_symbol" segment is being
disabled = true
```
-Sie können den Pfad zur `starship.toml` mit der `STARSHIP_CONFIG` Umgebungsvariable ändern:
+You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable:
```sh
export STARSHIP_CONFIG=~/.starship
@@ -39,9 +33,23 @@ Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
```
-### Terminologie
+### Logging
-**Module**: Eine Komponente in der Konsole, die auf kontextualisierte Informationen des OS basiert. Zum Beispiel zeigt das Modul "nodejs" die Version von NodeJS, die derzeit auf Ihrem Computer installiert ist, wenn Ihr aktuelles Verzeichnis ein NodeJS-Projekt ist.
+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:
+
+```sh
+export STARSHIP_CACHE=~/.starship/cache
+```
+
+Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
+
+```ps1
+$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
+```
+
+### Terminology
+
+**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project.
**Variable**: Smaller sub-components that contains information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS.
@@ -77,7 +85,7 @@ For example:
#### Style-Strings
-Die meisten Module in Starship lassen dich den Darstellungsstil verändern. Dies passiert meistens an einem bestimmten Eintrag (gewöhnlich `style` genannt), der einen String mit den Einstellungen darstellt. Es folgen ein paar Beispiele für solche Strings zusammen mit Beschreibungen was sie bewirken. Details zur vollen Syntax findest du im [Erweiterten Konfigurationshandbuch](/advanced-config/).
+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/).
- `"fg:green bg:blue"` setzt grünen Text auf blauen Hintergrund
- `"bg:blue fg:bright-green"` setzt hell-grünen Text auf blauen Hintergrund
@@ -86,7 +94,7 @@ Die meisten Module in Starship lassen dich den Darstellungsstil verändern. Dies
- `"bold italic fg:purple"` setzt dicke lila Kursivschrift
- `""` deaktiviert explizit jeden Stil
-Wie genau sich diese Konfiguration auswirkt liegt an deinem Terminal-Emulator. Einige Emulatoren zum Beispiel werden die Farben erhellen statt Text dick zu machen, und ein paar Farbthemen benutzen dieselben Werte für normale und helle Farben. Für kursiven Text muss dein Terminal Kursivschrift unterstützen.
+Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics.
#### Conditional Format Strings
@@ -102,7 +110,7 @@ For example:
The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`).
-- $
+- \$
- \\
- [
- ]
@@ -130,23 +138,21 @@ format = '''
## Prompt
-Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen.
+This is the list of prompt-wide configuration options.
### Optionen
-| Option | Standardwert | Beschreibung |
-| -------------- | ------------------------------ | ------------------------------------------------------- |
-| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
-| `scan_timeout` | `30` | Timeout für das Scannen von Dateien (in Millisekunden). |
+| Option | Standardwert | Beschreibung |
+| -------------- | ------------------------------ | ----------------------------------------------------- |
+| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
+| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
+| `add_newline` | `true` | Add a new line before the start of the prompt. |
### Beispiel
```toml
# ~/.config/starship.toml
-# Disable the newline at the start of the prompt
-format = "$all"
-
# Use custom format
format = """
[┌───────────────────>](bold green)
@@ -155,20 +161,23 @@ format = """
# Wait 10 milliseconds for starship to check files under the current directory.
scan_timeout = 10
+
+# Disable the newline at the start of the prompt
+add_newline = false
```
### Default Prompt Format
-The default `format` is used to define the format of the prompt, if empty or no `format` is provided. Die Standardwerte sind folgende:
+The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown:
```toml
-format = "\n$all"
+format = "$all"
# Which is equivalent to
format = """
-
$username\
$hostname\
+$shlvl\
$kubernetes\
$directory\
$git_branch\
@@ -179,6 +188,7 @@ $hg_branch\
$docker_context\
$package\
$cmake\
+$dart\
$dotnet\
$elixir\
$elm\
@@ -190,17 +200,20 @@ $julia\
$nim\
$nodejs\
$ocaml\
+$perl\
$php\
$purescript\
$python\
$ruby\
$rust\
+$swift\
$terraform\
$zig\
$nix_shell\
$conda\
$memory_usage\
$aws\
+$gcloud\
$env_var\
$crystal\
$cmd_duration\
@@ -209,12 +222,13 @@ $line_break\
$jobs\
$battery\
$time\
+$status\
$character"""
```
## AWS
-Das `aws`-Modul zeigt das aktuelle AWS-Profil an. Dies basiert auf den Umgebungsvariablen: `AWS_REGION`, `AWS_DEFAULT_REGION`, `AWS_PROFILE` und der `~/.aws/config` Datei.
+The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file.
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
@@ -282,7 +296,7 @@ symbol = "🅰 "
## Akkustand
-Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den aktuellen Ladestatus. Das Modul ist nur sichtbar, wenn der Akku des Geräts unter 10% geladen ist.
+The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
### Optionen
@@ -296,7 +310,7 @@ Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den akt
| `disabled` | `false` | Wenn der Wert auf `true` steht, wird das Akkustand-Modul deaktiviert. |
-Explore the Starship docs ▶
+Explore the Starship docs ▶
Das Batterie-Modul unterstützt auch einige untypische Zustände.
+There are also options for some uncommon battery states.
| Variable | Beschreibung |
| ---------------- | --------------------------------------------------- |
@@ -318,9 +332,9 @@ charging_symbol = "⚡️"
discharging_symbol = "💀"
```
-### Anzeige des Akkustandes
+### Battery Display
-Die `display` Konfiguration "threshold" stellt ein ab wann die Akkuanzeige eingeblendet wird. Mit "style" wird das Erscheinungsbild festgelegt. Wenn `display` nicht angegeben ist. Die Standardwerte sind folgende:
+The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown:
```toml
[[battery.display]]
@@ -330,7 +344,7 @@ style = "bold red"
#### Optionen
-Die `display`-Option beinhaltet ein Array mit den folgenden Werten.
+The `display` option is an array of the following table.
| Variable | Beschreibung |
| ----------- | ------------------------------------------------------- |
@@ -340,23 +354,23 @@ Die `display`-Option beinhaltet ein Array mit den folgenden Werten.
#### Beispiel
```toml
-[[battery.display]] # "bold red" bei Akkustand zwischen 0–10%
+[[battery.display]] # "bold red" style when capacity is between 0% and 10%
threshold = 10
style = "bold red"
-[[battery.display]] # "bold yellow" bei Akkustand zwischen 10–30%
+[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
threshold = 30
style = "bold yellow"
-# Bei Akkustand über 30% wird der Akkustand nicht angezeigt
+# when capacity is over 30%, the battery indicator will not be displayed
```
## Zeichen
-Das `character` Modul zeigt ein Zeichen ( meistens einen Pfeil "❯") vor der Texteingabe an.
+The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
-Das Zeichen zeigt an ob der letzte Befehl erfolgreich war, oder einen Fehler erzeugt hat. It can do this in two ways:
+The character will tell you whether the last command was successful or not. It can do this in two ways:
- changing color (`red`/`green`)
- changing shape (`❯`/`✖`)
@@ -437,15 +451,15 @@ The `cmake` module shows the currently installed version of CMake if:
## Befehlsdauer
-Das `cmd_duration` Modul zeigt an wie lange der letzte Befehl ausgeführt wurde. Das Modul wird nur angezeigt wenn der letzte Befehl länger als zwei Sekunden ausgeführt wurde. Mit der `min_time` Option kann die Zeit eingestellt werden ab der `cmd_duration` angezeigt wird.
+The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
-::: warning Nicht die DEBUG-trap in der Bash hooken
+::: warning Do not hook the DEBUG trap in Bash
-Ist `bash` die Konsole der Wahl, dann nicht die `DEBUG`-trap nach der Ausführung von `eval $(starship init $0)` hooken, andernfalls **wird** dieses Modul unweigerlich untergehen.
+If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
:::
-Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras bash_preexec Framework](https://github.com/rcaloras/bash-preexec) verwenden. Definieren Sie einfach die Arrays `preexec_functions` und `precmd_functions` bevor sie `eval $(starship init $0)` ausführen, und fahren Sie dann wie gewohnt fort.
+Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
### Optionen
@@ -478,11 +492,11 @@ format = "underwent [$duration](bold yellow)"
## Conda
-Das `conda`-Modul zeigt dessen aktuelle Umgebung an, sofern `$CONDA_DEFAULT_ENV` gesetzt ist.
+The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
-::: Tipp
+::: tip
-Hinweis: Dies unterdrückt nicht conda's eigenen Prompt-Modifikator, sie können jedoch conda mit `conda config --set changeps1 False` konfigurieren, um die Ausgabe von conda selbst auszuschalten.
+This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
:::
@@ -494,7 +508,8 @@ Hinweis: Dies unterdrückt nicht conda's eigenen Prompt-Modifikator, sie können
| `symbol` | `"🅒 "` | Symbol das vor dem Umgebungsnamen angezeigt wird. |
| `style` | `"bold green"` | Stil für dieses Modul. |
| `format` | `"[$symbol$environment]($style) "` | The format for the module. |
-| `disabled` | `false` | Deaktiviert das `conda`-Modul. |
+| `ignore_base` | `true` | Ignores `base` environment when activated. |
+| `disabled` | `false` | Disables the `conda` module. |
### Variables
@@ -550,9 +565,45 @@ The `crystal` module shows the currently installed version of Crystal. Das Modul
format = "via [✨ $version](bold blue) "
```
-## Verzeichnis
+## Dart
-Das `directory` -Modul zeigt den Pfad zu Ihrem aktuellen Verzeichnis an, abgeschnitten auf drei übergeordnete Ordner. Your directory will also be truncated to the root of the git repo that you're currently in.
+The `dart` module shows the currently installed version of Dart. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
+
+- The current directory contains a file with `.dart` extension
+- The current directory contains a `.dart_tool` directory
+- The current directory contains a `pubspec.yaml` or `pubspec.lock` file
+
+### Optionen
+
+| Variable | Standartwert | Beschreibung |
+| ---------- | ---------------------------------- | ----------------------------------------------- |
+| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `symbol` | `"🎯 "` | A format string representing the symbol of Dart |
+| `style` | `"bold blue"` | Stil für dieses Modul. |
+| `disabled` | `false` | Disables the `dart` module. |
+
+### Variables
+
+| Variable | Beispiel | Beschreibung |
+| --------- | -------- | ------------------------------------ |
+| version | `v2.8.4` | The version of `dart` |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+### Beispiel
+
+```toml
+# ~/.config/starship.toml
+
+[dart]
+format = "via [🔰 $version](bold red) "
+```
+
+## Directory
+
+The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
@@ -560,18 +611,18 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
### Optionen
-| Variable | Standartwert | Beschreibung |
+| Variable | Standardwert | Beschreibung |
| ------------------------ | ----------------------------------------------- | -------------------------------------------------------------------------------- |
-| `truncation_length` | `3` | Die Anzahl der übergeordneten Ordner, die angezeigt werden. |
+| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
| `format` | `"[$path]($style)[$lock_symbol]($lock_style) "` | The format for the module. |
| `style` | `"bold cyan"` | Stil für dieses Modul. |
-| `disabled` | `false` | Deaktiviert das `directory`-Modul. |
+| `disabled` | `false` | Disables the `directory` module. |
| `read_only_symbol` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_symbol_style` | `"red"` | The style for the read only symbol. |
Dieses Modul hat einige erweiterte Konfigurationsoptionen, welche die Darstellung von Verzeichnissen steuern.
+This module has a few advanced configuration options that control how the directory is displayed.
| Advanced Option | Standardwert | Beschreibung |
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
@@ -666,13 +717,13 @@ The module will also show the Target Framework Moniker (This module has some advanced configuration options.
-| Variable | Standartwert | Beschreibung |
+| Variable | Standardwert | Beschreibung |
| --------------- | ------------ | ----------------------------------------------------------------------------- |
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
@@ -1684,16 +1843,15 @@ python_binary = "python3"
[python]
symbol = "👾 "
pyenv_version_name = true
-pyenv_prefix = "foo "
```
## Ruby
-Das `ruby` Modul zeigt die derzeit installierte Version von Ruby an. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
+The `ruby` module shows the currently installed version of Ruby. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
-- Das aktuelle Verzeichnis enthält eine `Gemfile`-Datei
+- The current directory contains a `Gemfile` file
- The current directory contains a `.ruby-version` file
-- Das aktuelle Verzeichnis enthält eine `.rb`-Datei
+- The current directory contains a `.rb` file
### Optionen
@@ -1702,7 +1860,7 @@ Das `ruby` Modul zeigt die derzeit installierte Version von Ruby an. Das Modul w
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | Stil für dieses Modul. |
-| `disabled` | `false` | Deaktiviert das `ruby`-Modul. |
+| `disabled` | `false` | Disables the `ruby` module. |
### Variables
@@ -1725,10 +1883,10 @@ symbol = "🔺 "
## Rust
-Das `rust` Modul zeigt die derzeit installierte Version von Rust an. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
+The `rust` module shows the currently installed version of Rust. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
-- Das aktuelle Verzeichnis enthält eine `Cargo.toml`-Datei
-- Das aktuelle Verzeichnis enthält eine Datei mit der `.rs`-Erweiterung
+- The current directory contains a `Cargo.toml` file
+- The current directory contains a file with the `.rs` extension
### Optionen
@@ -1737,7 +1895,7 @@ Das `rust` Modul zeigt die derzeit installierte Version von Rust an. Das Modul w
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | Stil für dieses Modul. |
-| `disabled` | `false` | Deaktiviert das `rust`-Modul. |
+| `disabled` | `false` | Disables the `rust` module. |
### Variables
@@ -1758,6 +1916,41 @@ Das `rust` Modul zeigt die derzeit installierte Version von Rust an. Das Modul w
format = "via [⚙️ $version](red bold)"
```
+## SHLVL
+
+The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
+
+### Optionen
+
+| Variable | Standartwert | Beschreibung |
+| ----------- | ---------------------------- | --------------------------------------- |
+| `threshold` | `2` | Display threshold. |
+| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
+| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. |
+| `style` | `"bold yellow"` | Stil für dieses Modul. |
+| `disabled` | `true` | Disables the `shlvl` module. |
+
+### Variables
+
+| Variable | Beispiel | Beschreibung |
+| --------- | -------- | ------------------------------------ |
+| shlvl | `3` | The current value of SHLVL |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+### Beispiel
+
+```toml
+# ~/.config/starship.toml
+
+[shlvl]
+disabled = false
+format = "$shlvl level(s) down"
+threshold = 3
+```
+
## Singularity
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
@@ -1790,21 +1983,98 @@ The `singularity` module shows the current singularity image, if inside a contai
format = "[📦 \\[$env\\]]($style) "
```
-## Terraform
+## Swift
-Das `Terraform` Modul zeigt den aktuell ausgewählten terraform Arbeitsbereich und die Version an. Standardmäßig wird die Terraform-Version nicht angezeigt, da dies bei aktuellen Versionen von Terraform langsam ist, wenn viele Plugins verwendet werden. If you still want to enable it, [follow the example shown below](#with-version). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
+The `swift` module shows the currently installed version of Swift. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
-- Das aktuelle Verzeichnis enthält eine `.terraform`-Datei
-- Das aktuelle Verzeichnis enthält eine Datei mit der `.tf`-Erweiterung
+- The current directory contains a `Package.swift` file
+- The current directory contains a file with the `.swift` extension
### Optionen
-| Option | Standartwert | Beschreibung |
+| Option | Standartwert | Beschreibung |
+| ---------- | ---------------------------------- | ------------------------------------------------ |
+| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `symbol` | `"🐦 "` | A format string representing the symbol of Swift |
+| `style` | `"bold 202"` | Stil für dieses Modul. |
+| `disabled` | `false` | Disables the `swift` module. |
+
+### Variables
+
+| Variable | Beispiel | Beschreibung |
+| --------- | -------- | ------------------------------------ |
+| version | `v5.2.4` | The version of `swift` |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+### Beispiel
+
+```toml
+# ~/.config/starship.toml
+
+[swift]
+format = "via [🏎 $version](red bold)"
+```
+
+## 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`.
+
+::: tip
+
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
+
+### Optionen
+
+| Variable | Standartwert | Beschreibung |
+| ---------- | -------------------------- | ------------------------------------------------------ |
+| `format` | `[$symbol$status]($style)` | The format of the module |
+| `symbol` | `"✖"` | A format string representing the symbol for the status |
+| `style` | `"bold red"` | Stil für dieses Modul. |
+| `disabled` | `true` | Disables the `status` module. |
+
+
+### Variables
+
+| Variable | Beispiel | Beschreibung |
+| --------- | -------- | ------------------------------------ |
+| status | `127` | The exit code of the last command |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+
+### Beispiel
+```toml
+
+# ~/.config/starship.toml
+
+[status]
+style = "bg:blue"
+symbol = "💣 "
+format = "[\\[$symbol$status\\]]($style) "
+disabled = false
+
+```
+
+## Terraform
+
+The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
+
+- The current directory contains a `.terraform` folder
+- Current directory contains a file with the `.tf` extension
+
+### Optionen
+
+| Option | Standardwert | Beschreibung |
| ---------- | ------------------------------------ | ----------------------------------------------------- |
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
| `symbol` | `"💠 "` | A format string shown before the terraform workspace. |
| `style` | `"bold 105"` | Stil für dieses Modul. |
-| `disabled` | `false` | Deaktiviert das `terraform` Modul. |
+| `disabled` | `false` | Disables the `terraform` module. |
### Variables
@@ -1837,35 +2107,35 @@ format = "[🏎💨 $version$workspace]($style) "
format = "[🏎💨 $workspace]($style) "
```
-## Zeit
+## Time
-Das `time` Modul zeigt die aktuelle **lokale** Zeit an. Der `format` Wert wird von der crate [`chrono`](https://crates.io/crates/chrono) benutzt um die Zeit zu formatieren. Schau dir [die chrono strftime Dokumentation](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) an, um die möglichen Optionen zu sehen.
+The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
-::: Tipp
+::: tip
-Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Optionen
-| Option | Standartwert | Beschreibung |
-| ----------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
-| `format` | `"at [$time]($style) "` | The format string for the module. |
-| `use_12hr` | `false` | Aktiviert 12-Stunden-Format |
-| `time_format` | siehe unten | Das Format zum Anzeigen der Uhrzeit in [chrono-Formatierung](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html). |
-| `style` | `"bold yellow"` | Stil für dieses Modul |
-| `utc_time_offset` | `"local"` | Verwendetes Zeitzonen-Offset. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
-| `disabled` | `true` | Deaktiviert das `time`-Modul. |
-| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
+| Option | Standardwert | Beschreibung |
+| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
+| `format` | `"at [$time]($style) "` | The format string for the module. |
+| `use_12hr` | `false` | Enables 12 hour formatting |
+| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
+| `style` | `"bold yellow"` | The style for the module time |
+| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
+| `disabled` | `true` | Disables the `time` module. |
+| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
-If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Andernfalls ist es standardmäßig `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
+If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
### Variables
| Variable | Beispiel | Beschreibung |
| --------- | ---------- | ----------------------------------- |
-| zeit | `13:08:10` | The current time. |
+| 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
@@ -1885,22 +2155,22 @@ time_range = "10:00:00-14:00:00"
## Username
-Das `username` Modul zeigt den Namen des aktiven Benutzers. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
+The `username` module shows active user's username. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
-- Der aktuelle Benutzer ist root
-- Der aktuelle Benutzer ist nicht der eingeloggte Benutzer
-- Der Benutzer ist aktuell via SSH verbunden
-- Die Variable `show_always` ist auf true gesetzt
+- The current user is root
+- The current user isn't the same as the one that is logged in
+- The user is currently connected as an SSH session
+- The variable `show_always` is set to true
### Optionen
-| Option | Standartwert | Beschreibung |
-| ------------- | ------------------------ | ---------------------------------------------- |
-| `style_root` | `"bold red"` | Stil wenn der Benutzer unter root läuft. |
-| `style_user` | `"bold yellow"` | Stil wenn der Benutzer nicht unter root läuft. |
-| `format` | `"via [$user]($style) "` | The format for the module. |
-| `show_always` | `false` | Immer das `username` Modul anzeigen. |
-| `disabled` | `false` | Deavktiviert das `username` Modul. |
+| Option | Standardwert | Beschreibung |
+| ------------- | ----------------------- | ------------------------------------- |
+| `style_root` | `"bold red"` | The style used when the user is root. |
+| `style_user` | `"bold yellow"` | The style used for non-root users. |
+| `format` | `"[$user]($style) in "` | The format for the module. |
+| `show_always` | `false` | Always shows the `username` module. |
+| `disabled` | `false` | Disables the `username` module. |
### Variables
@@ -1930,7 +2200,7 @@ The `zig` module shows the currently installed version of Zig. Das Modul wird ge
### Optionen
-| Option | Standartwert | Beschreibung |
+| Option | Standardwert | Beschreibung |
| ---------- | ---------------------------------- | ----------------------------------------------------- |
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
| `style` | `"bold yellow"` | Stil für dieses Modul. |
@@ -1967,33 +2237,39 @@ These modules will be shown if any of the following conditions are met:
- The current directory contains a file whose extension is in `extensions`
- The `when` command returns 0
-::: Tipp
+::: tip
Multiple custom modules can be defined by using a `.`.
:::
-::: Tipp
+::: tip
-The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
+The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined.
+
+:::
+
+::: tip
+
+[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there!
:::
### Optionen
-| Option | Standartwert | Beschreibung |
-| -------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| `command` | | The command whose output should be printed. |
-| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
-| `shell` | | [See below](#custom-command-shell) |
-| `beschreibung` | `"Hay otras opciones para algunos estados de la batería menos comunes.
+There are also options for some uncommon battery states.
| Variable | Descripción |
| ---------------- | --------------------------------------------------- |
@@ -318,9 +333,9 @@ charging_symbol = "⚡️"
discharging_symbol = "💀"
```
-### Indicador de batería
+### Battery Display
-La configuración de la opción `display` es usada para definir cuándo se debe mostrar el indicador de batería y cómo debe mostrarse. Si no se provee ningún valor para `display` El valor por defecto es el siguiente:
+The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown:
```toml
[[battery.display]]
@@ -330,7 +345,7 @@ style = "bold red"
#### Opciones
-La opción `display` es un array de la siguiente tabla.
+The `display` option is an array of the following table.
| Variable | Descripción |
| ----------- | --------------------------------------------------------------- |
@@ -340,48 +355,48 @@ La opción `display` es un array de la siguiente tabla.
#### Ejemplo
```toml
-[[battery.display]] # "bold red" cuando la carga está entre 0% y 10%
+[[battery.display]] # "bold red" style when capacity is between 0% and 10%
threshold = 10
style = "bold red"
-[[battery.display]] # "bold yellow" cuando la carga está entre 10% y 30%
+[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
threshold = 30
style = "bold yellow"
-# cuando la carga está por encima del 30% el indicador no se mostrará
+# when capacity is over 30%, the battery indicator will not be displayed
```
## Character
-El módulo `character` muestra un carater (normalmente una flecha) tras el texto que introduces en el terminal.
+The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
-El carácter te dirá si el último comando funcionó o no. It can do this in two ways:
+The character will tell you whether the last command was successful or not. It can do this in two ways:
-- changing color (`red`/`green`)
-- changing shape (`❯`/`✖`)
+- cambiando el color (`red`/`green`)
+- cambiando la forma (`.`/`✖`)
By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape).
### Opciones
-| Option | Por defecto | Descripción |
-| ---------------- | ------------------- | -------------------------------------------------------------------------------- |
-| `format` | `"$symbol "` | The format string used before the text input. |
-| `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. |
-| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. |
-| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. |
-| `disabled` | `false` | Desactiva el módulo `character`. |
+| Opción | Por defecto | Descripción |
+| ---------------- | ------------------- | ------------------------------------------------------------------------------------------ |
+| `format` | `"$symbol "` | La cadena de formato usada antes de la entrada de texto. |
+| `success_symbol` | `"[❯](bold green)"` | La cadena de formato usada antes de la entrada de texto si el comando anterior tuvo éxito. |
+| `error_symbol` | `"[❯](bold red)"` | La cadena de formato usada antes de la entrada de texto si el comando anterior falló. |
+| `vicmd_symbol` | `"[❮](bold green)"` | El cadena de formato antes de la entrada de texto si la shell está en modo vim normal. |
+| `disabled` | `false` | Desactiva el módulo `character`. |
### Variables
-| Variable | Ejemplo | Descripción |
-| -------- | ------- | --------------------------------------------------------------------- |
-| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
+| Variable | Ejemplo | Descripción |
+| -------- | ------- | -------------------------------------------------------------- |
+| symbol | | Un espejo de `success_symbol`, `error_symbol` o `vicmd_symbol` |
### Examples
-#### With custom error shape
+#### Con forma de error personalizada
```toml
# ~/.config/starship.toml
@@ -391,7 +406,7 @@ success_symbol = "[➜](bold green) "
error_symbol = "[✗](bold red) "
```
-#### Without custom error shape
+#### Sin forma de error personalizada
```toml
# ~/.config/starship.toml
@@ -401,7 +416,7 @@ success_symbol = "[➜](bold green) "
error_symbol = "[➜](bold red) "
```
-#### With custom vim shape
+#### Con forma vim personalizada
```toml
# ~/.config/starship.toml
@@ -414,57 +429,57 @@ vicmd_symbol = "[V](bold green) "
The `cmake` module shows the currently installed version of CMake if:
-- The current directory contains a `CMakeLists.txt` file
+- El directorio actual contiene un archivo `CMakeLists.txt`
### Opciones
-| Option | Por defecto | Descripción |
-| ---------- | ---------------------------------- | -------------------------------------------- |
-| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
-| `symbol` | `"🛆 "` | The symbol used before the version of cmake. |
-| `style` | `"bold blue"` | El estilo del módulo. |
-| `disabled` | `false` | Disables the `cmake` module. |
+| Opción | Por defecto | Descripción |
+| ---------- | ---------------------------------- | ---------------------------------------------- |
+| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. |
+| `symbol` | `"🛆 "` | El símbolo usado antes de la versión de cmake. |
+| `style` | `"bold blue"` | El estilo del módulo. |
+| `disabled` | `false` | Deshabilita el módulo `cmake`. |
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | --------- | ------------------------------------ |
-| version | `v3.17.3` | The version of cmake |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| --------- | --------- | -------------------------------------- |
+| version | `v3.17.3` | La versión de cmake |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
## Tiempo de ejecución
-El módulo `cmd_duration` muestra cuánto tiempo tardó el último comando en ejecutarse. El módulo se mostrará solo si el comando llevó dos segundos o más, o el valor de `min_time`, si existe.
+The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
-::: warning No utilizar DEBUG en Bash
+::: warning Do not hook the DEBUG trap in Bash
-Si estás usando Starship con `bash`, no uses `DEBUG` después de ejecutar `eval $(starship init $0)`, o el módulo **se romperá**.
+If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
:::
-Los usuarios de bash que necesiten la funcionalidad preexec-like pueden usar el framework rcaloras's bash_preexec. Simplemente define los arrays preexec_functions y precmd_functions antes de ejecutar eval $(starship init $0), y continúa con normalidad. Basta con definir los arrays `preexec_functions` y `precmd_functions` antes de ejecutar `eval $(starship init $0)`, y luego proceder como siempre.
+Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
### Opciones
-| Option | Por defecto | Descripción |
+| Opción | Por defecto | Descripción |
| ------------------- | ----------------------------- | --------------------------------------------------------------------- |
| `min_time` | `2_000` | Duración mínima para mostrar el tiempo de ejecución (en milisegundos) |
| `show_milliseconds` | `false` | Muestra la duración con precisión en milisegundos. |
-| `format` | `"took [$duration]($style) "` | The format for the module. |
+| `format` | `"took [$duration]($style) "` | El formato del módulo. |
| `style` | `"bold yellow"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `cmd_duration`. |
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | -------- | --------------------------------------- |
-| duration | `16m40s` | The time it took to execute the command |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| --------- | -------- | ------------------------------------------ |
+| duration | `16m40s` | El tiempo que tardó en ejecutar el comando |
+| style\* | | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
@@ -478,33 +493,34 @@ format = "underwent [$duration](bold yellow)"
## Conda
-El módulo `conda` muestra el actual entorno conda, si la variable `$CONDA_DEFAULT_ENV` existe.
+The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
::: tip
-Esto no modifica el propio símbolo de sistema de conda. En caso de querer suprimirlo, ejecuta `conda config --set changeps1 False`.
+This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
:::
### Opciones
-| Option | Por defecto | Descripción |
+| Opción | Por defecto | Descripción |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | El número de directorios a los que se debe truncar la variable de entorno, si el entorno fue creado usando `conda create -p [path]`. `0` significa sin truncamiento. Mirar también el módulo [`directory`](#directory). |
| `symbol` | `"🅒 "` | El símbolo usado antes del nombre del entorno. |
| `style` | `"bold green"` | El estilo del módulo. |
-| `format` | `"[$symbol$environment]($style) "` | The format for the module. |
-| `disabled` | `false` | Desactiva el módulo `conda`. |
+| `format` | `"[$symbol$environment]($style) "` | El formato del módulo. |
+| `ignore_base` | `true` | Ignora el entorno `base` cuando se activa. |
+| `disabled` | `false` | Deshabilita el módulo `conda`. |
### Variables
-| Variable | Ejemplo | Descripción |
-| ----------- | ------------ | ------------------------------------ |
-| environment | `astronauts` | The current conda environment |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| ----------- | ------------ | -------------------------------------- |
+| environment | `astronauts` | El entorno conda actual |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
@@ -517,29 +533,29 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
-El módulo `crystal` muestra la versión actual de Crystal. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
+The `crystal` module shows the currently installed version of Crystal. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
- El directorio actual contiene un fichero `shard.yml`
- El directorio actual contiene un fichero `.cr`
### Opciones
-| Option | Por defecto | Descripción |
+| Opción | Por defecto | Descripción |
| ---------- | ---------------------------------- | --------------------------------------------- |
| `symbol` | `"🔮 "` | Símbolo usado antes de la versión de Crystal. |
| `style` | `"bold red"` | El estilo del módulo. |
-| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. |
| `disabled` | `false` | Desactiva el módulo `crystal`. |
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | --------- | ------------------------------------ |
-| version | `v0.32.1` | The version of `crystal` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| --------- | --------- | -------------------------------------- |
+| version | `v0.32.1` | La versión de `crystal` |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
@@ -550,28 +566,64 @@ El módulo `crystal` muestra la versión actual de Crystal. El módulo se muestr
format = "via [✨ $version](bold blue) "
```
-## Directory
+## Dart
-El módulo `directory` muestra la ruta hasta el directorio actual, mostrando tres directorios padre como máximo. Tu directorio se truncará a la raíz del repositorio git en el que estés.
+The `dart` module shows the currently installed version of Dart. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
-Cuando usas el estilo fish de la opción pwd, en lugar de ocultar la ruta truncada, verás una versión acortada del nombre de cada directorio basada en el número que activa la opción.
-
-Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repositorio y el valor de la opción es `1`. En ese caso, verás `~/D/N/nixpkgs/pkgs`, cuando antes hubiera sido `nixpkgs/pkgs`.
+- El directorio actual contiene un archivo con la extensión `.dart`
+- El directorio actual contiene un directorio `.dart_tool`
+- El directorio actual contiene un archivo `pubspec.yaml` o `pubspec.lock`
### Opciones
-| Variable | Por defecto | Descripción |
-| ------------------------ | ----------------------------------------------- | ------------------------------------------------------------------------------ |
-| `truncation_length` | `3` | El número de directorios padre a los que se debe truncar el directorio actual. |
-| `truncate_to_repo` | `true` | Trunca o no hasta la raíz del repositorio git en el que estés. |
-| `format` | `"[$path]($style)[$lock_symbol]($lock_style) "` | The format for the module. |
-| `style` | `"bold cyan"` | El estilo del módulo. |
-| `disabled` | `false` | Desactiva el módulo `directory`. |
-| `read_only_symbol` | `"🔒"` | The symbol indicating current directory is read only. |
-| `read_only_symbol_style` | `"red"` | The style for the read only symbol. |
+| Variable | Por defecto | Descripción |
+| ---------- | ---------------------------------- | ------------------------------------------------------- |
+| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. |
+| `symbol` | `"🎯 "` | Una cadena de formato que representa el símbolo de Dart |
+| `style` | `"bold blue"` | El estilo del módulo. |
+| `disabled` | `false` | Deshabilita el módulo `dart`. |
+
+### Variables
+
+| Variable | Ejemplo | Descripción |
+| --------- | -------- | -------------------------------------- |
+| version | `v2.8.4` | La versión de `dart` |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
+
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
+
+### Ejemplo
+
+```toml
+# ~/.config/starship.toml
+
+[dart]
+format = "via [🔰 $version](bold red) "
+```
+
+## Directory
+
+The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
+
+When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
+
+For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
+
+### Opciones
+
+| Variable | Por defecto | Descripción |
+| ------------------------ | ----------------------------------------------- | --------------------------------------------------------------------- |
+| `truncation_length` | `3` | El número de carpetas a las que se debe truncar el directorio actual. |
+| `truncate_to_repo` | `true` | Truncar o no hasta la raíz del repositorio git en el que se esté. |
+| `format` | `"[$path]($style)[$lock_symbol]($lock_style) "` | El formato del módulo. |
+| `style` | `"bold cyan"` | El estilo del módulo. |
+| `disabled` | `false` | Deshabilita el módulo `directory`. |
+| `read_only_symbol` | `"🔒"` | El símbolo que indica si el directorio actual es de sólo lectura. |
+| `read_only_symbol_style` | `"red"` | El estilo para el símbolo de sólo lectura. |
Este módulo tiene algunas opciones avanzadas de configuración que controlan cómo se muestra el directorio.
+This module has a few advanced configuration options that control how the directory is displayed.
| Advanced Option | Por defecto | Descripción |
| --------------------------- | ----------- | ---------------------------------------------------------------------------------------- |
@@ -593,12 +645,12 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | --------------------- | ----------------------------------- |
-| path | `"D:/Projects"` | The current directory path |
-| style\* | `"black bold dimmed"` | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| --------- | --------------------- | ------------------------------------- |
+| path | `"D:/Projects"` | La ruta de directorio actual |
+| style\* | `"black bold dimmed"` | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
@@ -609,29 +661,29 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos
truncation_length = 8
```
-## Docker context
+## Docker Context
-El módulo `docker_context` muestra el [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) activo si no está a `default`.
+The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`.
### Opciones
-| Option | Por defecto | Descripción |
-| ----------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------- |
-| `format` | `"via [$symbol$context]($style) "` | The format for the module. |
-| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. |
-| `style` | `"blue bold"` | El estilo del módulo. |
-| `only_with_files` | `false` | Solo lo muestra cuando hay un archivo `docker-compose.yml` o `Dockerfile` en el directorio actual. |
-| `disabled` | `true` | Desactiva el módulo `docker_context`. |
+| Opción | Por defecto | Descripción |
+| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- |
+| `format` | `"via [$symbol$context]($style) "` | El formato del módulo. |
+| `symbol` | `"🐳 "` | El símbolo usado antes de mostrar el contexto de Docker. |
+| `style` | `"blue bold"` | El estilo del módulo. |
+| `only_with_files` | `false` | Mostrar solo cuando hay un `docker-compose.yml` o `Dockerfile` en el directorio actual. |
+| `disabled` | `true` | Deshabilita el módulo `docker_context`. |
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | -------------- | ------------------------------------ |
-| context | `test_context` | The current docker context |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| --------- | -------------- | -------------------------------------- |
+| context | `test_context` | El contexto actual de docker |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
@@ -644,14 +696,14 @@ format = "via [🐋 $context](blue bold)"
## Dotnet
-El módulo `dotnet` muestra la versión usada de .NET Core SDK para el directorio actual. Si el SDK ha sido anclado en el directorio actual, se mostrará la versión fijada. De lo contrario, el módulo muestra la última versión instalada del SDK.
+The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
This module will only be shown in your prompt when one or more of the following files are present in the current directory:
- `global.json`
- `project.json`
-- `Directory.Build.props`
-- `Directory.Build.targets`
+- `Directoria.Build.props`
+- `Directorio.Build.targets`
- `Packages.props`
- `*.sln`
- `*.csproj`
@@ -666,24 +718,24 @@ The module will also show the Target Framework Moniker (This module has some advanced configuration options.
@@ -1684,7 +1844,6 @@ python_binary = "python3"
[python]
symbol = "👾 "
pyenv_version_name = true
-pyenv_prefix = "foo "
```
## Ruby
@@ -1697,22 +1856,22 @@ The `ruby` module shows the currently installed version of Ruby. El módulo se m
### Opciones
-| Option | Por defecto | Descripción |
+| Opción | Por defecto | Descripción |
| ---------- | ---------------------------------- | ------------------------------------------------ |
-| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | El estilo del módulo. |
| `disabled` | `false` | Disables the `ruby` module. |
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | -------- | ------------------------------------ |
-| version | `v2.5.1` | The version of `ruby` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| --------- | -------- | -------------------------------------- |
+| version | `v2.5.1` | The version of `ruby` |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
@@ -1732,22 +1891,22 @@ The `rust` module shows the currently installed version of Rust. El módulo se m
### Opciones
-| Option | Por defecto | Descripción |
+| Opción | Por defecto | Descripción |
| ---------- | ---------------------------------- | ----------------------------------------------- |
-| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | El estilo del módulo. |
| `disabled` | `false` | Disables the `rust` module. |
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | ----------------- | ------------------------------------ |
-| version | `v1.43.0-nightly` | The version of `rustc` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| --------- | ----------------- | -------------------------------------- |
+| version | `v1.43.0-nightly` | The version of `rustc` |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
@@ -1758,28 +1917,63 @@ The `rust` module shows the currently installed version of Rust. El módulo se m
format = "via [⚙️ $version](red bold)"
```
+## SHLVL
+
+The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
+
+### Opciones
+
+| Variable | Por defecto | Descripción |
+| ----------- | ---------------------------- | --------------------------------------- |
+| `threshold` | `2` | Display threshold. |
+| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. |
+| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. |
+| `style` | `"bold yellow"` | El estilo del módulo. |
+| `disabled` | `true` | Disables the `shlvl` module. |
+
+### Variables
+
+| Variable | Ejemplo | Descripción |
+| --------- | ------- | -------------------------------------- |
+| shlvl | `3` | The current value of SHLVL |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
+
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
+
+### Ejemplo
+
+```toml
+# ~/.config/starship.toml
+
+[shlvl]
+disabled = false
+format = "$shlvl level(s) down"
+threshold = 3
+```
+
## Singularity
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
### Opciones
-| Option | Por defecto | Descripción |
+| Opción | Por defecto | Descripción |
| ---------- | ------------------------------------ | ------------------------------------------------ |
-| `format` | `"[$symbol\\[$env\\]]($style) "` | The format for the module. |
+| `format` | `"[$symbol\\[$env\\]]($style) "` | El formato del módulo. |
| `symbol` | `""` | A format string displayed before the image name. |
| `style` | `"bold dimmed blue"` | El estilo del módulo. |
| `disabled` | `false` | Disables the `singularity` module. |
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | ------------ | ------------------------------------ |
-| env | `centos.img` | The current singularity image |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| --------- | ------------ | -------------------------------------- |
+| env | `centos.img` | The current singularity image |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
@@ -1790,6 +1984,83 @@ The `singularity` module shows the current singularity image, if inside a contai
format = "[📦 \\[$env\\]]($style) "
```
+## Swift
+
+The `swift` module shows the currently installed version of Swift. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
+
+- The current directory contains a `Package.swift` file
+- The current directory contains a file with the `.swift` extension
+
+### Opciones
+
+| Opción | Por defecto | Descripción |
+| ---------- | ---------------------------------- | ------------------------------------------------ |
+| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. |
+| `symbol` | `"🐦 "` | A format string representing the symbol of Swift |
+| `style` | `"bold 202"` | El estilo del módulo. |
+| `disabled` | `false` | Disables the `swift` module. |
+
+### Variables
+
+| Variable | Ejemplo | Descripción |
+| --------- | -------- | -------------------------------------- |
+| version | `v5.2.4` | The version of `swift` |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
+
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
+
+### Ejemplo
+
+```toml
+# ~/.config/starship.toml
+
+[swift]
+format = "via [🏎 $version](red bold)"
+```
+
+## 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`.
+
+::: tip
+
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
+
+### Opciones
+
+| Variable | Por defecto | Descripción |
+| ---------- | -------------------------- | ------------------------------------------------------ |
+| `format` | `[$symbol$status]($style)` | The format of the module |
+| `symbol` | `"✖"` | A format string representing the symbol for the status |
+| `style` | `"bold red"` | El estilo del módulo. |
+| `disabled` | `true` | Disables the `status` module. |
+
+
+### Variables
+
+| Variable | Ejemplo | Descripción |
+| --------- | ------- | -------------------------------------- |
+| status | `127` | The exit code of the last command |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
+
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
+
+
+### Ejemplo
+```toml
+
+# ~/.config/starship.toml
+
+[status]
+style = "bg:blue"
+symbol = "💣 "
+format = "[\\[$symbol$status\\]]($style) "
+disabled = false
+
+```
+
## Terraform
The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). El módulo se muestra si algunas de las siguientes condiciones se cumplen:
@@ -1799,7 +2070,7 @@ The `terraform` module shows the currently selected terraform workspace and vers
### Opciones
-| Option | Por defecto | Descripción |
+| Opción | Por defecto | Descripción |
| ---------- | ------------------------------------ | ----------------------------------------------------- |
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
| `symbol` | `"💠 "` | A format string shown before the terraform workspace. |
@@ -1808,14 +2079,14 @@ The `terraform` module shows the currently selected terraform workspace and vers
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | ------------- | ------------------------------------ |
-| version | `v0.12.24` | The version of `terraform` |
-| workspace | `por defecto` | The current terraform workspace |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| --------- | ---------- | -------------------------------------- |
+| version | `v0.12.24` | The version of `terraform` |
+| workspace | `default` | The current terraform workspace |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
@@ -1837,7 +2108,7 @@ format = "[🏎💨 $version$workspace]($style) "
format = "[🏎💨 $workspace]($style) "
```
-## Hora
+## Time
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
@@ -1849,26 +2120,26 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Opciones
-| Option | Por defecto | Descripción |
+| Opción | Por defecto | Descripción |
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `format` | `"at [$time]($style) "` | The format string for the module. |
-| `use_12hr` | `false` | Activa el formato de 12 horas |
+| `use_12hr` | `false` | Enables 12 hour formatting |
| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
-| `style` | `"bold yellow"` | El estilo del módulo de la hora |
+| `style` | `"bold yellow"` | The style for the module time |
| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
-| `time_range` | `"-"` | Establece el intervalo de tiempo durante el cual el módulo se mostrará. La hora debe ser especificada en formato de 24 horas |
+| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | ---------- | ----------------------------------- |
-| hora | `13:08:10` | The current time. |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| --------- | ---------- | ------------------------------------- |
+| time | `13:08:10` | The current time. |
+| style\* | | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
@@ -1883,7 +2154,7 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
-## Nombre de usuario
+## Username
The `username` module shows active user's username. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
@@ -1894,13 +2165,13 @@ The `username` module shows active user's username. El módulo se muestra si alg
### Opciones
-| Option | Por defecto | Descripción |
-| ------------- | ------------------------ | ------------------------------------- |
-| `style_root` | `"bold red"` | The style used when the user is root. |
-| `style_user` | `"bold yellow"` | The style used for non-root users. |
-| `format` | `"via [$user]($style) "` | The format for the module. |
-| `show_always` | `false` | Always shows the `username` module. |
-| `disabled` | `false` | Disables the `username` module. |
+| Opción | Por defecto | Descripción |
+| ------------- | ----------------------- | ------------------------------------- |
+| `style_root` | `"bold red"` | The style used when the user is root. |
+| `style_user` | `"bold yellow"` | The style used for non-root users. |
+| `format` | `"[$user]($style) in "` | El formato del módulo. |
+| `show_always` | `false` | Always shows the `username` module. |
+| `disabled` | `false` | Disables the `username` module. |
### Variables
@@ -1930,22 +2201,22 @@ The `zig` module shows the currently installed version of Zig. El módulo se mue
### Opciones
-| Option | Por defecto | Descripción |
+| Opción | Por defecto | Descripción |
| ---------- | ---------------------------------- | ----------------------------------------------------- |
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
| `style` | `"bold yellow"` | El estilo del módulo. |
-| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. |
| `disabled` | `false` | Disables the `zig` module. |
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | -------- | ------------------------------------ |
-| version | `v0.6.0` | The version of `zig` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Ejemplo | Descripción |
+| --------- | -------- | -------------------------------------- |
+| version | `v0.6.0` | The version of `zig` |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
-\*: This variable can only be used as a part of a style string
+\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
@@ -1956,7 +2227,7 @@ The `zig` module shows the currently installed version of Zig. El módulo se mue
symbol = "⚡️ "
```
-## Comandos personalizados
+## Custom commands
The `custom` modules show the output of some arbitrary commands.
@@ -1975,24 +2246,30 @@ Multiple custom modules can be defined by using a `.`.
::: tip
-The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
+The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined.
+
+:::
+
+::: tip
+
+[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there!
:::
### Opciones
-| Option | Por defecto | Descripción |
+| Opción | Por defecto | Descripción |
| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| `command` | | The command whose output should be printed. |
+| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
-| `descripción` | `"
- Web + Sitio Web · Instalación · -Configuration +Configuración
@@ -105,25 +105,25 @@ - **Rápido:** es rápido – _muy muy_ rápido! 🚀 -- **Customizable:** configura cada parte de tu intérprete de comandos. -- **Universal:** funciona en cualquier símbolo del sistema, en cualquier sistema operativo. +- **Personalizable:** configura cada parte de tu intérprete de comandos. +- **Universal:** funciona en cualquier intérprete de comandos, en cualquier sistema operativo. - **Inteligente:** muestra información relevante de un vistazo. - **Repleto de funciones**: con soporte para tus herramientas favoritas. -- **Fácil de instalar**: empieza a usarlo en pocos minutos. +- **Fácil:** rápido de instalar – empieza a usarlo en minutos.
-Explora la documentación de Starship +Explora la documentación de Starship
-## 🚀 Instalacíon +## 🚀 Instalación ### Prerequisitos -- 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)). +- 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)). -### Comenzando +### Comenzar 1. Instala el binario de **starship**: @@ -131,21 +131,21 @@ #### Instalar la última versión - ##### Desde un binario, con Shell: + ##### Desde un binario precontruido, con Shell: ```sh curl -fsSL https://starship.rs/install.sh | bash ``` - ##### Con [crates.io](https://crates.io/): + ##### Desde el código fuente en [crates.io](https://crates.io/): ```sh cargo install starship ``` - #### Instalar con un gestor de paquetes + #### Instalar vía un gestor de paquetes ##### Con [Homebew](https://brew.sh/): @@ -218,9 +218,9 @@ ## 🤝 Colaborando -¡Siempre estamos buscando por colaboradores de **cualquier nivel**! Si esta buscando una manera fácil de ayudar este proyecto, puede intentar a resolver una de las propuestas con la etiqueta "[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)" (primera buena propuesta). +¡Siempre estamos buscando por colaboradores de **cualquier nivel**! 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)". -Si quiere ayudar a colaborar a starship, por favor mira a nuestra [Guía de Colaboradores](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) (Contributing Guide). Además, juntarse con nosotros en nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y di "¡hola!". 👋 +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!". 👋 ### Desarrolladores @@ -229,7 +229,7 @@ Este proyecto existe gracias a todas las personas que han ayudado. [[Contribuir] ### Financiadores -Invierte y ayúdanos a mantener nuestra comunidad. [[Contribuir](https://opencollective.com/starship/contribute)] +Conviértete en un financiador y ayúdanos a mantener nuestra comunidad. [[Contribuir](https://opencollective.com/starship/contribute)] #### Personas @@ -237,7 +237,7 @@ Invierte y ayúdanos a mantener nuestra comunidad. [[Contribuir](https://opencol #### Organizaciones -Apoya este proyecto con tu organización. Vuestro logo se mostrará aquí con un enlace a vuestra web. [[Contribuir](https://opencollective.com/starship/contribute)] +Apoya este proyecto con tu organización. Su logo se mostrará aquí con un enlace a su sitio web. [[Contribuir](https://opencollective.com/starship/contribute)] @@ -250,11 +250,11 @@ Apoya este proyecto con tu organización. Vuestro logo se mostrará aquí con un -## 💭 Inspiración +## 💭 Inspirado por -Aquí tienes algunos de los trabajos previos que ayudaron a crear starship. 🙏 +Por favor, revisa estos proyectos que inspiraron la creación de starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Una prompt Zsh para astronautas. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Una prompt ZSH para astronautas. - **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - robbyrussel, tema multi interfaz de línea de comandos escrito en JavaScript. diff --git a/docs/es-ES/migrating-to-0.45.0/README.md b/docs/es-ES/migrating-to-0.45.0/README.md new file mode 100644 index 00000000..70827fcd --- /dev/null +++ b/docs/es-ES/migrating-to-0.45.0/README.md @@ -0,0 +1,265 @@ +# Migrating to v0.45.0 + +Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization. + +This guide is intended to walk you through the breaking changes. + +## `prompt_order` has been replaced by a root-level `format` + +Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. + +Starship v0.45.0 will instead be accepting a `format` value, allowing for customization of the prompt outside of the modules themselves. + +**Example pre-v0.45.0 configuration** + +```toml +prompt_order = [ + "username", + "hostname", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", + "cmd_duration", + "custom", + "line_break", + "jobs", + "battery", + "time", + "character", +] +``` + +**Example v0.45.0 configuration** + +```toml +format = """\ + $username\ + $hostname\ + $directory\ + $git_branch\ + $git_commit\ + $git_state\ + $git_status\ + $cmd_duration\ + $custom\ + $line_break\ + $jobs\ + $battery\ + $time\ + $character\ + """ +``` + +## Module `prefix` and `suffix` will be replaced by `format` + +Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. + +Starship v0.45.0 will instead be accepting a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output. + +**Example pre-v0.45.0 configuration** + +```toml +[cmd_duration] +prefix = "took " +``` + +**Example v0.45.0 configuration** + +```toml +[cmd_duration] +# $duration – The command duration (e.g. "15s") +# $style – The default style of the module (e.g. "bold yellow") +format = "took [$duration]($style)" +``` + +### Affected Modules + +#### Character + +| Removed Property | Replacement | +| ----------------------- | ---------------- | +| `symbol` | `success_symbol` | +| `use_symbol_for_status` | `error_symbol` | +| `style_success` | `success_symbol` | +| `style_failure` | `error_symbol` | + +**Changes to the Default Configuration** + +```diff +[character] +-- symbol = "❯" +-- error_symbol = "✖" +-- use_symbol_for_status = true +-- vicmd_symbol = "❮" +++ success_symbol = "[❯](bold green) " +++ error_symbol = "[❯](bold red) " +++ vicmd_symbol = "[❮](bold green)" +``` + +Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code. + +With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties. + +To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: + +```toml +[character] +error_symbol = "[✖](bold red) " +``` + +#### Tiempo de ejecución + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[cmd_duration] +-- prefix = "took " +++ format = "took [$duration]($style)" +``` + +#### Directory + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[directory] +-- prefix = "in " +++ format = "[$path]($style)[$lock_symbol]($lock_style)" +``` + +#### Environment Variable + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[env_var] +-- prefix = "" +-- suffix = "" +++ format = "with [$env_value]($style) " +``` + +#### Git Commit + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_commit] +-- prefix = "(" +-- suffix = ")" +++ format = "[\\($hash\\)]($style) " +``` + +#### Git Status + +| Removed Property | Replacement | +| ----------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_status] +-- prefix = "[" +-- suffix = "]" +-- show_sync_count = false +++ format = "([$all_status$ahead_behind] )" +``` + +Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch. + +With the release of v0.45.0, this has been replaced with the + +To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: + +```toml +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +#### Hostname + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[hostname] +-- prefix = "" +-- suffix = "" +++ format = "[$hostname]($style) in " +``` + +#### Singularity + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[singularity] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol\\[$env\\]]($style) " +``` + +#### Time + +| Removed Property | Replacement | +| ---------------- | ------------- | +| `format` | `time_format` | + +**Changes to the Default Configuration** + +```diff +[time] +-- format = "🕙[ %T ]" +++ time_format = "%T" +++ format = "at 🕙[$time]($style) +``` + +#### Custom Commands + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[custom.example] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol$output]($style) " +``` diff --git a/docs/es-ES/presets/README.md b/docs/es-ES/presets/README.md index 64439db5..d470d36a 100644 --- a/docs/es-ES/presets/README.md +++ b/docs/es-ES/presets/README.md @@ -1,16 +1,16 @@ -# Preajustes +# Ajustes predeterminados -Aqui tienes una colección de preajustes creados por la comunidad de Starship. Si quieres compartir un ajuste predefinido, por favor, [envía un PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) para actualizar este fichero. 😊 +Aqui hay una colección de ajustes predeterminados creados por la comunidad de Starship. ¡Si quieres compartir un ajuste predeterminado, por favor, [envía un PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) actualizando este archivo! 😊 -## Símbolos de la fuente Nerd +## Símbolos Nerd Font -Este ajuste predefinido no modifica nada excepto los símbolos usados para cada módulo. Si los emojis no son lo tuyo, ¡presta atención! +Este ajuste predeterminado no modifica nada excepto los símbolos usados para cada módulo. Si los emojis no son lo tuyo, ¡esto podría llamar tu atención! -![Capturas de pantalla obtenidas de Nerd Font](/presets/nerd-font-symbols.png) +![Captura de pantalla de los ajustes predeterminados de los Símbolos Nerd Font](/presets/nerd-font-symbols.png) ### Prerequisitos -- Una [fuente Nerd](https://www.nerdfonts.com/) instalada y funcionando en tu terminal (el ejemplo usa Fira Code) +- Una [Nerd Font](https://www.nerdfonts.com/) instalada y habilitada en tu terminal (el ejemplo usa Fira Code Nerd Font) ### Configuración @@ -26,6 +26,9 @@ discharging_symbol = "" [conda] symbol = " " +[dart] +symbol = " " + [docker] symbol = " " @@ -68,6 +71,9 @@ symbol = " " [package] symbol = " " +[perl] +symbol = " " + [php] symbol = " " @@ -79,4 +85,7 @@ symbol = " " [rust] symbol = " " + +[swift] +symbol = "ﯣ " ``` diff --git a/docs/fr-FR/README.md b/docs/fr-FR/README.md index a357804f..25c58814 100644 --- a/docs/fr-FR/README.md +++ b/docs/fr-FR/README.md @@ -7,18 +7,18 @@ actionText: Commencez → actionLink: ./guide/ features: - - title: Compatibilité d'abord + title: Compatibilité avant tout details: Fonctionne sur tous les principaux shells et système d'exploitation. Utilisez-le partout ! - title: Propulsé par Rust - details: Profiter de toute la rapidité et la securité de Rust, pour rendre votre prompt le plus rapide et fiable possible. + details: Profiter de toute la rapidité et la sécurité de Rust pour rendre votre invite de commandes le plus rapide et fiable possible. - title: Personnalisable - details: Tous les petits détails sont personnalisable à votre goût, pour rendre votre prompt aussi léger ou complet que le vous souhaitez. -footer: ISC licencié | Copyright © 2019-present Starship Contributors + details: Tous les petits détails sont personnalisable à votre goût, pour rendre votre invite de commandes aussi léger ou complet que le vous souhaitez. +footer: Licence ISC | Copyright © 2019-présent Contributeurs Starship #Used for the description meta tag, for SEO -metaTitle: "Starship: Invite Cross-Shell" -description: Starship est un invite minimaliste, ultra-rapide et hautement personnalisable pour n'importe quel shell ! Montrez les informations dont vous avez besoin, tout en restant élégant et minimaliste. Installation rapide disponible pour Bash, Fish, ZSH, Ion et PowerShell. +metaTitle: "Starship : Invite Multi-Shell" +description: Starship est un invite minimaliste, ultra-rapide et hautement personnalisable pour n'importe quel shell ! Montre les informations dont vous avez besoin tout en restant élégant et minimaliste. Installation rapide disponible pour Bash, Fish, ZSH, Ion et PowerShell. ----Consulter la documentation de Starship ▶ +Consulter la documentation de Starship ▶
@@ -131,7 +131,7 @@ #### Installer la dernière version - ##### Depuis une version pré-compilée depuis le shell: + ##### Depuis une version pré-compilée, depuis le shell: ```sh curl -fsSL https://starship.rs/install.sh | bash @@ -161,7 +161,7 @@ scoop install starship ``` -1. Ajouter le script d'initialization à la fiche config de votre shell: +1. Ajouter le script d’initialisation au fichier de configuration de votre shell: #### Bash @@ -218,11 +218,11 @@ ## 🤝Contribution -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). +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). -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. 👋 +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. 👋 -### Contributeurs de code +### Contributeurs Ce projet existe grâce à toutes les personnes qui y contribuent. [[Contribuer](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. @@ -252,11 +252,11 @@ Soutenez ce projet avec votre organisation. Votre logo apparaîtra ici avec un l ## 💭Inspiré par -Voyez ces travaux précédents qui ont contribué à inspirer la création de vaisseau. 🙏 +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)** - Un ZSH prompt pour les astronautes. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un invite de commandes ZSH pour les astronautes. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Thème Cross-shell robbyrussell écrit en JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Thème multi-shell robbyrussell écrit en JavaScript. - **[reujab/silver](https://github.com/reujab/silver)** - Un shell multi-platformes de type powerline personnalisable avec des icônes. diff --git a/docs/fr-FR/migrating-to-0.45.0/README.md b/docs/fr-FR/migrating-to-0.45.0/README.md new file mode 100644 index 00000000..0b865f4f --- /dev/null +++ b/docs/fr-FR/migrating-to-0.45.0/README.md @@ -0,0 +1,265 @@ +# Migrating to v0.45.0 + +Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization. + +This guide is intended to walk you through the breaking changes. + +## `prompt_order` has been replaced by a root-level `format` + +Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. + +Starship v0.45.0 will instead be accepting a `format` value, allowing for customization of the prompt outside of the modules themselves. + +**Example pre-v0.45.0 configuration** + +```toml +prompt_order = [ + "username", + "hostname", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", + "cmd_duration", + "custom", + "line_break", + "jobs", + "battery", + "time", + "character", +] +``` + +**Example v0.45.0 configuration** + +```toml +format = """\ + $username\ + $hostname\ + $directory\ + $git_branch\ + $git_commit\ + $git_state\ + $git_status\ + $cmd_duration\ + $custom\ + $line_break\ + $jobs\ + $battery\ + $time\ + $character\ + """ +``` + +## Module `prefix` and `suffix` will be replaced by `format` + +Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. + +Starship v0.45.0 will instead be accepting a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output. + +**Example pre-v0.45.0 configuration** + +```toml +[cmd_duration] +prefix = "took " +``` + +**Example v0.45.0 configuration** + +```toml +[cmd_duration] +# $duration – The command duration (e.g. "15s") +# $style – The default style of the module (e.g. "bold yellow") +format = "took [$duration]($style)" +``` + +### Affected Modules + +#### Caractères + +| Removed Property | Replacement | +| ----------------------- | ---------------- | +| `symbol` | `success_symbol` | +| `use_symbol_for_status` | `error_symbol` | +| `style_success` | `success_symbol` | +| `style_failure` | `error_symbol` | + +**Changes to the Default Configuration** + +```diff +[character] +-- symbol = "❯" +-- error_symbol = "✖" +-- use_symbol_for_status = true +-- vicmd_symbol = "❮" +++ success_symbol = "[❯](bold green) " +++ error_symbol = "[❯](bold red) " +++ vicmd_symbol = "[❮](bold green)" +``` + +Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code. + +With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties. + +To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: + +```toml +[character] +error_symbol = "[✖](bold red) " +``` + +#### Temps d'exécution + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[cmd_duration] +-- prefix = "took " +++ format = "took [$duration]($style)" +``` + +#### Directory + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[directory] +-- prefix = "in " +++ format = "[$path]($style)[$lock_symbol]($lock_style)" +``` + +#### Environment Variable + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[env_var] +-- prefix = "" +-- suffix = "" +++ format = "with [$env_value]($style) " +``` + +#### Git Commit + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_commit] +-- prefix = "(" +-- suffix = ")" +++ format = "[\\($hash\\)]($style) " +``` + +#### Git Status + +| Removed Property | Replacement | +| ----------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_status] +-- prefix = "[" +-- suffix = "]" +-- show_sync_count = false +++ format = "([$all_status$ahead_behind] )" +``` + +Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch. + +With the release of v0.45.0, this has been replaced with the + +To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: + +```toml +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +#### Hostname + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[hostname] +-- prefix = "" +-- suffix = "" +++ format = "[$hostname]($style) in " +``` + +#### Singularity + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[singularity] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol\\[$env\\]]($style) " +``` + +#### Time + +| Removed Property | Replacement | +| ---------------- | ------------- | +| `format` | `time_format` | + +**Changes to the Default Configuration** + +```diff +[time] +-- format = "🕙[ %T ]" +++ time_format = "%T" +++ format = "at 🕙[$time]($style) +``` + +#### Custom Commands + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[custom.example] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol$output]($style) " +``` diff --git a/docs/fr-FR/presets/README.md b/docs/fr-FR/presets/README.md index 78d1cbe6..1f019bb7 100644 --- a/docs/fr-FR/presets/README.md +++ b/docs/fr-FR/presets/README.md @@ -26,6 +26,9 @@ discharging_symbol = "" [conda] symbol = " " +[dart] +symbol = " " + [docker] symbol = " " @@ -68,6 +71,9 @@ symbol = " " [package] symbol = " " +[perl] +symbol = " " + [php] symbol = " " @@ -79,4 +85,7 @@ symbol = " " [rust] symbol = " " + +[swift] +symbol = "ﯣ " ``` diff --git a/docs/ja-JP/advanced-config/README.md b/docs/ja-JP/advanced-config/README.md index 51f1f857..30489646 100644 --- a/docs/ja-JP/advanced-config/README.md +++ b/docs/ja-JP/advanced-config/README.md @@ -57,9 +57,9 @@ starship_precmd_user_func="set_win_title" precmd_functions+=(set_win_title) ``` -If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. +もし結果に満足したら、永続化のためそれぞれの行を (`~/.bashrc` もしくは `~/.zshrc`) に追加してください。 -For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: +たとえば、現在のディレクトリをターミナルタブのタイトルに表示したい場合は、 `~/.bashrc`または`~/.zshrc`に以下のスニペットを追加します。 ```bash function set_win_title(){ diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md index 86ea429a..c6bd74e5 100644 --- a/docs/ja-JP/config/README.md +++ b/docs/ja-JP/config/README.md @@ -1,11 +1,5 @@ # 設定 -::: tip - -🔥Starshipの開発は現在も進んでいます。 多くの新しいオプションが今後のリリースで利用可能になります。 - -::: - Starshipの設定を開始するには、`~/.config/starship.toml` ファイルを作成します。 ```sh @@ -15,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Starshipのすべての設定は、この[TOML](https://github.com/toml-lang/toml)ファイルで行われます。 ```toml -# Don't print a new line at the start of the prompt +# プロンプトの先頭に改行を表示しません add_newline = false -# 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] # 設定しているモジュールの名前は「character」です +success_symbol = "[➜](bold green)" # 「success_symbol」セグメントは「ボールドグリーン」の色で「➜」に設定されています -# Disable the package module, hiding it from the prompt completely +# package モジュールを無効にし、プロンプトから完全に隠します [package] disabled = true ``` @@ -39,9 +33,23 @@ PowerShell (Windows) で同様に `$PROFILE`にこの行を追加します。 $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` -### 用語 +### Logging -**モジュール**: OSのコンテキスト情報に基づいて情報を提供するプロンプト内のコンポーネントです。 たとえば、現在のディレクトリがNodeJSプロジェクトである場合、「nodejs」モジュールは、現在コンピューターにインストールされているNodeJSのバージョンを表示します。 +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: + +```sh +export STARSHIP_CACHE=~/.starship/cache +``` + +PowerShell (Windows) で同様に `$PROFILE`にこの行を追加します。 + +```ps1 +$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" +``` + +### Terminology + +**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project. **Variable**: Smaller sub-components that contains information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS. @@ -57,11 +65,11 @@ A variable contains a `$` symbol followed by the name of the variable. The name 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`. -- `$git_branch $git_commit` has the two variables separated with a space. +- `$version` は、`version` という名前の変数を持つフォーマット文字列です。 +- `$git_branch$git_commit` は `git_branch` と `git_commit` という2つの変数を持つフォーマット文字列です。 +- `$git_branch $git_commit` には空白で区切られた 2 つの変数があります。 -#### Text Group +#### テキストグループ A text group is made up of two different parts. @@ -71,13 +79,13 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri 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. -- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. +- `[on](red bold)` は文字列 `on` に太字のテキストを赤色で表示します。 +- `[⬢ $version](bold green)` はシンボル `⬢` の後に変数 `バージョン`の内容を表示します 緑色の太字を付けています +- `[a [b](red) c](green)` は `a b c` を `b` だけ赤色に表示し、 `a` と `c` を緑色に表示します。 #### スタイルの設定 -Starshipのほとんどのモジュールでは、表示スタイルを設定できます。 これは、設定を指定する文字列であるエントリ(`style`)で行われます。 スタイル文字列の例とその機能を次に示します。 完全な構文の詳細については、詳細は [高度な設定](/advanced-config/)を参照してください 。 +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/). - `"fg:green bg:blue"` は、青色の背景に緑色のテキストを設定します - `"bg:blue fg:bright-green"` は、青色の背景に明るい緑色のテキストを設定します @@ -86,9 +94,9 @@ Starshipのほとんどのモジュールでは、表示スタイルを設定で - `"bold italic fg:purple"`は、紫色の太字斜体のテキストを設定します - `""` はすべてのスタイルを明示的に無効にします -スタイリングがどのように見えるかは、端末エミュレータによって制御されることに注意してください。 たとえば、一部の端末エミュレータはテキストを太字にする代わりに色を明るくします。また、一部のカラーテーマは通常の色と明るい色と同じ値を使用します。 また、斜体のテキストを取得するには、端末で斜体をサポートする必要があります。 +Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. -#### Conditional Format Strings +#### 条件付きフォーマット設定 A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. @@ -98,11 +106,11 @@ For example: - `(some text)` will always show nothing since there are no variables wrapped in the braces. - When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`. -#### Escapable characters +#### エスケープ可能な文字 The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`). -- $ +- \$ - \\ - [ - ] @@ -130,23 +138,21 @@ format = ''' ## プロンプト -これは、プロンプト全体のオプションのリストです。 +This is the list of prompt-wide configuration options. ### オプション -| Option | デフォルト | 説明 | +| オプション | デフォルト | 説明 | | -------------- | ------------------------------ | ---------------------------------------- | -| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `format` | [link](#default-prompt-format) | プロンプトの形式を設定します。 | | `scan_timeout` | `30` | ファイルをスキャンする際のタイムアウト時間 (milliseconds) です。 | +| `add_newline` | `true` | プロンプトの開始前に新しい行を追加します。 | ### 設定例 ```toml # ~/.config/starship.toml -# Disable the newline at the start of the prompt -format = "$all" - # Use custom format format = """ [┌───────────────────>](bold green) @@ -155,20 +161,23 @@ format = """ # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 + +# Disable the newline at the start of the prompt +add_newline = false ``` ### Default Prompt Format -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. デフォルトは次のとおりです。 +The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: ```toml -format = "\n$all" +format = "$all" # Which is equivalent to format = """ - $username\ $hostname\ +$shlvl\ $kubernetes\ $directory\ $git_branch\ @@ -179,6 +188,7 @@ $hg_branch\ $docker_context\ $package\ $cmake\ +$dart\ $dotnet\ $elixir\ $elm\ @@ -190,17 +200,20 @@ $julia\ $nim\ $nodejs\ $ocaml\ +$perl\ $php\ $purescript\ $python\ $ruby\ $rust\ +$swift\ $terraform\ $zig\ $nix_shell\ $conda\ $memory_usage\ $aws\ +$gcloud\ $env_var\ $crystal\ $cmd_duration\ @@ -209,20 +222,21 @@ $line_break\ $jobs\ $battery\ $time\ +$status\ $character""" ``` ## AWS -`aws` モジュールは現在のAWSプロファイルが表示されます。 これは `~/.aws/config` に記述されている `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` 環境変数に基づいています。 +The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. -[aws-vault](https://github.com/99designs/aws-vault)を使用する場合、プロファイル は`AWS_VAULT`env varから読み取られます。 +When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. ### オプション -| Option | デフォルト | 説明 | +| オプション | デフォルト | 説明 | | ---------------- | ---------------------------------------------------- | ----------------------------- | -| `format` | `"on [$symbol$profile(\\($region\\))]($style) "` | The format for the module. | +| `format` | `"on [$symbol$profile(\\($region\\))]($style) "` | moduleのフォーマットです。 | | `symbol` | `"☁️ "` | 現在のAWSプロファイルを表示する前に表示される記号です。 | | `region_aliases` | | AWS名に加えて表示するリージョンのエイリアスです。 | | `style` | `"bold yellow"` | モジュールのスタイルです。 | @@ -230,18 +244,18 @@ $character""" ### Variables -| 変数 | 設定例 | 説明 | -| --------- | ---------------- | ------------------------------------ | -| region | `ap-northeast-1` | The current AWS region | -| profile | `astronauts` | The current AWS profile | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| 変数 | 設定例 | 説明 | +| --------- | ---------------- | ---------------------- | +| region | `ap-northeast-1` | 現在のAWSリージョン | +| profile | `astronauts` | 現在のAWSプロファイル | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | \*: This variable can only be used as a part of a style string ### Examples -#### Display everything +#### すべてを表示 ```toml # ~/.config/starship.toml @@ -255,7 +269,7 @@ ap-southeast-2 = "au" us-east-1 = "va" ``` -#### Display region +#### リージョンを表示 ```toml # ~/.config/starship.toml @@ -269,7 +283,7 @@ ap-southeast-2 = "au" us-east-1 = "va" ``` -#### Display profile +#### プロファイルを表示 ```toml # ~/.config/starship.toml @@ -282,28 +296,28 @@ symbol = "🅰 " ## バッテリー -`battery`モジュールは、デバイスのバッテリー残量と現在の充電状態を示します。 モジュールは、デバイスのバッテリー残量が10%未満の場合にのみ表示されます。 +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. ### オプション -| Option | デフォルト | 説明 | -| -------------------- | --------------------------------- | -------------------------- | -| `full_symbol` | `"•"` | バッテリーが満タンのときに表示される記号です。 | -| `charging_symbol` | `"⇡"` | バッテリーの充電中に表示される記号です。 | -| `discharging_symbol` | `"⇣"` | バッテリーが放電しているときに表示される記号です。 | -| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | -| `display` | [link](#battery-display) | モジュールの閾値とスタイルを表示します。 | -| `disabled` | `false` | `battery`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| -------------------- | --------------------------------- | ------------------------- | +| `full_symbol` | `"•"` | バッテリーが満タンのときに表示される記号です。 | +| `charging_symbol` | `"⇡"` | バッテリーの充電中に表示される記号です。 | +| `discharging_symbol` | `"⇣"` | バッテリーが放電しているときに表示される記号です。 | +| `format` | `"[$symbol$percentage]($style) "` | moduleのフォーマットです。 | +| `display` | [link](#battery-display) | モジュールの閾値とスタイルを表示します。 | +| `disabled` | `false` | `battery`モジュールを無効にします。 |デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。
+By default the swap usage is displayed if the total system swap is non-zero. -::: tip
+::: tip -このモジュールはデフォルトで無効になっています。
-有効にするには、設定ファイルで
-Starshipのドキュメントを見る ▶
+Starshipのドキュメントを見る ▶
-Consulte a documentação ▶
+Consulte a documentação ▶
-Explore the Starship docs ▶
+Explore the Starship docs ▶
-Изучите документацию Starship ▶
+Изучите документацию Starship ▶
-Explore the Starship docs ▶
+Explore the Starship docs ▶
-Explore the Starship docs ▶
+Explore the Starship docs ▶
disabled`を`false`に設定します。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### オプション
-| Option | デフォルト | 説明 |
-| ----------- | --------------------------------------------- | --------------------------- |
-| `threshold` | `75` | この閾値を超えない限り、メモリ使用率は表示されません。 |
-| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
-| `symbol` | `"🐏"` | メモリ使用率を表示する前に使用される記号です。 |
-| `style` | `"bold dimmed white"` | モジュールのスタイルです。 |
-| `disabled` | `true` | `memory_usage`モジュールを無効にします。 |
+| オプション | デフォルト | 説明 |
+| ----------- | --------------------------------------------- | -------------------------------------------------------- |
+| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
+| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | moduleのフォーマットです。 |
+| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
+| `style` | `"bold dimmed white"` | モジュールのスタイルです。 |
+| `disabled` | `true` | Disables the `memory_usage` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| ------------- | ------------- | ------------------------------------------------------------------ |
-| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. |
-| ram_pct | `48%` | The percentage of the current system memory. |
-| swap\** | `1GiB/4GiB` | The swap memory size of the current system swap memory file. |
-| swap_pct\** | `77%` | The swap memory percentage of the current system swap memory file. |
-| symbol | `🐏` | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| ---------------- | ------------- | ------------------------------------------------------------------ |
+| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. |
+| ram_pct | `48%` | The percentage of the current system memory. |
+| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. |
+| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. |
+| symbol | `🐏` | オプション `記号` の値をミラーする |
+| style\* | | オプション `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
@@ -1353,28 +1471,28 @@ separator = "/"
style = "bold dimmed green"
```
-## Mercurial ブランチ
+## Mercurial Branch
-` hg_branch `モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを示します。
+The `hg_branch` module shows the active branch of the repo in your current directory.
### オプション
-| Option | デフォルト | 説明 |
+| オプション | デフォルト | 説明 |
| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- |
| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
| `style` | `"bold purple"` | モジュールのスタイルです。 |
-| `format` | `"on [$symbol$branch]($style) "` | The format for the module. |
+| `format` | `"on [$symbol$branch]($style) "` | moduleのフォーマットです。 |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes |
-| `truncation_symbol` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 |
+| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
| `disabled` | `true` | Disables the `hg_branch` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | -------- | ------------------------------------ |
-| branch | `master` | The active mercurial branch |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | -------- | --------------------------- |
+| branch | `master` | The active mercurial branch |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1393,14 +1511,14 @@ truncation_symbol = ""
The `nim` module shows the currently installed version of Nim. 次の条件のいずれかが満たされると、モジュールが表示されます。
-- カレントディレクトリに`nim.cfg`ファイルが含まれている
+- The current directory contains a `nim.cfg` file
- The current directory contains a file with the `.nim` extension
- The current directory contains a file with the `.nims` extension
- The current directory contains a file with the `.nimble` extension
### オプション
-| Option | デフォルト | 説明 |
+| オプション | デフォルト | 説明 |
| ---------- | ---------------------------------- | ----------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module |
| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. |
@@ -1409,11 +1527,11 @@ The `nim` module shows the currently installed version of Nim. 次の条件の
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | -------- | ------------------------------------ |
-| version | `v1.2.0` | The version of `nimc` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | -------- | ---------------------- |
+| version | `v1.2.0` | The version of `nimc` |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1429,27 +1547,27 @@ symbol = "🎣 "
## Nix-shell
-`nix_shell`モジュールは、nix-shell環境を示しています。 このモジュールは、nixシェル環境内にあるときに表示されます。
+The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
### オプション
-| Option | デフォルト | 説明 |
+| オプション | デフォルト | 説明 |
| ------------ | -------------------------------------------------- | ----------------------------------------------------- |
-| `format` | `"via [$symbol$state( \\($name\\))]($style) "` | The format for the module. |
-| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. |
+| `format` | `"via [$symbol$state( \\($name\\))]($style) "` | moduleのフォーマットです。 |
+| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. |
| `style` | `"bold blue"` | モジュールのスタイルです。 |
| `impure_msg` | `"impure"` | A format string shown when the shell is impure. |
| `pure_msg` | `"pure"` | A format string shown when the shell is pure. |
-| `disabled` | `false` | `nix_shell`モジュールを無効にします。 |
+| `disabled` | `false` | Disables the `nix_shell` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | ------- | ------------------------------------ |
-| state | `pure` | The state of the nix-shell |
-| name | `lorri` | The name of the nix-shell |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | ------- | -------------------------- |
+| state | `pure` | The state of the nix-shell |
+| name | `lorri` | The name of the nix-shell |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1467,30 +1585,30 @@ format = "via [☃️ $state( \\($name\\))](bold blue) "
## NodeJS
-`nodejs`モジュールは、現在インストールされているNodeJSのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
+The `nodejs` module shows the currently installed version of NodeJS. 次の条件のいずれかが満たされると、モジュールが表示されます。
-- カレントディレクトリに`package.json`ファイルが含まれている
+- The current directory contains a `package.json` file
- The current directory contains a `.node-version` file
-- カレントディレクトリに`node_modules`ディレクトリが含まれている
+- The current directory contains a `node_modules` directory
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
- The current directory contains a file with the `.ts` extension
### オプション
-| Option | デフォルト | 説明 |
+| オプション | デフォルト | 説明 |
| ---------- | ---------------------------------- | -------------------------------------------------- |
-| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
| `style` | `"bold green"` | モジュールのスタイルです。 |
-| `disabled` | `false` | `nodejs`モジュールを無効にします。 |
+| `disabled` | `false` | Disables the `nodejs` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | ---------- | ------------------------------------ |
-| version | `v13.12.0` | The version of `node` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | ---------- | ---------------------- |
+| version | `v13.12.0` | The version of `node` |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1503,37 +1621,39 @@ format = "via [☃️ $state( \\($name\\))](bold blue) "
format = "via [🤖 $version](bold green) "
```
-## パッケージのバージョン
+## Package Version
-`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` packages.
+The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
-- **npm** – `npm`パッケージバージョンは、現在のディレクトリにある`package.json`から抽出されます
-- **cargo** – `cargo`パッケージバージョンは、現在のディレクトリにある`Cargo.toml`から抽出されます。
-- **poetry** – `poetry`パッケージバージョンは、現在のディレクトリにある`pyproject.toml`から抽出されます
-- **composer** – `composer`パッケージバージョンは、現在のディレクトリにある`composer.json`から抽出されます
+- **npm** – The `npm` package version is extracted from the `package.json` present in the current directory
+- **cargo** – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
+- **poetry** – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
+- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory
- **gradle** – The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
- **mix** - The `mix` package version is extracted from the `mix.exs` present
+- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present
+- **maven** - The `maven` package version is extracted from the `pom.xml` present
> ⚠️ 表示されるバージョンは、パッケージマネージャーではなく、ソースコードが現在のディレクトリにあるパッケージのバージョンです。
### オプション
-| Option | デフォルト | 説明 |
-| ----------------- | ---------------------------------- | --------------------------------------------------------- |
-| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
-| `symbol` | `"📦 "` | パッケージのバージョンを表示する前に使用される記号です。 |
-| `style` | `"bold 208"` | モジュールのスタイルです。 |
-| `display_private` | `false` | Enable displaying version for packages marked as private. |
-| `disabled` | `false` | `package` モジュールを無効にします。 |
+| オプション | デフォルト | 説明 |
+| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
+| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
+| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
+| `style` | `"bold 208"` | モジュールのスタイルです。 |
+| `display_private` | `false` | Enable displaying version for packages marked as private. |
+| `disabled` | `false` | Disables the `package` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | -------- | ------------------------------------ |
-| version | `v1.0.0` | The version of your package |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | -------- | --------------------------- |
+| version | `v1.0.0` | The version of your package |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1559,7 +1679,7 @@ The `ocaml` module shows the currently installed version of OCaml. 次の条件
### オプション
-| Option | デフォルト | 説明 |
+| オプション | デフォルト | 説明 |
| ---------- | ---------------------------------- | ------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format string for the module. |
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
@@ -1568,11 +1688,11 @@ The `ocaml` module shows the currently installed version of OCaml. 次の条件
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | --------- | ------------------------------------ |
-| version | `v4.10.0` | The version of `ocaml` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | --------- | ---------------------- |
+| version | `v4.10.0` | The version of `ocaml` |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1585,30 +1705,66 @@ The `ocaml` module shows the currently installed version of OCaml. 次の条件
format = "via [🐪 $version]($style) "
```
-## PHP
+## Perl
-`php`モジュールは、現在インストールされているPHPのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
+The `perl` module shows the currently installed version of Perl. 次の条件のいずれかが満たされると、モジュールが表示されます。
-- カレントディレクトリに`composer.json`ファイルが含まれている
-- The current directory contains a `.php-version` file
-- カレントディレクトリに`.php`の拡張子のファイルが含まれている
+- The current directory contains a `Makefile.PL` or `Build.PL` file
+- The current directory contains a `cpanfile` or `cpanfile.snapshot` file
+- The current directory contains a `META.json` file or `META.yml` file
+- The current directory contains a `.perl-version` file
+- The current directory contains a `.pl`, `.pm` or `.pod`
### オプション
-| Option | デフォルト | 説明 |
-| ---------- | ---------------------------------- | -------------------------- |
-| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
-| `symbol` | `"🐘 "` | PHPのバージョンを表示する前に使用される記号です。 |
-| `style` | `"147 bold"` | モジュールのスタイルです。 |
-| `disabled` | `false` | `php`モジュールを無効にします。 |
+| 変数 | デフォルト | 説明 |
+| ---------- | ---------------------------------- | ----------------------------------------------------- |
+| `format` | `"via [$symbol$version]($style) "` | The format string for the module. |
+| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl |
+| `style` | `"bold 149"` | モジュールのスタイルです。 |
+| `disabled` | `false` | Disables the `perl` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | -------- | ------------------------------------ |
-| version | `v7.3.8` | The version of `php` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | --------- | ---------------------- |
+| version | `v5.26.1` | The version of `perl` |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
+
+### 設定例
+
+```toml
+# ~/.config/starship.toml
+
+[perl]
+format = "via [🦪 $version]($style) "
+```
+
+## PHP
+
+The `php` module shows the currently installed version of PHP. 次の条件のいずれかが満たされると、モジュールが表示されます。
+
+- The current directory contains a `composer.json` file
+- The current directory contains a `.php-version` file
+- The current directory contains a `.php` file
+
+### オプション
+
+| オプション | デフォルト | 説明 |
+| ---------- | ---------------------------------- | ----------------------------------------------------- |
+| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
+| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
+| `style` | `"147 bold"` | モジュールのスタイルです。 |
+| `disabled` | `false` | Disables the `php` module. |
+
+### Variables
+
+| 変数 | 設定例 | 説明 |
+| --------- | -------- | ---------------------- |
+| version | `v7.3.8` | The version of `php` |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1629,35 +1785,37 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
次の条件のいずれかが満たされると、モジュールが表示されます。
-- カレントディレクトリに`.python-version`ファイルが含まれている
-- カレントディレクトリに`requirements.txt`ファイルが含まれている
-- カレントディレクトリに`pyproject.toml`ファイルが含まれている
+- The current directory contains a `.python-version` file
+- The current directory contains a `requirements.txt` file
+- The current directory contains a `pyproject.toml` file
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
-- カレントディレクトリに`Pipfile`ファイルが含まれている
-- カレントディレクトリに`tox.ini`ファイルが含まれている
-- カレントディレクトリに`setup.py`ファイルが含まれている
+- The current directory contains a `Pipfile` file
+- The current directory contains a `tox.ini` file
+- The current directory contains a `setup.py` file
- The current directory contains a `__init__.py` file
-- 仮想環境がアクティブである
+- A virtual environment is currently activated
### オプション
-| Option | デフォルト | 説明 |
-| -------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------- |
-| `format` | `"via [${symbol}${version}( \\($virtualenv\\))]($style) "` | The format for the module. |
-| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
-| `style` | `"yellow bold"` | モジュールのスタイルです。 |
-| `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します |
-| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
-| `disabled` | `false` | `python`モジュールを無効にします。 |
+| オプション | デフォルト | 説明 |
+| -------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
+| `format` | `"via [${symbol}${pyenv_prefix}${version}( \\($virtualenv\\))]($style) "` | moduleのフォーマットです。 |
+| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
+| `style` | `"yellow bold"` | モジュールのスタイルです。 |
+| `pyenv_version_name` | `false` | Use pyenv to get Python version |
+| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
+| `disabled` | `false` | Disables the `python` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| ---------- | --------------- | ------------------------------------ |
-| version | `"v3.8.1"` | The version of `python` |
-| symbol | `"🐍 "` | Mirrors the value of option `symbol` |
-| style | `"yellow bold"` | Mirrors the value of option `style` |
-| virtualenv | `"venv"` | The current `virtualenv` name |
+| 変数 | 設定例 | 説明 |
+| ------------ | --------------- | ------------------------------------------ |
+| version | `"v3.8.1"` | The version of `python` |
+| symbol | `"🐍 "` | オプション `記号` の値をミラーする |
+| style | `"yellow bold"` | オプション `style` の値をミラーする |
+| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` |
+| virtualenv | `"venv"` | The current `virtualenv` name |
This module has some advanced configuration options.
@@ -1685,33 +1843,32 @@ python_binary = "python3"
[python]
symbol = "👾 "
pyenv_version_name = true
-pyenv_prefix = "foo "
```
## Ruby
-`ruby`モジュールは、現在インストールされているRubyのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
+The `ruby` module shows the currently installed version of Ruby. 次の条件のいずれかが満たされると、モジュールが表示されます。
-- カレントディレクトリに`Gemfile`ファイルが含まれている
+- The current directory contains a `Gemfile` file
- The current directory contains a `.ruby-version` file
-- カレントディレクトリに`.rb`の拡張子のファイルが含まれている
+- The current directory contains a `.rb` file
### オプション
-| Option | デフォルト | 説明 |
+| オプション | デフォルト | 説明 |
| ---------- | ---------------------------------- | ------------------------------------------------ |
-| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | モジュールのスタイルです。 |
-| `disabled` | `false` | `ruby`モジュールを無効にします。 |
+| `disabled` | `false` | Disables the `ruby` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | -------- | ------------------------------------ |
-| version | `v2.5.1` | The version of `ruby` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | -------- | ---------------------- |
+| version | `v2.5.1` | The version of `ruby` |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1726,27 +1883,27 @@ symbol = "🔺 "
## Rust
-`rust`モジュールには、現在インストールされているRustのバージョンが表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます。
+The `rust` module shows the currently installed version of Rust. 次の条件のいずれかが満たされると、モジュールが表示されます。
-- カレントディレクトリに`Cargo.toml`ファイルが含まれている
-- カレントディレクトリに`.rs`の拡張子のファイルが含まれている
+- The current directory contains a `Cargo.toml` file
+- The current directory contains a file with the `.rs` extension
### オプション
-| Option | デフォルト | 説明 |
+| オプション | デフォルト | 説明 |
| ---------- | ---------------------------------- | ----------------------------------------------- |
-| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | モジュールのスタイルです。 |
-| `disabled` | `false` | `rust`モジュールを無効にします。 |
+| `disabled` | `false` | Disables the `rust` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | ----------------- | ------------------------------------ |
-| version | `v1.43.0-nightly` | The version of `rustc` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | ----------------- | ---------------------- |
+| version | `v1.43.0-nightly` | The version of `rustc` |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1759,26 +1916,61 @@ symbol = "🔺 "
format = "via [⚙️ $version](red bold)"
```
+## SHLVL
+
+The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
+
+### オプション
+
+| 変数 | デフォルト | 説明 |
+| ----------- | ---------------------------- | --------------------------------------- |
+| `threshold` | `2` | Display threshold. |
+| `format` | `"[$symbol$shlvl]($style) "` | moduleのフォーマットです。 |
+| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. |
+| `style` | `"bold yellow"` | モジュールのスタイルです。 |
+| `disabled` | `true` | Disables the `shlvl` module. |
+
+### Variables
+
+| 変数 | 設定例 | 説明 |
+| --------- | --- | -------------------------- |
+| shlvl | `3` | The current value of SHLVL |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
+
+\*: This variable can only be used as a part of a style string
+
+### 設定例
+
+```toml
+# ~/.config/starship.toml
+
+[shlvl]
+disabled = false
+format = "$shlvl level(s) down"
+threshold = 3
+```
+
## Singularity
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
### オプション
-| Option | デフォルト | 説明 |
+| オプション | デフォルト | 説明 |
| ---------- | ------------------------------------ | ------------------------------------------------ |
-| `format` | `"[$symbol\\[$env\\]]($style) "` | The format for the module. |
+| `format` | `"[$symbol\\[$env\\]]($style) "` | moduleのフォーマットです。 |
| `symbol` | `""` | A format string displayed before the image name. |
| `style` | `"bold dimmed blue"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `singularity` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | ------------ | ------------------------------------ |
-| env | `centos.img` | The current singularity image |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | ------------ | ----------------------------- |
+| env | `centos.img` | The current singularity image |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1791,30 +1983,107 @@ The `singularity` module shows the current singularity image, if inside a contai
format = "[📦 \\[$env\\]]($style) "
```
-## Terraform
+## Swift
-`terraform`モジュールには、現在選択されているterraformワークスペースとバージョンが表示されます。 デフォルトでは、Terraformのバージョンは表示されません。これは、多くのプラグインが使用されている場合、Terraformの現在のバージョンでは遅いためです。 If you still want to enable it, [follow the example shown below](#with-version). 次の条件のいずれかが満たされると、モジュールが表示されます。
+The `swift` module shows the currently installed version of Swift. 次の条件のいずれかが満たされると、モジュールが表示されます。
-- カレントディレクトリに`.terraform`フォルダが含まれている
-- カレントディレクトリに`.tf`の拡張子のファイルが含まれている
+- The current directory contains a `Package.swift` file
+- The current directory contains a file with the `.swift` extension
### オプション
-| Option | デフォルト | 説明 |
+| オプション | デフォルト | 説明 |
+| ---------- | ---------------------------------- | ------------------------------------------------ |
+| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
+| `symbol` | `"🐦 "` | A format string representing the symbol of Swift |
+| `style` | `"bold 202"` | モジュールのスタイルです。 |
+| `disabled` | `false` | Disables the `swift` module. |
+
+### Variables
+
+| 変数 | 設定例 | 説明 |
+| --------- | -------- | ---------------------- |
+| version | `v5.2.4` | The version of `swift` |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
+
+\*: This variable can only be used as a part of a style string
+
+### 設定例
+
+```toml
+# ~/.config/starship.toml
+
+[swift]
+format = "via [🏎 $version](red bold)"
+```
+
+## 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`.
+
+::: tip
+
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
+
+### オプション
+
+| 変数 | デフォルト | 説明 |
+| ---------- | -------------------------- | ------------------------------------------------------ |
+| `format` | `[$symbol$status]($style)` | The format of the module |
+| `symbol` | `"✖"` | A format string representing the symbol for the status |
+| `style` | `"bold red"` | モジュールのスタイルです。 |
+| `disabled` | `true` | Disables the `status` module. |
+
+
+### Variables
+
+| 変数 | 設定例 | 説明 |
+| --------- | ----- | --------------------------------- |
+| status | `127` | The exit code of the last command |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
+
+\*: This variable can only be used as a part of a style string
+
+
+### 設定例
+```toml
+
+# ~/.config/starship.toml
+
+[status]
+style = "bg:blue"
+symbol = "💣 "
+format = "[\\[$symbol$status\\]]($style) "
+disabled = false
+
+```
+
+## Terraform
+
+The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). 次の条件のいずれかが満たされると、モジュールが表示されます。
+
+- The current directory contains a `.terraform` folder
+- Current directory contains a file with the `.tf` extension
+
+### オプション
+
+| オプション | デフォルト | 説明 |
| ---------- | ------------------------------------ | ----------------------------------------------------- |
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
| `symbol` | `"💠 "` | A format string shown before the terraform workspace. |
| `style` | `"bold 105"` | モジュールのスタイルです。 |
-| `disabled` | `false` | `terraform`モジュールを無効にします。 |
+| `disabled` | `false` | Disables the `terraform` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | ---------- | ------------------------------------ |
-| version | `v0.12.24` | The version of `terraform` |
-| workspace | `default` | The current terraform workspace |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | ---------- | ------------------------------- |
+| version | `v0.12.24` | The version of `terraform` |
+| workspace | `default` | The current terraform workspace |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1838,36 +2107,36 @@ format = "[🏎💨 $version$workspace]($style) "
format = "[🏎💨 $workspace]($style) "
```
-## 時刻
+## Time
-`time`モジュールは、現在の**現地**時間を示します。 `format`設定は、時間の表示方法を制御するために[`chrono`](https://crates.io/crates/chrono)クレートによって使用されます。 使用可能なオプションを確認するには、[chrono strftimeのドキュメント](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)をご覧ください。
+The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
::: tip
-このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### オプション
-| Option | デフォルト | 説明 |
-| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- |
-| `format` | `"at [$time]($style) "` | The format string for the module. |
-| `use_12hr` | `false` | 12時間のフォーマットを有効にします。 |
-| `time_format` | この表の下を参照してください | 時刻のフォーマットに使用される[クロノフォーマット文字列](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) です。 |
-| `style` | `"bold yellow"` | モジュールのスタイルです。 |
-| `utc_time_offset` | `"local"` | 使用するUTCオフセットを設定します。 Range from -24 < x < 24. フロートが30/45分のタイムゾーンオフセットに対応できるようにします。 |
-| `disabled` | `true` | `time`モジュールを無効にします。 |
-| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
+| オプション | デフォルト | 説明 |
+| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
+| `format` | `"at [$time]($style) "` | The format string for the module. |
+| `use_12hr` | `false` | Enables 12 hour formatting |
+| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
+| `style` | `"bold yellow"` | The style for the module time |
+| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
+| `disabled` | `true` | Disables the `time` module. |
+| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
-If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. それ以外の場合、デフォルトは`"%T"`です。 Manually setting `time_format` will override the `use_12hr` setting.
+If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | ---------- | ----------------------------------- |
-| 時刻 | `13:08:10` | The current time. |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | ---------- | ---------------------- |
+| time | `13:08:10` | The current time. |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1884,24 +2153,24 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
-## ユーザー名
+## Username
-`username`モジュールには、アクティブなユーザーのユーザー名が表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます。
+The `username` module shows active user's username. 次の条件のいずれかが満たされると、モジュールが表示されます。
-- カレントユーザーがroot
-- カレントユーザーが、ログインしているユーザーとは異なる
-- ユーザーがSSHセッションとして接続されている
-- `show_always`変数がtrueに設定されている
+- The current user is root
+- The current user isn't the same as the one that is logged in
+- The user is currently connected as an SSH session
+- The variable `show_always` is set to true
### オプション
-| Option | デフォルト | 説明 |
-| ------------- | ------------------------ | -------------------------- |
-| `style_root` | `"bold red"` | ユーザーがrootのときに使用されるスタイルです。 |
-| `style_user` | `"bold yellow"` | 非rootユーザーに使用されるスタイルです。 |
-| `format` | `"via [$user]($style) "` | The format for the module. |
-| `show_always` | `false` | `username` モジュールを常に表示します。 |
-| `disabled` | `false` | `username` モジュールを無効にします。 |
+| オプション | デフォルト | 説明 |
+| ------------- | ----------------------- | ------------------------------------- |
+| `style_root` | `"bold red"` | The style used when the user is root. |
+| `style_user` | `"bold yellow"` | The style used for non-root users. |
+| `format` | `"[$user]($style) in "` | moduleのフォーマットです。 |
+| `show_always` | `false` | Always shows the `username` module. |
+| `disabled` | `false` | Disables the `username` module. |
### Variables
@@ -1931,20 +2200,20 @@ The `zig` module shows the currently installed version of Zig. 次の条件の
### オプション
-| Option | デフォルト | 説明 |
+| オプション | デフォルト | 説明 |
| ---------- | ---------------------------------- | ----------------------------------------------------- |
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
-| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `disabled` | `false` | Disables the `zig` module. |
### Variables
-| 変数 | 設定例 | 説明 |
-| --------- | -------- | ------------------------------------ |
-| version | `v0.6.0` | The version of `zig` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| 変数 | 設定例 | 説明 |
+| --------- | -------- | ---------------------- |
+| version | `v0.6.0` | The version of `zig` |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
\*: This variable can only be used as a part of a style string
@@ -1976,24 +2245,30 @@ Multiple custom modules can be defined by using a `.`.
::: tip
-The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
+The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined.
+
+:::
+
+::: tip
+
+[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there!
:::
### オプション
-| Option | デフォルト | 説明 |
+| オプション | デフォルト | 説明 |
| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| `command` | | The command whose output should be printed. |
+| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
-| `shell` | | [この表の下を参照してください](#custom-command-shell) |
-| `説明` | `"LC_ALL`がUTF-8値でない場合、[変更する必要があります](https://www.tecmint.com/set-system-locales-in-linux/)。
+- 絵文字フォントがインストールされています。 ほとんどのシステムにはデフォルトで絵文字フォントが付属していますが、 一部(特にArch Linux) はそうではありません。 通常、システムの パッケージマネージャーからインストールすることができます--[noto emoji](https://www.google.com/get/noto/help/emoji/)は人気な選択肢です。
+- [Nerd Font](https://www.nerdfonts.com/)を使用しています。
-To test your system, run the following commands in a terminal:
+システムをテストするには、ターミナルで次のコマンドを実行します。
```sh
echo -e "\xf0\x9f\x90\x8d"
echo -e "\xee\x82\xa0"
```
-The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
+1行目は[snake emoji](https://emojipedia.org/snake/)を生成し、2行目は[powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs)を生成するはずです。
-If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
+いずれかのシンボルが正しく表示されない場合でも、システムの設定が間違っています。 残念ながら、フォント設定を正しくするのは難しい場合があります。 Discordのユーザーがお役に立てるかもしれません。 両方の記号が正しく表示されているにもかかわらず、まだStarshipに表示されていない場合は、[バグ報告をしてください!](https://github.com/starship/starship/issues/new/choose)
-## How do I uninstall Starship?
+## Starshipをアンインストールするにはどうすればいいですか?
-Starship is just as easy to uninstall as it is to install in the first place.
+Starshipは、最初の場所にインストールするのと同じくらい簡単にアンインストールできます。
-1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship.
-1. Delete the Starship binary.
+1. Starshipを初期化するために使用されるシェル設定の行を削除します(例:`~/.bashrc`)。
+1. Starshipのバイナリを削除します。
-If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
+Starship がパッケージマネージャを使用してインストールされている場合は、アンインストール手順については、そのドキュメントを参照してください。
-If Starship was installed using the `curl | bash` script, the following command will delete the binary:
+Starship が `curl | bash` スクリプトを使用してインストールされた場合、次のコマンドはバイナリを削除します:
```sh
-# Locate and delete the starship binary
+# starshipバイナリを見つけて削除します
rm "$(which starship)"
```
diff --git a/docs/ja-JP/guide/README.md b/docs/ja-JP/guide/README.md
index 61b6d234..b2077a2a 100644
--- a/docs/ja-JP/guide/README.md
+++ b/docs/ja-JP/guide/README.md
@@ -112,7 +112,7 @@
- **簡単:** 迅速なインストールが可能であり、数分で使用開始可能です。
starship.toml`. Esta página detalha algumas das configurações mais avançadas usadas em starship.
::: warning
diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md
index a12c66b1..40117527 100644
--- a/docs/pt-BR/config/README.md
+++ b/docs/pt-BR/config/README.md
@@ -1,18 +1,12 @@
# Configuração
-::: tip
-
-As configurações estão sendo trabalhadas. Muitas novas opções de configuração estarão disponíveis nas próximas versões.
-
-:::
-
-Para começar a configurar a starship, crie o seguinte arquivo: `~/.config/starship.toml`.
+To get started configuring starship, create the following file: `~/.config/starship.toml`.
```sh
mkdir -p ~/.config && touch ~/.config/starship.toml
```
-Todas as configurações do starship são feitas neste arquivo [TOML](https://github.com/toml-lang/toml):
+All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
```toml
# Don't print a new line at the start of the prompt
@@ -27,21 +21,35 @@ success_symbol = "[➜](bold green)" # The "success_symbol" segment is being
disabled = true
```
-Você pode alterar o caminho padrão do arquivo `starship.toml` com a variável de ambiente `STARSHIP_CONFIG`:
+You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable:
```sh
export STARSHIP_CONFIG=~/.starship
```
-No PowerShell (Windows) você pode adicionar a seguinte linha no seu `$PROFILE`:
+Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
```ps1
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
```
-### Terminologia
+### Logging
-**Módulo**: Um componente no prompt que fornece informações baseado no contexto do seu SO. Por exemplo, o módulo "nodejs" mostra a versão do NodeJS instalado no seu computador, se o diretório atual for um projeto NodeJS.
+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:
+
+```sh
+export STARSHIP_CACHE=~/.starship/cache
+```
+
+Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
+
+```ps1
+$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
+```
+
+### Terminology
+
+**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project.
**Variable**: Smaller sub-components that contains information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS.
@@ -77,7 +85,7 @@ For example:
#### Estilo dos textos
-A maioria dos módulos do starship permite que você configure o estilo de exibição dos textos. Isso é feito através de um parâmetro (geralmente chamado `style`) que é uma string especificando a configuração. Aqui estão alguns exemplos de strings de estilo e o que elas fazem. Para detalhes sobre a sintaxe completa, consulte o [guia de configurações avançadas](/advanced-config/).
+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/).
- `"fg:green bg:blue"` deixa o texto verde com o fundo azul
- `"bg:blue fg:bright-green"` deixa o texto verde brilhante com o fundo azul
@@ -86,7 +94,7 @@ A maioria dos módulos do starship permite que você configure o estilo de exibi
- `"bold italic fg:purple"` deixa o texto em negrito e itálico com a cor roxa
- `""` desabilita explicitamente todos os estilos
-Note que a aparência do estilo será controlado pelo seu terminal. Por exemplo, alguns terminais deixarão as cores mais brilhantes ao invés de deixar o texto em negrito, ou alguns temas podem usar as mesmas cores para cores brilhantes e normais. Além disso, para textos em itálico, o terminal precisa ter suporte.
+Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics.
#### Conditional Format Strings
@@ -102,7 +110,7 @@ For example:
The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`).
-- $
+- \$
- \\
- [
- ]
@@ -138,15 +146,13 @@ This is the list of prompt-wide configuration options.
| -------------- | ------------------------------ | ----------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
+| `add_newline` | `true` | Add a new line before the start of the prompt. |
### Exemplo
```toml
# ~/.config/starship.toml
-# Disable the newline at the start of the prompt
-format = "$all"
-
# Use custom format
format = """
[┌───────────────────>](bold green)
@@ -155,20 +161,23 @@ format = """
# Wait 10 milliseconds for starship to check files under the current directory.
scan_timeout = 10
+
+# Disable the newline at the start of the prompt
+add_newline = false
```
### Default Prompt Format
-The default `format` is used to define the format of the prompt, if empty or no `format` is provided. Os valores padrão são os seguintes:
+The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown:
```toml
-format = "\n$all"
+format = "$all"
# Which is equivalent to
format = """
-
$username\
$hostname\
+$shlvl\
$kubernetes\
$directory\
$git_branch\
@@ -179,6 +188,7 @@ $hg_branch\
$docker_context\
$package\
$cmake\
+$dart\
$dotnet\
$elixir\
$elm\
@@ -190,17 +200,20 @@ $julia\
$nim\
$nodejs\
$ocaml\
+$perl\
$php\
$purescript\
$python\
$ruby\
$rust\
+$swift\
$terraform\
$zig\
$nix_shell\
$conda\
$memory_usage\
$aws\
+$gcloud\
$env_var\
$crystal\
$cmd_duration\
@@ -209,6 +222,7 @@ $line_break\
$jobs\
$battery\
$time\
+$status\
$character"""
```
@@ -318,9 +332,9 @@ charging_symbol = "⚡️"
discharging_symbol = "💀"
```
-### Indicador de bateria
+### Battery Display
-The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. Os valores padrão são os seguintes:
+The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown:
```toml
[[battery.display]]
@@ -439,7 +453,7 @@ The `cmake` module shows the currently installed version of CMake if:
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
-::: warning Não utilize o DEBUG-trap no Bash
+::: warning Do not hook the DEBUG trap in Bash
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
@@ -494,6 +508,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| `symbol` | `"🅒 "` | The symbol used before the environment name. |
| `style` | `"bold green"` | O estilo do módulo. |
| `format` | `"[$symbol$environment]($style) "` | The format for the module. |
+| `ignore_base` | `true` | Ignores `base` environment when activated. |
| `disabled` | `false` | Disables the `conda` module. |
### Variables
@@ -550,7 +565,43 @@ The `crystal` module shows the currently installed version of Crystal. The modul
format = "via [✨ $version](bold blue) "
```
-## Diretório
+## Dart
+
+The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met:
+
+- The current directory contains a file with `.dart` extension
+- The current directory contains a `.dart_tool` directory
+- The current directory contains a `pubspec.yaml` or `pubspec.lock` file
+
+### Opções
+
+| Variável | Padrão | Descrição |
+| ---------- | ---------------------------------- | ----------------------------------------------- |
+| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `symbol` | `"🎯 "` | A format string representing the symbol of Dart |
+| `style` | `"bold blue"` | O estilo do módulo. |
+| `disabled` | `false` | Disables the `dart` module. |
+
+### Variables
+
+| Variável | Exemplo | Descrição |
+| --------- | -------- | ------------------------------------ |
+| version | `v2.8.4` | The version of `dart` |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+### Exemplo
+
+```toml
+# ~/.config/starship.toml
+
+[dart]
+format = "via [🔰 $version](bold red) "
+```
+
+## Directory
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
@@ -790,7 +841,7 @@ The `env_var` module displays the current value of a selected environment variab
| Variável | Exemplo | Descrição |
| --------- | ------------------------------------------- | ------------------------------------------ |
-| env_value | `Windows NT` (if *variable* would be `$OS`) | The environment value of option `variable` |
+| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
@@ -841,6 +892,66 @@ The `erlang` module shows the currently installed version of Erlang/OTP. The mod
format = "via [e $version](bold red) "
```
+## Gcloud
+
+The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
+
+### Opções
+
+| Variável | Padrão | Descrição |
+| ---------------- | ---------------------------------------------------- | --------------------------------------------------------------- |
+| `format` | `"on [$symbol$account(\\($region\\))]($style) "` | The format for the module. |
+| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. |
+| `region_aliases` | | Table of region aliases to display in addition to the GCP name. |
+| `style` | `"bold blue"` | O estilo do módulo. |
+| `disabled` | `false` | Disables the `gcloud` module. |
+
+### Variables
+
+| Variável | Exemplo | Descrição |
+| --------- | ----------------- | ------------------------------------------------------------------ |
+| region | `us-central1` | The current GCP region |
+| account | `foo@example.com` | The current GCP profile |
+| project | | The current GCP project |
+| active | `default` | The active config name written in `~/.config/gcloud/active_config` |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+### Examples
+
+#### Display account and project
+
+```toml
+# ~/.config/starship.toml
+
+[gcloud]
+format = "on [$symbol$account(\\($project\\))]($style) "
+```
+
+#### Display active config name only
+
+```toml
+# ~/.config/starship.toml
+
+[gcloud]
+format = "[$symbol$active]($style) "
+style = "bold yellow"
+```
+
+#### Display account and aliased region
+
+```toml
+# ~/.config/starship.toml
+
+[gcloud]
+symbol = "️🇬️ "
+[gcloud.region_aliases]
+us-central1 = "uc1"
+asia-northeast1 = "an1"
+```
+
## Git Branch
The `git_branch` module shows the active branch of the repo in your current directory.
@@ -849,7 +960,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
| Option | Padrão | Descrição |
| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
-| `format` | `"on [$symbol$branch]($style) "` | The format for the module. Use `"$branch"` to refer to the current branch name. |
+| `format` | `"on [$symbol$branch]($style) "` | The format for the module. Use `"$branch"` to refer to the current branch name. |
| `symbol` | `" "` | A format string representing the symbol of git branch. |
| `style` | `"bold purple"` | O estilo do módulo. |
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. |
@@ -877,7 +988,7 @@ truncation_length = 4
truncation_symbol = ""
```
-## Git commit
+## Git Commit
The `git_commit` module shows the current commit hash of the repo in your current directory.
@@ -925,7 +1036,7 @@ The `git_state` module will show in directories which are part of a git reposito
| `am` | `"AM"` | A format string displayed when an `apply-mailbox` (`git am`) is in progress. |
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
| `style` | `"bold yellow"` | O estilo do módulo. |
-| `format` | `"[\\($state( $progress_current/$progress_total)\\)]($style) "` | The format for the module. |
+| `format` | `"\\([$state( $progress_current/$progress_total)]($style)\\) "` | The format for the module. |
| `disabled` | `false` | Disables the `git_state` module. |
### Variables
@@ -955,22 +1066,21 @@ The `git_status` module shows symbols representing the state of the repo in your
### Opções
-| Option | Padrão | Descrição |
-| ----------------- | ----------------------------------------------- | ---------------------------------------------------- |
-| `format` | "([\[$all_status$ahead_behind\]]($style) )" | The default format for `git_status` |
-| `conflicted` | `"="` | This branch has merge conflicts. |
-| `ahead` | `"⇡"` | The format of `ahead` |
-| `behind` | `"⇣"` | The format of `behind` |
-| `diverged` | `"⇕"` | The format of `diverged` |
-| `untracked` | `"?"` | The format of `untracked` |
-| `stashed` | `"$"` | The format of `stashed` |
-| `modified` | `"!"` | The format of `modified` |
-| `staged` | `"+"` | The format of `staged` |
-| `renamed` | `"»"` | The format of `renamed` |
-| `deleted` | `"✘"` | The format of `deleted` |
-| `show_sync_count` | `false` | Show ahead/behind count of the branch being tracked. |
-| `style` | `"bold red"` | O estilo do módulo. |
-| `disabled` | `false` | Disables the `git_status` module. |
+| Option | Padrão | Descrição |
+| ------------ | --------------------------------------------- | ----------------------------------- |
+| `format` | `"[\[$all_status$ahead_behind\]]($style) "` | The default format for `git_status` |
+| `conflicted` | `"="` | This branch has merge conflicts. |
+| `ahead` | `"⇡"` | The format of `ahead` |
+| `behind` | `"⇣"` | The format of `behind` |
+| `diverged` | `"⇕"` | The format of `diverged` |
+| `untracked` | `"?"` | The format of `untracked` |
+| `stashed` | `"$"` | The format of `stashed` |
+| `modified` | `"!"` | The format of `modified` |
+| `staged` | `"+"` | The format of `staged` |
+| `renamed` | `"»"` | The format of `renamed` |
+| `deleted` | `"✘"` | The format of `deleted` |
+| `style` | `"bold red"` | O estilo do módulo. |
+| `disabled` | `false` | Disables the `git_status` module. |
### Variables
@@ -981,12 +1091,12 @@ The following variables can be used in `format`:
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
-| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
-| `stashed` | Displays `stashed` when a stash exists for the local repository. |
-| `modified` | Displays `modified` when there are file modifications in the working directory. |
-| `staged` | Displays `staged` when a new file has been added to the staging area. |
-| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
-| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
+| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
+| `stashed` | Displays `stashed` when a stash exists for the local repository. |
+| `modified` | Displays `modified` when there are file modifications in the working directory. |
+| `staged` | Displays `staged` when a new file has been added to the staging area. |
+| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
+| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
| style\* | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
@@ -1022,6 +1132,16 @@ renamed = "👅"
deleted = "🗑"
```
+Show ahead/behind count of the branch being tracked
+```toml
+# ~/.config/starship.toml
+
+[git_status]
+ahead = "⇡${count}"
+diverged = "⇕⇡${ahead_count}⇣${behind_count}"
+behind = "⇣${count}"
+```
+
## Golang
The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met:
@@ -1108,7 +1228,7 @@ The `hostname` module shows the system hostname.
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
-| `format` | `"on [$hostname]($style) "` | The format for the module. |
+| `format` | `"[$hostname]($style) in "` | The format for the module. |
| `style` | `"bold dimmed green"` | O estilo do módulo. |
| `disabled` | `false` | Disables the `hostname` module. |
@@ -1116,7 +1236,6 @@ The `hostname` module shows the system hostname.
| Variável | Exemplo | Descrição |
| --------- | ------- | ------------------------------------ |
-| number | `1` | The number of jobs |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
@@ -1254,7 +1373,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Padrão | Descrição |
| ----------------------- | -------------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
-| `format` | `"on [$symbol$context( \\($namespace\\))]($style) "` | The format for the module. |
+| `format` | `"[$symbol$context( \\($namespace\\))]($style) in "` | The format for the module. |
| `style` | `"cyan bold"` | O estilo do módulo. |
| `namespace_spaceholder` | `none` | The value to display if no namespace was found. |
| `context_aliases` | | Table of context aliases to display. |
@@ -1283,7 +1402,7 @@ disabled = false
"dev.local.cluster.k8s" = "dev"
```
-## Quebra de linha
+## Line Break
The `line_break` module separates the prompt into two lines.
@@ -1302,7 +1421,7 @@ The `line_break` module separates the prompt into two lines.
disabled = true
```
-## Uso de memória
+## Memory Usage
The `memory_usage` module shows current system memory and swap usage.
@@ -1326,14 +1445,14 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Variables
-| Variável | Exemplo | Descrição |
-| ------------- | ------------- | ------------------------------------------------------------------ |
-| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. |
-| ram_pct | `48%` | The percentage of the current system memory. |
-| swap\** | `1GiB/4GiB` | The swap memory size of the current system swap memory file. |
-| swap_pct\** | `77%` | The swap memory percentage of the current system swap memory file. |
-| symbol | `🐏` | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variável | Exemplo | Descrição |
+| ---------------- | ------------- | ------------------------------------------------------------------ |
+| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. |
+| ram_pct | `48%` | The percentage of the current system memory. |
+| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. |
+| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. |
+| symbol | `🐏` | Mirrors the 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
@@ -1435,7 +1554,7 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
| Option | Padrão | Descrição |
| ------------ | -------------------------------------------------- | ----------------------------------------------------- |
| `format` | `"via [$symbol$state( \\($name\\))]($style) "` | The format for the module. |
-| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. |
+| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. |
| `style` | `"bold blue"` | O estilo do módulo. |
| `impure_msg` | `"impure"` | A format string shown when the shell is impure. |
| `pure_msg` | `"pure"` | A format string shown when the shell is pure. |
@@ -1504,7 +1623,7 @@ format = "via [🤖 $version](bold green) "
## Package Version
-The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` packages.
+The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
- **npm** – The `npm` package version is extracted from the `package.json` present in the current directory
- **cargo** – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
@@ -1513,6 +1632,8 @@ The `package` module is shown when the current directory is the repository for a
- **gradle** – The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
- **mix** - The `mix` package version is extracted from the `mix.exs` present
+- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present
+- **maven** - The `maven` package version is extracted from the `pom.xml` present
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
@@ -1584,6 +1705,42 @@ The `ocaml` module shows the currently installed version of OCaml. The module wi
format = "via [🐪 $version]($style) "
```
+## Perl
+
+The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met:
+
+- The current directory contains a `Makefile.PL` or `Build.PL` file
+- The current directory contains a `cpanfile` or `cpanfile.snapshot` file
+- The current directory contains a `META.json` file or `META.yml` file
+- The current directory contains a `.perl-version` file
+- The current directory contains a `.pl`, `.pm` or `.pod`
+
+### Opções
+
+| Variável | Padrão | Descrição |
+| ---------- | ---------------------------------- | ----------------------------------------------------- |
+| `format` | `"via [$symbol$version]($style) "` | The format string for the module. |
+| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl |
+| `style` | `"bold 149"` | O estilo do módulo. |
+| `disabled` | `false` | Disables the `perl` module. |
+
+### Variables
+
+| Variável | Exemplo | Descrição |
+| --------- | --------- | ------------------------------------ |
+| version | `v5.26.1` | The version of `perl` |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+### Exemplo
+
+```toml
+# ~/.config/starship.toml
+
+[perl]
+format = "via [🦪 $version]($style) "
+```
+
## PHP
The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met:
@@ -1640,23 +1797,25 @@ The module will be shown if any of the following conditions are met:
### Opções
-| Option | Padrão | Descrição |
-| -------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------- |
-| `format` | `"via [${symbol}${version}( \\($virtualenv\\))]($style) "` | The format for the module. |
-| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
-| `style` | `"yellow bold"` | O estilo do módulo. |
-| `pyenv_version_name` | `false` | Use pyenv to get Python version |
-| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
-| `disabled` | `false` | Disables the `python` module. |
+| Option | Padrão | Descrição |
+| -------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
+| `format` | `"via [${symbol}${pyenv_prefix}${version}( \\($virtualenv\\))]($style) "` | The format for the module. |
+| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
+| `style` | `"yellow bold"` | O estilo do módulo. |
+| `pyenv_version_name` | `false` | Use pyenv to get Python version |
+| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
+| `disabled` | `false` | Disables the `python` module. |
### Variables
-| Variável | Exemplo | Descrição |
-| ---------- | --------------- | ------------------------------------ |
-| version | `"v3.8.1"` | The version of `python` |
-| symbol | `"🐍 "` | Mirrors the value of option `symbol` |
-| style | `"yellow bold"` | Mirrors the value of option `style` |
-| virtualenv | `"venv"` | The current `virtualenv` name |
+| Variável | Exemplo | Descrição |
+| ------------ | --------------- | ------------------------------------------ |
+| version | `"v3.8.1"` | The version of `python` |
+| symbol | `"🐍 "` | Mirrors the value of option `symbol` |
+| style | `"yellow bold"` | Mirrors the value of option `style` |
+| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` |
+| virtualenv | `"venv"` | The current `virtualenv` name |
This module has some advanced configuration options.
@@ -1684,7 +1843,6 @@ python_binary = "python3"
[python]
symbol = "👾 "
pyenv_version_name = true
-pyenv_prefix = "foo "
```
## Ruby
@@ -1758,6 +1916,41 @@ The `rust` module shows the currently installed version of Rust. The module will
format = "via [⚙️ $version](red bold)"
```
+## SHLVL
+
+The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
+
+### Opções
+
+| Variável | Padrão | Descrição |
+| ----------- | ---------------------------- | --------------------------------------- |
+| `threshold` | `2` | Display threshold. |
+| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
+| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. |
+| `style` | `"bold yellow"` | O estilo do módulo. |
+| `disabled` | `true` | Disables the `shlvl` module. |
+
+### Variables
+
+| Variável | Exemplo | Descrição |
+| --------- | ------- | ------------------------------------ |
+| shlvl | `3` | The current value of SHLVL |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+### Exemplo
+
+```toml
+# ~/.config/starship.toml
+
+[shlvl]
+disabled = false
+format = "$shlvl level(s) down"
+threshold = 3
+```
+
## Singularity
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
@@ -1790,6 +1983,83 @@ The `singularity` module shows the current singularity image, if inside a contai
format = "[📦 \\[$env\\]]($style) "
```
+## Swift
+
+The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met:
+
+- The current directory contains a `Package.swift` file
+- The current directory contains a file with the `.swift` extension
+
+### Opções
+
+| Option | Padrão | Descrição |
+| ---------- | ---------------------------------- | ------------------------------------------------ |
+| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `symbol` | `"🐦 "` | A format string representing the symbol of Swift |
+| `style` | `"bold 202"` | O estilo do módulo. |
+| `disabled` | `false` | Disables the `swift` module. |
+
+### Variables
+
+| Variável | Exemplo | Descrição |
+| --------- | -------- | ------------------------------------ |
+| version | `v5.2.4` | The version of `swift` |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+### Exemplo
+
+```toml
+# ~/.config/starship.toml
+
+[swift]
+format = "via [🏎 $version](red bold)"
+```
+
+## 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`.
+
+::: tip
+
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
+
+### Opções
+
+| Variável | Padrão | Descrição |
+| ---------- | -------------------------- | ------------------------------------------------------ |
+| `format` | `[$symbol$status]($style)` | The format of the module |
+| `symbol` | `"✖"` | A format string representing the symbol for the status |
+| `style` | `"bold red"` | O estilo do módulo. |
+| `disabled` | `true` | Disables the `status` module. |
+
+
+### Variables
+
+| Variável | Exemplo | Descrição |
+| --------- | ------- | ------------------------------------ |
+| status | `127` | The exit code of the last command |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+
+### Exemplo
+```toml
+
+# ~/.config/starship.toml
+
+[status]
+style = "bg:blue"
+symbol = "💣 "
+format = "[\\[$symbol$status\\]]($style) "
+disabled = false
+
+```
+
## Terraform
The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met:
@@ -1894,13 +2164,13 @@ The `username` module shows active user's username. The module will be shown if
### Opções
-| Option | Padrão | Descrição |
-| ------------- | ------------------------ | ------------------------------------- |
-| `style_root` | `"bold red"` | The style used when the user is root. |
-| `style_user` | `"bold yellow"` | The style used for non-root users. |
-| `format` | `"via [$user]($style) "` | The format for the module. |
-| `show_always` | `false` | Always shows the `username` module. |
-| `disabled` | `false` | Disables the `username` module. |
+| Option | Padrão | Descrição |
+| ------------- | ----------------------- | ------------------------------------- |
+| `style_root` | `"bold red"` | The style used when the user is root. |
+| `style_user` | `"bold yellow"` | The style used for non-root users. |
+| `format` | `"[$user]($style) in "` | The format for the module. |
+| `show_always` | `false` | Always shows the `username` module. |
+| `disabled` | `false` | Disables the `username` module. |
### Variables
@@ -1975,7 +2245,13 @@ Multiple custom modules can be defined by using a `.`.
::: tip
-The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
+The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined.
+
+:::
+
+::: tip
+
+[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there!
:::
@@ -1983,10 +2259,10 @@ The order in which custom modules are shown can be individually set by setting `
| Option | Padrão | Descrição |
| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| `command` | | The command whose output should be printed. |
+| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
-| `descrição` | `"This module has some advanced configuration options.
@@ -1684,7 +1843,6 @@ python_binary = "python3"
[python]
symbol = "👾 "
pyenv_version_name = true
-pyenv_prefix = "foo "
```
## Ruby
@@ -1758,6 +1916,41 @@ The `rust` module shows the currently installed version of Rust. The module will
format = "via [⚙️ $version](red bold)"
```
+## SHLVL
+
+The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
+
+### Options
+
+| Variable | Default | Description |
+| ----------- | ---------------------------- | --------------------------------------- |
+| `threshold` | `2` | Display threshold. |
+| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
+| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. |
+| `style` | `"bold yellow"` | The style for the module. |
+| `disabled` | `true` | Disables the `shlvl` module. |
+
+### Variables
+
+| Variable | Example | Description |
+| --------- | ------- | ------------------------------------ |
+| shlvl | `3` | The current value of SHLVL |
+| symbol | | Mirrors the 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
+
+[shlvl]
+disabled = false
+format = "$shlvl level(s) down"
+threshold = 3
+```
+
## Singularity
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
@@ -1790,6 +1983,83 @@ The `singularity` module shows the current singularity image, if inside a contai
format = "[📦 \\[$env\\]]($style) "
```
+## Swift
+
+The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met:
+
+- The current directory contains a `Package.swift` file
+- The current directory contains a file with the `.swift` extension
+
+### Options
+
+| Option | Default | Description |
+| ---------- | ---------------------------------- | ------------------------------------------------ |
+| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `symbol` | `"🐦 "` | A format string representing the symbol of Swift |
+| `style` | `"bold 202"` | The style for the module. |
+| `disabled` | `false` | Disables the `swift` module. |
+
+### Variables
+
+| Variable | Example | Description |
+| --------- | -------- | ------------------------------------ |
+| version | `v5.2.4` | The version of `swift` |
+| symbol | | Mirrors the 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
+
+[swift]
+format = "via [🏎 $version](red bold)"
+```
+
+## 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`.
+
+::: tip
+
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
+
+### Options
+
+| Variable | Default | Description |
+| ---------- | -------------------------- | ------------------------------------------------------ |
+| `format` | `[$symbol$status]($style)` | The format of the module |
+| `symbol` | `"✖"` | A format string representing the symbol for the status |
+| `style` | `"bold red"` | The style for the module. |
+| `disabled` | `true` | Disables the `status` module. |
+
+
+### Variables
+
+| Variable | Example | Description |
+| --------- | ------- | ------------------------------------ |
+| status | `127` | The exit code of the last command |
+| symbol | | Mirrors the 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
+
+[status]
+style = "bg:blue"
+symbol = "💣 "
+format = "[\\[$symbol$status\\]]($style) "
+disabled = false
+
+```
+
## Terraform
The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met:
@@ -1894,13 +2164,13 @@ The `username` module shows active user's username. The module will be shown if
### Options
-| Option | Default | Description |
-| ------------- | ------------------------ | ------------------------------------- |
-| `style_root` | `"bold red"` | The style used when the user is root. |
-| `style_user` | `"bold yellow"` | The style used for non-root users. |
-| `format` | `"via [$user]($style) "` | The format for the module. |
-| `show_always` | `false` | Always shows the `username` module. |
-| `disabled` | `false` | Disables the `username` module. |
+| Option | Default | Description |
+| ------------- | ----------------------- | ------------------------------------- |
+| `style_root` | `"bold red"` | The style used when the user is root. |
+| `style_user` | `"bold yellow"` | The style used for non-root users. |
+| `format` | `"[$user]($style) in "` | The format for the module. |
+| `show_always` | `false` | Always shows the `username` module. |
+| `disabled` | `false` | Disables the `username` module. |
### Variables
@@ -1975,7 +2245,13 @@ Multiple custom modules can be defined by using a `.`.
::: tip
-The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
+The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined.
+
+:::
+
+::: tip
+
+[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there!
:::
@@ -1983,7 +2259,7 @@ The order in which custom modules are shown can be individually set by setting `
| Option | Default | Description |
| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| `command` | | The command whose output should be printed. |
+| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
| `description` | `"Также, есть опции для некоторых нетипичных состояний батареи.
+There are also options for some uncommon battery states.
| Переменная | Описание |
| ---------------- | ------------------------------------------------------- |
| `unknown_symbol` | Символ, отображаемый при неизвестном состоянии батареи. |
| `empty_symbol` | Символ, отображаемый при пустом состоянии батареи. |
-Примечание: Индикатор батареи будет скрыт при состоянии `unknown` или `empty`, если вы не указали параметр в настройках.
+Note: Battery indicator will be hidden if the status is `unknown` or `empty` unless you specify the option in the config.
Этот модуль имеет несколько расширенных опций конфигурации, которые контролируют отображение каталога.
+This module has a few advanced configuration options that control how the directory is displayed.
-| Advanced Option | По умолчанию | Описание |
-| --------------------------- | ------------ | --------------------------------------------------------------------------------- |
-| `substitutions` | | A table of substitutions to be made to the path. |
-| `fish_style_pwd_dir_length` | `0` | Количество символов, используемых при использовании логики создания пути из fish. |
-| `use_logical_path` | `true` | Отображает логический путь от оболочки (`PWD`) вместо пути от ОС. |
+| Advanced Option | По умолчанию | Описание |
+| --------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
+| `substitutions` | | A table of substitutions to be made to the path. |
+| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
+| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. |
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD.
@@ -587,7 +638,7 @@ format = "via [✨ $version](bold blue) "
"src/com/long/java/path" = "mypath"
```
-`fish_style_pwd_dir_length` взаимодействует со стандартными параметрами усечения, которые могут сначала показаться странными: если он не равен нулю, элементы пути, который обычно усекается, вместо этого отображаются с указанным количеством символов. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
+`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
This module has some advanced configuration options.
@@ -1684,16 +1843,15 @@ python_binary = "python3"
[python]
symbol = "👾 "
pyenv_version_name = true
-pyenv_prefix = "foo "
```
## Ruby
-Модуль `ruby` показывает установленную версию Ruby. Модуль будет показан, если любое из следующих условий соблюдено:
+The `ruby` module shows the currently installed version of Ruby. Модуль будет показан, если любое из следующих условий соблюдено:
-- Текущий каталог содержит файл `Gemfile`
-- Текущий каталог содержит файл `.ruby-version`
-- Текущий каталог содержит файл `.rb`
+- The current directory contains a `Gemfile` file
+- The current directory contains a `.ruby-version` file
+- The current directory contains a `.rb` file
### Опции
@@ -1702,7 +1860,7 @@ pyenv_prefix = "foo "
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | Стиль модуля. |
-| `disabled` | `false` | Отключает модуль `ruby`. |
+| `disabled` | `false` | Disables the `ruby` module. |
### Variables
@@ -1725,10 +1883,10 @@ symbol = "🔺 "
## Rust
-Модуль `rust` показывает установленную версию Rust. Модуль будет показан, если любое из следующих условий соблюдено:
+The `rust` module shows the currently installed version of Rust. Модуль будет показан, если любое из следующих условий соблюдено:
-- Текущий каталог содержит файл `Cargo.toml`
-- Текущий каталог содержит файл с расширением `.rs`
+- The current directory contains a `Cargo.toml` file
+- The current directory contains a file with the `.rs` extension
### Опции
@@ -1737,7 +1895,7 @@ symbol = "🔺 "
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | Стиль модуля. |
-| `disabled` | `false` | Отключает модуль `rust`. |
+| `disabled` | `false` | Disables the `rust` module. |
### Variables
@@ -1758,9 +1916,44 @@ symbol = "🔺 "
format = "via [⚙️ $version](red bold)"
```
+## SHLVL
+
+The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
+
+### Опции
+
+| Переменная | По умолчанию | Описание |
+| ----------- | ---------------------------- | --------------------------------------- |
+| `threshold` | `2` | Display threshold. |
+| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
+| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. |
+| `style` | `"bold yellow"` | Стиль модуля. |
+| `disabled` | `true` | Disables the `shlvl` module. |
+
+### Variables
+
+| Переменная | Пример | Описание |
+| ---------- | ------ | ------------------------------------ |
+| shlvl | `3` | The current value of SHLVL |
+| symbol | | Mirrors the 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
+
+[shlvl]
+disabled = false
+format = "$shlvl level(s) down"
+threshold = 3
+```
+
## Singularity
-Модуль `singularity` показывает текущий образ singularity, если внутри контейнера и `$SINGULARITY_NAME` установлена.
+The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
### Опции
@@ -1790,12 +1983,89 @@ format = "via [⚙️ $version](red bold)"
format = "[📦 \\[$env\\]]($style) "
```
+## Swift
+
+The `swift` module shows the currently installed version of Swift. Модуль будет показан, если любое из следующих условий соблюдено:
+
+- The current directory contains a `Package.swift` file
+- The current directory contains a file with the `.swift` extension
+
+### Опции
+
+| Option | По умолчанию | Описание |
+| ---------- | ---------------------------------- | ------------------------------------------------ |
+| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `symbol` | `"🐦 "` | A format string representing the symbol of Swift |
+| `style` | `"bold 202"` | Стиль модуля. |
+| `disabled` | `false` | Disables the `swift` module. |
+
+### Variables
+
+| Переменная | Пример | Описание |
+| ---------- | -------- | ------------------------------------ |
+| version | `v5.2.4` | The version of `swift` |
+| symbol | | Mirrors the 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
+
+[swift]
+format = "via [🏎 $version](red bold)"
+```
+
+## 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`.
+
+::: tip
+
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
+
+### Опции
+
+| Переменная | По умолчанию | Описание |
+| ---------- | -------------------------- | ------------------------------------------------------ |
+| `format` | `[$symbol$status]($style)` | The format of the module |
+| `symbol` | `"✖"` | A format string representing the symbol for the status |
+| `style` | `"bold red"` | Стиль модуля. |
+| `disabled` | `true` | Disables the `status` module. |
+
+
+### Variables
+
+| Переменная | Пример | Описание |
+| ---------- | ------ | ------------------------------------ |
+| status | `127` | The exit code of the last command |
+| symbol | | Mirrors the 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
+
+[status]
+style = "bg:blue"
+symbol = "💣 "
+format = "[\\[$symbol$status\\]]($style) "
+disabled = false
+
+```
+
## Terraform
-Модуль `terraform` показывает выбранную рабочую область и версию terraform. По умолчанию, версия terraform не показана, так как это медленно на текущих версиях terraform, при использовании большого количества плагинов. If you still want to enable it, [follow the example shown below](#with-version). Модуль будет показан, если любое из следующих условий соблюдено:
+The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). Модуль будет показан, если любое из следующих условий соблюдено:
-- Текущий каталог содержит папку `.terraform`
-- Текущий каталог содержит файл с расширением `.tf`
+- The current directory contains a `.terraform` folder
+- Current directory contains a file with the `.tf` extension
### Опции
@@ -1804,7 +2074,7 @@ format = "[📦 \\[$env\\]]($style) "
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
| `symbol` | `"💠 "` | A format string shown before the terraform workspace. |
| `style` | `"bold 105"` | Стиль модуля. |
-| `disabled` | `false` | Отключает модуль `terraform`. |
+| `disabled` | `false` | Disables the `terraform` module. |
### Variables
@@ -1837,35 +2107,35 @@ format = "[🏎💨 $version$workspace]($style) "
format = "[🏎💨 $workspace]($style) "
```
-## Время
+## Time
-Модуль `time` показывает текущее **локальное** время. Значение конфигурации `format` используется пакетом [`chrono`](https://crates.io/crates/chrono) для контроля того, как отображается время. Ознакомьтесь с [документацией chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), чтобы увидеть доступные параметры.
+The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
::: tip
-По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Опции
-| Option | По умолчанию | Описание |
-| ----------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `format` | `"at [$time]($style) "` | The format string for the module. |
-| `use_12hr` | `false` | Включить 12-часовое форматирование |
-| `time_format` | см. ниже | [Строка формата chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), используемая для форматирования времени. |
-| `style` | `"bold yellow"` | Стиль модуля времени |
-| `utc_time_offset` | `"local"` | Устанавливает смещение UTC. Range from -24 < x < 24. Разрешает числам с плавающей точкой встраивать 30/45-минутное смещение временной зоны. |
-| `disabled` | `true` | Отключает модуль `time`. |
-| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
+| Option | По умолчанию | Описание |
+| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
+| `format` | `"at [$time]($style) "` | The format string for the module. |
+| `use_12hr` | `false` | Enables 12 hour formatting |
+| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
+| `style` | `"bold yellow"` | The style for the module time |
+| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
+| `disabled` | `true` | Disables the `time` module. |
+| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
-If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Иначе по умолчанию используется `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
+If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
### Variables
| Переменная | Пример | Описание |
| ---------- | ---------- | ----------------------------------- |
-| время | `13:08:10` | The current time. |
+| 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
@@ -1883,24 +2153,24 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
-## Имя пользователя
+## Username
-Модуль `username` показывает имя текущего пользователя. Модуль будет показан, если любое из следующих условий соблюдено:
+The `username` module shows active user's username. Модуль будет показан, если любое из следующих условий соблюдено:
-- Текущий пользователь - root
-- Текущий пользователь отличается от залогиненного
-- Пользователь подключен к SSH-сессии
-- Переменная `show_always` равна true
+- The current user is root
+- The current user isn't the same as the one that is logged in
+- The user is currently connected as an SSH session
+- The variable `show_always` is set to true
### Опции
-| Option | По умолчанию | Описание |
-| ------------- | ------------------------ | ------------------------------------------------------- |
-| `style_root` | `"bold red"` | Стиль, используемый для пользователя root. |
-| `style_user` | `"bold yellow"` | Стиль, используемый для всех пользователей, кроме root. |
-| `format` | `"via [$user]($style) "` | The format for the module. |
-| `show_always` | `false` | Всегда показывать модуль `username`. |
-| `disabled` | `false` | Отключает модуль `username`. |
+| Option | По умолчанию | Описание |
+| ------------- | ----------------------- | ------------------------------------- |
+| `style_root` | `"bold red"` | The style used when the user is root. |
+| `style_user` | `"bold yellow"` | The style used for non-root users. |
+| `format` | `"[$user]($style) in "` | The format for the module. |
+| `show_always` | `false` | Always shows the `username` module. |
+| `disabled` | `false` | Disables the `username` module. |
### Variables
@@ -1975,7 +2245,13 @@ Multiple custom modules can be defined by using a `.`.
::: tip
-The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
+The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined.
+
+:::
+
+::: tip
+
+[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there!
:::
@@ -1983,10 +2259,10 @@ The order in which custom modules are shown can be individually set by setting `
| Option | По умолчанию | Описание |
| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| `command` | | The command whose output should be printed. |
+| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
-| `описание` | `"starship.toml` 之外做更多工作才能实现某些效果。 此页面详细介绍了一些在 starship 中使用的高级配置技巧。
::: warning
diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md
index b5c4c2b1..c176fd9a 100644
--- a/docs/zh-CN/config/README.md
+++ b/docs/zh-CN/config/README.md
@@ -1,18 +1,12 @@
# 配置
-::: tip
-
-Starship 目前正在开发中。 很多新的配置选项将会在之后的版本中被公开。
-
-:::
-
-您需要创建配置文件 `~/.config/starship.toml` 以供 Starship 使用。
+To get started configuring starship, create the following file: `~/.config/starship.toml`.
```sh
mkdir -p ~/.config && touch ~/.config/starship.toml
```
-Starship 的所有配置都在此 [TOML](https://github.com/toml-lang/toml) 配置文件中完成:
+All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
```toml
# Don't print a new line at the start of the prompt
@@ -27,7 +21,7 @@ success_symbol = "[➜](bold green)" # The "success_symbol" segment is being
disabled = true
```
-你可以设置环境变量 `STARSHIP_CONFIG` 来修改 starship 查找配置文件 `starship.toml` 时查找的位置:
+You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable:
```sh
export STARSHIP_CONFIG=~/.starship
@@ -39,9 +33,23 @@ Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
```
-### 术语
+### Logging
-**组件(Module)**:提示符的组成部分,通过来自系统的上下文信息向用户显示各种信息。 比如“nodejs”组件会在当前目录是一个 NodeJS 项目时显示您当前安装的 NodeJS 版本。
+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:
+
+```sh
+export STARSHIP_CACHE=~/.starship/cache
+```
+
+Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
+
+```ps1
+$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
+```
+
+### Terminology
+
+**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project.
**Variable**: Smaller sub-components that contains information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS.
@@ -77,7 +85,7 @@ For example:
#### 样式设定
-Starship 中的大多数组件允许您为其设置显示样式。 显示样式可以通过一个字符串字段(一般是 `style`)来设置。 以下的例子给出了一些样式字符串并描述了它们的效果。 样式字符串的完整语法请查阅 [高级配置指南](/advanced-config/)。
+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/).
- `"fg:green bg:blue"` 在蓝色背景上显示绿色文本
- `"bg:blue fg:bright-green"` 在蓝色背景上显示亮绿色文本
@@ -86,7 +94,7 @@ Starship 中的大多数组件允许您为其设置显示样式。 显示样式
- `"bold italic fg:purple"` 设置文本为粗体、意大利体,颜色为紫色
- `""` 显式禁用所有样式
-请注意,最终的显示样式将由您的终端模拟器控制。 例如,有的终端模拟器对于“bold”属性的文本是加亮颜色而不是加粗文字,有的颜色主题对“普通”和“明亮”两种属性的颜色使用相同的颜色值。 此外,要获得意大利体文本(一般设计为斜体),您的终端必须支持意大利体显示。
+Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics.
#### Conditional Format Strings
@@ -102,7 +110,7 @@ For example:
The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`).
-- $
+- \$
- \\
- [
- ]
@@ -130,23 +138,21 @@ format = '''
## 提示符
-以下是关于提示符的配置项。
+This is the list of prompt-wide configuration options.
### 配置项
-| Option | 默认值 | 描述 |
-| -------------- | ----------------------------- | ----------------------------------- |
-| `format` | [见下文](#default-prompt-format) | Configure the format of the prompt. |
-| `scan_timeout` | `30` | Starship 扫描文件的超时时间(单位:毫秒)。 |
+| Option | 默认值 | 描述 |
+| -------------- | ----------------------------- | ----------------------------------------------------- |
+| `format` | [见下文](#default-prompt-format) | Configure the format of the prompt. |
+| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
+| `add_newline` | `true` | Add a new line before the start of the prompt. |
### 示例
```toml
# ~/.config/starship.toml
-# Disable the newline at the start of the prompt
-format = "$all"
-
# Use custom format
format = """
[┌───────────────────>](bold green)
@@ -155,20 +161,23 @@ format = """
# Wait 10 milliseconds for starship to check files under the current directory.
scan_timeout = 10
+
+# Disable the newline at the start of the prompt
+add_newline = false
```
### Default Prompt Format
-The default `format` is used to define the format of the prompt, if empty or no `format` is provided. 默认设置如下:
+The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown:
```toml
-format = "\n$all"
+format = "$all"
# Which is equivalent to
format = """
-
$username\
$hostname\
+$shlvl\
$kubernetes\
$directory\
$git_branch\
@@ -179,6 +188,7 @@ $hg_branch\
$docker_context\
$package\
$cmake\
+$dart\
$dotnet\
$elixir\
$elm\
@@ -190,17 +200,20 @@ $julia\
$nim\
$nodejs\
$ocaml\
+$perl\
$php\
$purescript\
$python\
$ruby\
$rust\
+$swift\
$terraform\
$zig\
$nix_shell\
$conda\
$memory_usage\
$aws\
+$gcloud\
$env_var\
$crystal\
$cmd_duration\
@@ -209,12 +222,13 @@ $line_break\
$jobs\
$battery\
$time\
+$status\
$character"""
```
## AWS
-`aws` 组件显示当前 AWS 主机所在区域与配置信息。 各组件基于 `AWS_REGION`,`AWS_DEFAULT_REGION` 和 `AWS_PROFILE` 环境变量与 `~/.aws/config` 文件。
+The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file.
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
@@ -282,7 +296,7 @@ symbol = "🅰 "
## Battery
-`battery` 组件显示电池充电情况和当前充电状态。 这个组件只会在当前电量低于 10% 时显示。
+The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
### 配置项
@@ -296,14 +310,14 @@ symbol = "🅰 "
| `disabled` | `false` | 禁用 `battery` 组件。 |
也有一些给不常见的电源状态设立的字段。
+There are also options for some uncommon battery states.
| 字段 | 描述 |
| ---------------- | ---------- |
| `unknown_symbol` | 显示于电池状态未知时 |
| `empty_symbol` | 显示于电池状态为空时 |
-注意:如果状态为 `unknown` 或 `empty`,电池指示器将被隐藏,除非您在配置中指定相关选项。
+Note: Battery indicator will be hidden if the status is `unknown` or `empty` unless you specify the option in the config.
此组件有几个高级配置选项来控制当前目录路径的显示方式。
+This module has a few advanced configuration options that control how the directory is displayed.
-| Advanced Option | 默认值 | 描述 |
-| --------------------------- | ------ | ------------------------------------------------ |
-| `substitutions` | | A table of substitutions to be made to the path. |
-| `fish_style_pwd_dir_length` | `0` | 使用 fish shell 当前目录路径逻辑时每个省略目录名使用的字符数。 |
-| `use_logical_path` | `true` | 显示由 shell 提供的逻辑路径(`PWD`)而不是 OS 提供的路径。 |
+| Advanced Option | 默认值 | 描述 |
+| --------------------------- | ------ | ---------------------------------------------------------------------------------------- |
+| `substitutions` | | A table of substitutions to be made to the path. |
+| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
+| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. |
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD.
@@ -644,7 +695,7 @@ format = "via [🐋 $context](blue bold)"
## Dotnet
-`dotnet` 模块显示与当前目录下使用的 .NET Core SDK 相关联的版本。 如果当前目录已被绑定了一个版本的 SDK,则显示被帮定的版本。 否则此组件将显示最新安装的 SDK 版本。
+The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
This module will only be shown in your prompt when one or more of the following files are present in the current directory:
@@ -660,19 +711,19 @@ This module will only be shown in your prompt when one or more of the following
You'll also need the .NET Core SDK installed in order to use it correctly.
-在内部,此组件使用自己的版本检测机制。 一般来说此组件是直接执行 `dotnet --version` 的两倍快,但当你的 .NET 项目使用了不常见的目录布局时此组件可能显示一个错误的版本。 如果相比于速度您更需要正确的版本号,您可以在组件设置中设置 `heuristic = false` 来禁用该机制。
+Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
The module will also show the Target Framework Moniker (This module has some advanced configuration options.
@@ -1684,16 +1843,15 @@ python_binary = "python3"
[python]
symbol = "👾 "
pyenv_version_name = true
-pyenv_prefix = "foo "
```
## Ruby
-`ruby` 组件显示当前安装的 Ruby 版本。 此组件将在符合以下任意条件之一时显示:
+The `ruby` module shows the currently installed version of Ruby. 此组件将在符合以下任意条件之一时显示:
-- 当前目录包含 `Gemfile` 文件
+- The current directory contains a `Gemfile` file
- The current directory contains a `.ruby-version` file
-- 当前目录包含 `.rb` 文件
+- The current directory contains a `.rb` file
### 配置项
@@ -1702,7 +1860,7 @@ pyenv_prefix = "foo "
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `ruby` 组件。 |
+| `disabled` | `false` | Disables the `ruby` module. |
### Variables
@@ -1725,10 +1883,10 @@ symbol = "🔺 "
## Rust
-`rust` 组件显示当前安装的 Rust 版本。 此组件将在符合以下任意条件之一时显示:
+The `rust` module shows the currently installed version of Rust. 此组件将在符合以下任意条件之一时显示:
-- 当前目录包含 `Cargo.toml` 文件
-- 当前目录包含一个使用 `.rs` 扩展名的文件
+- The current directory contains a `Cargo.toml` file
+- The current directory contains a file with the `.rs` extension
### 配置项
@@ -1737,7 +1895,7 @@ symbol = "🔺 "
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `rust` 组件。 |
+| `disabled` | `false` | Disables the `rust` module. |
### Variables
@@ -1758,6 +1916,41 @@ symbol = "🔺 "
format = "via [⚙️ $version](red bold)"
```
+## SHLVL
+
+The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
+
+### 配置项
+
+| 字段 | 默认值 | 描述 |
+| ----------- | ---------------------------- | --------------------------------------- |
+| `threshold` | `2` | Display threshold. |
+| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
+| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. |
+| `style` | `"bold yellow"` | 此组件的样式。 |
+| `disabled` | `true` | Disables the `shlvl` module. |
+
+### Variables
+
+| 字段 | 示例 | 描述 |
+| --------- | --- | ------------------------------------ |
+| shlvl | `3` | The current value of SHLVL |
+| symbol | | Mirrors the 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
+
+[shlvl]
+disabled = false
+format = "$shlvl level(s) down"
+threshold = 3
+```
+
## Singularity
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
@@ -1790,12 +1983,89 @@ The `singularity` module shows the current singularity image, if inside a contai
format = "[📦 \\[$env\\]]($style) "
```
+## Swift
+
+The `swift` module shows the currently installed version of Swift. 此组件将在符合以下任意条件之一时显示:
+
+- The current directory contains a `Package.swift` file
+- The current directory contains a file with the `.swift` extension
+
+### 配置项
+
+| Option | 默认值 | 描述 |
+| ---------- | ---------------------------------- | ------------------------------------------------ |
+| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `symbol` | `"🐦 "` | A format string representing the symbol of Swift |
+| `style` | `"bold 202"` | 此组件的样式。 |
+| `disabled` | `false` | Disables the `swift` module. |
+
+### Variables
+
+| 字段 | 示例 | 描述 |
+| --------- | -------- | ------------------------------------ |
+| version | `v5.2.4` | The version of `swift` |
+| symbol | | Mirrors the 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
+
+[swift]
+format = "via [🏎 $version](red bold)"
+```
+
+## 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`.
+
+::: tip
+
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
+
+### 配置项
+
+| 字段 | 默认值 | 描述 |
+| ---------- | -------------------------- | ------------------------------------------------------ |
+| `format` | `[$symbol$status]($style)` | The format of the module |
+| `symbol` | `"✖"` | A format string representing the symbol for the status |
+| `style` | `"bold red"` | 此组件的样式。 |
+| `disabled` | `true` | Disables the `status` module. |
+
+
+### Variables
+
+| 字段 | 示例 | 描述 |
+| --------- | ----- | ------------------------------------ |
+| status | `127` | The exit code of the last command |
+| symbol | | Mirrors the 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
+
+[status]
+style = "bg:blue"
+symbol = "💣 "
+format = "[\\[$symbol$status\\]]($style) "
+disabled = false
+
+```
+
## Terraform
-`terraform` 组件显示当前选定的 terraform 工作区和版本。 默认情况下不会显示 terraform 版本,因为当使用大量插件时,当前版本 terraform 查询版本号很慢。 If you still want to enable it, [follow the example shown below](#with-version). 此组件将在符合以下任意条件之一时显示:
+The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). 此组件将在符合以下任意条件之一时显示:
-- 当前目录包含 `.terraform` 目录
-- 当前目录包含一个使用 `.tf` 扩展名的文件
+- The current directory contains a `.terraform` folder
+- Current directory contains a file with the `.tf` extension
### 配置项
@@ -1804,7 +2074,7 @@ format = "[📦 \\[$env\\]]($style) "
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
| `symbol` | `"💠 "` | A format string shown before the terraform workspace. |
| `style` | `"bold 105"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `terraform` 组件。 |
+| `disabled` | `false` | Disables the `terraform` module. |
### Variables
@@ -1839,27 +2109,27 @@ format = "[🏎💨 $workspace]($style) "
## Time
-`time` 组件显示当前的 **本地** 时间。 `format` 字段值会提供给 [`chrono`](https://crates.io/crates/chrono) crate 用来控制时间显示方式。 请参阅 [chrono strftime 文档](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) 以了解可用格式选项。
+The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
::: tip
-此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### 配置项
-| Option | 默认值 | 描述 |
-| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- |
-| `format` | `"at [$time]($style) "` | The format string for the module. |
-| `use_12hr` | `false` | 启用 12 小时格式 |
-| `time_format` | 见下文解释 | 用来格式化时间显示的 [chrono 格式字符串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) |
-| `style` | `"bold yellow"` | 显示时间的样式。 |
-| `utc_time_offset` | `"local"` | 设置所用 UTC 偏移量。 Range from -24 < x < 24. 允许使用浮点数来得到 30/45 分钟的时区偏移。 |
-| `disabled` | `true` | 禁用 `time` 组件。 |
-| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
+| Option | 默认值 | 描述 |
+| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
+| `format` | `"at [$time]($style) "` | The format string for the module. |
+| `use_12hr` | `false` | Enables 12 hour formatting |
+| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
+| `style` | `"bold yellow"` | The style for the module time |
+| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
+| `disabled` | `true` | Disables the `time` module. |
+| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
-If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 否则,其默认值为 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting.
+If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
### Variables
@@ -1885,22 +2155,22 @@ time_range = "10:00:00-14:00:00"
## Username
-`username` 组件显示当前活跃的用户名。 此组件将在符合以下任意条件之一时显示:
+The `username` module shows active user's username. 此组件将在符合以下任意条件之一时显示:
-- 当前用户是 root
-- 当前用户与登录用户不相同
-- 用户正通过 SSH 会话连接访问
-- 字段 `show_always` 被设置为 true
+- The current user is root
+- The current user isn't the same as the one that is logged in
+- The user is currently connected as an SSH session
+- The variable `show_always` is set to true
### 配置项
-| Option | 默认值 | 描述 |
-| ------------- | ------------------------ | -------------------------- |
-| `style_root` | `"bold red"` | 当前用户为 root 时使用的样式。 |
-| `style_user` | `"bold yellow"` | 非 root 用户使用的样式。 |
-| `format` | `"via [$user]($style) "` | The format for the module. |
-| `show_always` | `false` | 总是显示 `username` 组件。 |
-| `disabled` | `false` | 禁用 `username` 组件。 |
+| Option | 默认值 | 描述 |
+| ------------- | ----------------------- | ------------------------------------- |
+| `style_root` | `"bold red"` | The style used when the user is root. |
+| `style_user` | `"bold yellow"` | The style used for non-root users. |
+| `format` | `"[$user]($style) in "` | The format for the module. |
+| `show_always` | `false` | Always shows the `username` module. |
+| `disabled` | `false` | Disables the `username` module. |
### Variables
@@ -1975,7 +2245,13 @@ Multiple custom modules can be defined by using a `.`.
::: tip
-The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
+The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined.
+
+:::
+
+::: tip
+
+[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there!
:::
@@ -1983,10 +2259,10 @@ The order in which custom modules are shown can be individually set by setting `
| Option | 默认值 | 描述 |
| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| `command` | | The command whose output should be printed. |
+| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
-| `描述` | `"也有些針對不常見的電池狀態設定的選項。
+There are also options for some uncommon battery states.
| 變數 | 說明 |
| ---------------- | -------------- |
| `unknown_symbol` | 當電池狀態不明時顯示的符號。 |
| `empty_symbol` | 當電池沒電時顯示的符號。 |
-注意:電池指示會在電池狀態`不明`或`沒電`時隱藏起來,除非你在設定之中有特別指定選項。
+Note: Battery indicator will be hidden if the status is `unknown` or `empty` unless you specify the option in the config.
這個模組有些進階設定選項可以控制顯示資料夾。
+This module has a few advanced configuration options that control how the directory is displayed.
-| Advanced Option | 預設 | 說明 |
-| --------------------------- | ------ | ------------------------------------------------ |
-| `substitutions` | | A table of substitutions to be made to the path. |
-| `fish_style_pwd_dir_length` | `0` | 當使用 fish shell 的 pwd 路徑邏輯時使用的字元數量。 |
-| `use_logical_path` | `true` | 顯示 shell (`PWD`) 提供的邏輯路徑,而不是 OS 的路徑。 |
+| Advanced Option | 預設 | 說明 |
+| --------------------------- | ------ | ---------------------------------------------------------------------------------------- |
+| `substitutions` | | A table of substitutions to be made to the path. |
+| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
+| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. |
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD.
@@ -644,7 +695,7 @@ format = "via [🐋 $context](blue bold)"
## Dotnet
-`dotnet` 模組顯示現在資料夾使用的 .NET Core SDK 的版本。 如果這個資料夾已經選定一個 SDK,則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。
+The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
This module will only be shown in your prompt when one or more of the following files are present in the current directory:
@@ -660,19 +711,19 @@ This module will only be shown in your prompt when one or more of the following
You'll also need the .NET Core SDK installed in order to use it correctly.
-這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。
+Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
The module will also show the Target Framework Moniker (This module has some advanced configuration options.
@@ -1684,16 +1843,15 @@ python_binary = "python3"
[python]
symbol = "👾 "
pyenv_version_name = true
-pyenv_prefix = "foo "
```
## Ruby
-`ruby` 模組顯示現在安裝的 Ruby 版本。 這個模組在下列其中一個條件達成時顯示:
+The `ruby` module shows the currently installed version of Ruby. 這個模組在下列其中一個條件達成時顯示:
-- 目前資料夾中有一個 `Gemfile` 檔案
+- The current directory contains a `Gemfile` file
- The current directory contains a `.ruby-version` file
-- 目前資料夾中有一個 `.rb` 檔案
+- The current directory contains a `.rb` file
### 選項
@@ -1702,7 +1860,7 @@ pyenv_prefix = "foo "
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | 這個模組的風格。 |
-| `disabled` | `false` | 停用 `ruby` 模組。 |
+| `disabled` | `false` | Disables the `ruby` module. |
### Variables
@@ -1725,10 +1883,10 @@ symbol = "🔺 "
## Rust
-`rust` 模組顯示現在安裝的 Rust 版本。 這個模組在下列其中一個條件達成時顯示:
+The `rust` module shows the currently installed version of Rust. 這個模組在下列其中一個條件達成時顯示:
-- 目前資料夾中有一個 `Cargo.toml` 檔案
-- 現在資料夾中包含一個檔案具有 `.rs` 副檔名
+- The current directory contains a `Cargo.toml` file
+- The current directory contains a file with the `.rs` extension
### 選項
@@ -1737,7 +1895,7 @@ symbol = "🔺 "
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | 這個模組的風格。 |
-| `disabled` | `false` | 停用 `rust` 模組。 |
+| `disabled` | `false` | Disables the `rust` module. |
### Variables
@@ -1758,6 +1916,41 @@ symbol = "🔺 "
format = "via [⚙️ $version](red bold)"
```
+## SHLVL
+
+The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
+
+### 選項
+
+| 變數 | 預設 | 說明 |
+| ----------- | ---------------------------- | --------------------------------------- |
+| `threshold` | `2` | Display threshold. |
+| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
+| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. |
+| `style` | `"bold yellow"` | 這個模組的風格。 |
+| `disabled` | `true` | Disables the `shlvl` module. |
+
+### Variables
+
+| 變數 | 範例 | 說明 |
+| --------- | --- | ------------------------------------ |
+| shlvl | `3` | The current value of SHLVL |
+| symbol | | Mirrors the 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
+
+[shlvl]
+disabled = false
+format = "$shlvl level(s) down"
+threshold = 3
+```
+
## Singularity
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
@@ -1790,6 +1983,83 @@ The `singularity` module shows the current singularity image, if inside a contai
format = "[📦 \\[$env\\]]($style) "
```
+## Swift
+
+The `swift` module shows the currently installed version of Swift. 這個模組在下列其中一個條件達成時顯示:
+
+- The current directory contains a `Package.swift` file
+- The current directory contains a file with the `.swift` extension
+
+### 選項
+
+| Option | 預設 | 說明 |
+| ---------- | ---------------------------------- | ------------------------------------------------ |
+| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
+| `symbol` | `"🐦 "` | A format string representing the symbol of Swift |
+| `style` | `"bold 202"` | 這個模組的風格。 |
+| `disabled` | `false` | Disables the `swift` module. |
+
+### Variables
+
+| 變數 | 範例 | 說明 |
+| --------- | -------- | ------------------------------------ |
+| version | `v5.2.4` | The version of `swift` |
+| symbol | | Mirrors the 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
+
+[swift]
+format = "via [🏎 $version](red bold)"
+```
+
+## 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`.
+
+::: tip
+
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
+
+### 選項
+
+| 變數 | 預設 | 說明 |
+| ---------- | -------------------------- | ------------------------------------------------------ |
+| `format` | `[$symbol$status]($style)` | The format of the module |
+| `symbol` | `"✖"` | A format string representing the symbol for the status |
+| `style` | `"bold red"` | 這個模組的風格。 |
+| `disabled` | `true` | Disables the `status` module. |
+
+
+### Variables
+
+| 變數 | 範例 | 說明 |
+| --------- | ----- | ------------------------------------ |
+| status | `127` | The exit code of the last command |
+| symbol | | Mirrors the 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
+
+[status]
+style = "bg:blue"
+symbol = "💣 "
+format = "[\\[$symbol$status\\]]($style) "
+disabled = false
+
+```
+
## Terraform
The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). 這個模組在下列其中一個條件達成時顯示:
@@ -1837,35 +2107,35 @@ format = "[🏎💨 $version$workspace]($style) "
format = "[🏎💨 $workspace]($style) "
```
-## 時間
+## Time
-`time` 模組顯示目前的**當地**時間. `format` 設定值被 [`chrono`](https://crates.io/crates/chrono) crate 用來控制時間如何顯示。 請看 [chrono 的 strftime 文件](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)來了解有那些選項可以使用。
+The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### 選項
-| Option | 預設 | 說明 |
-| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- |
-| `format` | `"at [$time]($style) "` | The format string for the module. |
-| `use_12hr` | `false` | 啟用 12 小時格式。 |
-| `time_format` | 請看下列 | 用來顯示時間的 [chrono 格式字串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)。 |
-| `style` | `"bold yellow"` | 這個模組的時間的風格。 |
-| `utc_time_offset` | `"local"` | 設定相對於 UTC 的時差。 Range from -24 < x < 24. 允許使用浮點數來表示 30/45 分鐘時差的時區。 |
-| `disabled` | `true` | 停用 `time` 模組。 |
-| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
+| Option | 預設 | 說明 |
+| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
+| `format` | `"at [$time]($style) "` | The format string for the module. |
+| `use_12hr` | `false` | Enables 12 hour formatting |
+| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
+| `style` | `"bold yellow"` | The style for the module time |
+| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
+| `disabled` | `true` | Disables the `time` module. |
+| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
-If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 不然的話,它會被預設為 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting.
+If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
### Variables
| 變數 | 範例 | 說明 |
| --------- | ---------- | ----------------------------------- |
-| 時間 | `13:08:10` | The current time. |
+| 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
@@ -1883,24 +2153,24 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
-## 使用者名稱
+## Username
-`username` 模組顯示現在使用中的使用者名稱。 這個模組在下列其中一個條件達成時顯示:
+The `username` module shows active user's username. 這個模組在下列其中一個條件達成時顯示:
-- 目前使用者為 root
-- 目前使用者並非登入時的使用者
-- 使用者透過 SSH session 進行連線
-- 變數 `show_always` 被設為 true
+- The current user is root
+- The current user isn't the same as the one that is logged in
+- The user is currently connected as an SSH session
+- The variable `show_always` is set to true
### 選項
-| Option | 預設 | 說明 |
-| ------------- | ------------------------ | -------------------------- |
-| `style_root` | `"bold red"` | 使用者為 root 時使用的風格。 |
-| `style_user` | `"bold yellow"` | 非 root 使用者時使用的風格。 |
-| `format` | `"via [$user]($style) "` | The format for the module. |
-| `show_always` | `false` | 總是顯示 `username` 模組。 |
-| `disabled` | `false` | 停用 `username` 模組。 |
+| Option | 預設 | 說明 |
+| ------------- | ----------------------- | ------------------------------------- |
+| `style_root` | `"bold red"` | The style used when the user is root. |
+| `style_user` | `"bold yellow"` | The style used for non-root users. |
+| `format` | `"[$user]($style) in "` | The format for the module. |
+| `show_always` | `false` | Always shows the `username` module. |
+| `disabled` | `false` | Disables the `username` module. |
### Variables
@@ -1975,7 +2245,13 @@ Multiple custom modules can be defined by using a `.`.
::: tip
-The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
+The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined.
+
+:::
+
+::: tip
+
+[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there!
:::
@@ -1983,10 +2259,10 @@ The order in which custom modules are shown can be individually set by setting `
| Option | 預設 | 說明 |
| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| `command` | | The command whose output should be printed. |
+| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
-| `說明` | `"