docs(i18n): new Crowdin translations (#1325)

This commit is contained in:
Matan Kushner 2020-06-19 17:05:45 -04:00 committed by GitHub
parent 611a754ec7
commit ee3c0ec9d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 1052 additions and 718 deletions

View File

@ -9,7 +9,7 @@
Um mit der Konfiguration von Starship zu beginnen, musst du die folgende Datei erstellen: `~/.config/starship.toml`.
```sh
$ mkdir -p ~/.config && touch ~/.config/starship.toml
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:
@ -558,7 +558,7 @@ symbol = "e "
## Git-Branch
The `git_branch` module shows the active branch of the repo in your current directory.
Das `git_branch`-Modul zeigt den aktiven Git-Branch des Repositories im aktuellen Verzeichnis an.
### Optionen
@ -695,7 +695,7 @@ deleted = "🗑"
## Golang
The `golang` module shows the currently installed version of Golang. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
Das `golang`-Modul zeigt die aktuell installierte Version von Golang. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- Das aktuelle Verzeichnis enthält eine `go.mod`-Datei
- Das aktuelle Verzeichnis enthält eine `go.sum`-Datei
@ -748,7 +748,7 @@ symbol = " "
## Hostname
The `hostname` module shows the system hostname.
Das `hostname`-Modul zeigt den Hostnamen des Systems an.
### Optionen
@ -768,15 +768,15 @@ The `hostname` module shows the system hostname.
[hostname]
ssh_only = false
prefix = ""
suffix = ""
prefix = "10218;"
suffix = " 10219;"
trim_at = ".companyname.com"
disabled = false
```
## Java
The `java` module shows the currently installed version of Java. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
Das `java` Modul zeigt die derzeit installierte Version von Java an. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension
@ -849,9 +849,9 @@ symbol = "∴ "
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
::: Tipp
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
:::
@ -879,7 +879,7 @@ disabled = false
## Zeilenumbruch
The `line_break` module separates the prompt into two lines.
Das `line_break`-Modul unterteilt den Prompt in zwei Zeilen.
### Optionen
@ -898,13 +898,13 @@ disabled = true
## Speicherauslastung
The `memory_usage` module shows current system memory and swap usage.
Das `memory_usage` Modul zeigt den aktuellen Systemspeicher und die swap-Nutzung an.
By default the swap usage is displayed if the total system swap is non-zero.
Standardmäßig wird die swap-Nutzung angezeigt, wenn der gesamte System-swap nicht Null ist.
::: tip
::: Tipp
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
:::
@ -962,7 +962,7 @@ truncation_symbol = ""
## Nim
The `nim` module shows the currently installed version of Nim. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
The `nim` module shows the currently installed version of Nim. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- 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
@ -986,20 +986,20 @@ style = "yellow"
symbol = "🎣 "
```
## Nix-shell
## Nix-Shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
Das `nix_shell`-Modul zeigt die nix-shell Umgebung an. Das Modul wird angezeigt, wenn es sich in einer nix-Shell-Umgebung befindet.
### Optionen
| Variable | Standardwert | Beschreibung |
| ------------ | ------------- | ------------------------------------------------- |
| `use_name` | `false` | Display the name of the nix-shell. |
| `impure_msg` | `"impure"` | Customize the "impure" msg. |
| `pure_msg` | `"pure"` | Customize the "pure" msg. |
| `use_name` | `false` | Namen der nix-Shell anzeigen. |
| `impure_msg` | `"impure"` | Passt die "impure"-Nachricht an. |
| `pure_msg` | `"pure"` | Passt die "pure"-Nachricht an. |
| `symbol` | `"❄️ "` | The symbol used before displaying the shell name. |
| `style` | `"bold blue"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `nix_shell` module. |
| `disabled` | `false` | Deaktiviert das `nix_shell`-Modul. |
### Beispiel
@ -1016,20 +1016,20 @@ symbol = "☃️ "
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
Das `nodejs` Modul zeigt die derzeit installierte Version von NodeJS. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- The current directory contains a `package.json` file
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory
- The current directory contains a file with the `.js` extension
- Das aktuelle Verzeichnis enthält ein `node_modules`-Verzeichnis
- Das aktuelle Verzeichnis enthält eine Datei mit der `.js`-Erweiterung
### Optionen
| Variable | Standartwert | Beschreibung |
| ---------- | -------------- | -------------------------------------------------------- |
| `symbol` | `"⬢ "` | The symbol used before displaying the version of NodeJS. |
| `style` | `"bold green"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `nodejs` module. |
| Variable | Standartwert | Beschreibung |
| ---------- | -------------- | ------------------------------------------------- |
| `symbol` | `"⬢ "` | Symbol das vor der NodeJS-Version angezeigt wird. |
| `style` | `"bold green"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `nodejs`-Modul. |
### Beispiel
@ -1040,13 +1040,13 @@ The `nodejs` module shows the currently installed version of NodeJS. Das Modul w
symbol = "🤖 "
```
## Package Version
## Paketversion
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.
Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository für ein Paket ist, und zeigt dessen aktuelle Version an. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` 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
- **poetry** The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
- **npm** Die `npm` Paketversion wird aus dem `package.json` gelesen, das sich im aktuellen Verzeichnis befindet
- **Cargo** Die `Cargo` Paketversion wird aus dem `Cargo.toml` gelesen, das sich im aktuellen Verzeichnis befindet
- **poetry** Die `poetry` Paketversion wird aus der `pyproject.toml` gelesen, das sich im aktuellen Verzeichnis befindet
- **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
@ -1056,12 +1056,12 @@ The `package` module is shown when the current directory is the repository for a
### Optionen
| Variable | Standardwert | Beschreibung |
| ----------------- | ------------ | ---------------------------------------------------------- |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| `style` | `"bold 208"` | Stil für dieses Modul. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | Disables the `package` module. |
| Variable | Standardwert | Beschreibung |
| ----------------- | ------------ | --------------------------------------------------------- |
| `symbol` | `"📦 "` | Symbol das vor der Paketversion angezeigt wird. |
| `style` | `"bold 208"` | Stil für dieses Modul. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | Deaktiviert das `package`-Modul. |
### Beispiel
@ -1102,19 +1102,19 @@ symbol = "🐪 "
## PHP
The `php` module shows the currently installed version of PHP. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
Das `php`-Modul zeigt die aktuell installierte Version von PHP. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- The current directory contains a `composer.json` file
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file
- Das aktuelle Verzeichnis enthält eine `.php`-Datei
### Optionen
| Variable | Standardwert | Beschreibung |
| ---------- | ------------ | ----------------------------------------------------- |
| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
| `style` | `"bold 147"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `php` module. |
| Variable | Standardwert | Beschreibung |
| ---------- | ------------ | ---------------------------------------------- |
| `symbol` | `"🐘 "` | Symbol das vor der PHP-Version angezeigt wird. |
| `style` | `"bold 147"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `php`-Modul. |
### Beispiel
@ -1133,26 +1133,44 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- Das aktuelle Verzeichnis enthält eine `.python-version`-Datei
- Das aktuelle Verzeichnis enthält eine `requirements.txt`-Datei
- Das aktuelle Verzeichnis enthält eine `pyproject.toml`-Datei
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- Das aktuelle Verzeichnis enthält eine `Pipfile`-Datei
- Das aktuelle Verzeichnis enthält eine `tox.ini`-Datei
- Das aktuelle Verzeichnis enthält eine `setup.py`-Datei
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
- Ein virtualenv ist momentan aktiv
### Optionen
| Variable | Standardwert | Beschreibung |
| -------------------- | --------------- | --------------------------------------------------------------------------- |
| `symbol` | `"🐍 "` | The symbol used before displaying the version of Python. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_prefix` | `"pyenv "` | Prefix before pyenv version display (default display is `pyenv MY_VERSION`) |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `python` module. |
| Variable | Standardwert | Beschreibung |
| -------------------- | --------------- | -------------------------------------------------------------------------- |
| `symbol` | `"🐍 "` | Symbol das vor der Python-Version angezeigt wird. |
| `pyenv_version_name` | `false` | Verwende `pyenv` um die Python-Versionzu beziehen. |
| `pyenv_prefix` | `"pyenv "` | Prefix zur Anzeige der pyenv-Version (Standard: `pyenv MY_VERSION`) |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `python`-Modul. |
<details>
<summary>This module has some advanced configuration options.</summary>
| Variable | Standardwert | Beschreibung |
| --------------- | ------------ | ----------------------------------------------------------------------------- |
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used.
```toml
# ~/.config/starship.toml
[python]
python_binary = "python3"
```
</details>
### Beispiel
@ -1167,19 +1185,19 @@ pyenv_prefix = "foo "
## Ruby
The `ruby` module shows the currently installed version of Ruby. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
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 current directory contains a `Gemfile` file
- Das aktuelle Verzeichnis enthält eine `Gemfile`-Datei
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file
- Das aktuelle Verzeichnis enthält eine `.rb`-Datei
### Optionen
| Variable | Standardwert | Beschreibung |
| ---------- | ------------ | ------------------------------------------------------ |
| `symbol` | `"💎 "` | The symbol used before displaying the version of Ruby. |
| `style` | `"bold red"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `ruby` module. |
| Variable | Standardwert | Beschreibung |
| ---------- | ------------ | ----------------------------------------------- |
| `symbol` | `"💎 "` | Symbol das vor der Ruby-Version angezeigt wird. |
| `style` | `"bold red"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `ruby`-Modul. |
### Beispiel
@ -1192,18 +1210,18 @@ symbol = "🔺 "
## Rust
The `rust` module shows the currently installed version of Rust. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
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 current directory contains a `Cargo.toml` file
- The current directory contains a file with the `.rs` extension
- Das aktuelle Verzeichnis enthält eine `Cargo.toml`-Datei
- Das aktuelle Verzeichnis enthält eine Datei mit der `.rs`-Erweiterung
### Optionen
| Variable | Standardwert | Beschreibung |
| ---------- | ------------ | ------------------------------------------------------ |
| `symbol` | `"🦀 "` | The symbol used before displaying the version of Rust. |
| `style` | `"bold red"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `rust` module. |
| Variable | Standardwert | Beschreibung |
| ---------- | ------------ | ----------------------------------------------- |
| `symbol` | `"🦀 "` | Symbol das vor der Rust-Version angezeigt wird. |
| `style` | `"bold red"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `rust`-Modul. |
### Beispiel
@ -1220,7 +1238,7 @@ The `singularity` module shows the current singularity image, if inside a contai
### Optionen
| Variable | Standardwert | Beschreibung |
| Variable | Standartwert | Beschreibung |
| ---------- | -------------------- | ------------------------------------------------ |
| `label` | `""` | Prefix before the image name display. |
| `prefix` | `"["` | Prefix to display immediately before image name. |
@ -1240,19 +1258,19 @@ symbol = "📦 "
## 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. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
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. 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
- Das aktuelle Verzeichnis enthält eine `.terraform`-Datei
- Das aktuelle Verzeichnis enthält eine Datei mit der `.tf`-Erweiterung
### Optionen
| Variable | Standartwert | Beschreibung |
| -------------- | ------------ | ----------------------------------------------------------- |
| `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. |
| `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. |
| `style` | `"bold 105"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `terraform` module. |
| Variable | Standartwert | Beschreibung |
| -------------- | ------------ | -------------------------------------------------------------------------------------- |
| `symbol` | `"💠 "` | Das Symbol das vor dem Terraform-Workspacenamen angezeigt wird. |
| `show_version` | `false` | Blendet die Terraform Versionsnummer ein. Kann In großen Workspaces sehr langsam sein. |
| `style` | `"bold 105"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `terraform` Modul. |
### Beispiel
@ -1263,28 +1281,28 @@ The `terraform` module shows the currently selected terraform workspace and vers
symbol = "🏎💨 "
```
## Time
## Zeit
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
Das `time` Modul zeigt die aktuelle **lokale** Zeit an. Der `format` Wert wird von der crate [`chrono`](https://crates.io/crates/chrono) benutzt um die Zeit zu formatieren. Schau dir [die chrono strftime Dokumentation](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) an, um die möglichen Optionen zu sehen.
::: tip
::: Tipp
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
:::
### Optionen
| Variable | Standartwert | Beschreibung |
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Enables 12 hour formatting. |
| `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 |
| Variable | Standartwert | Beschreibung |
| ----------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Aktiviert 12-Stunden-Format. |
| `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. Liegt zwischen -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 |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.
Wird `use_12hr` auf `true` gestellt, nimmt `format` automatisch den Wert `"%r"` an. Andernfalls ist es standardmäßig `"%T"`. Wird hingegen `format` gesetzt, so überschreibt dies die Einstellung `use_12hr`.
### Beispiel
@ -1300,21 +1318,21 @@ time_range = "10:00:00-14:00:00"
## Username
The `username` module shows active user's username. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
Das `username` Modul zeigt den Namen des aktiven Benutzers. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- 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
- 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
### Optionen
| Variable | Standartwert | Beschreibung |
| ------------- | --------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| Variable | 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. |
| `show_always` | `false` | Immer das `username` Modul anzeigen. |
| `disabled` | `false` | Deavktiviert das `username` Modul. |
### Beispiel
@ -1359,13 +1377,13 @@ 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
::: tip
::: Tipp
Multiple custom modules can be defined by using a `.`.
:::
::: tip
::: Tipp
The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
@ -1373,20 +1391,20 @@ The order in which custom modules are shown can be individually set by setting `
### Optionen
| Variable | 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) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
| `symbol` | `""` | The symbol used before displaying the command output. |
| `style` | `"bold green"` | Stil für dieses Modul. |
| `prefix` | `""` | Prefix to display immediately before the command output. |
| `suffix` | `""` | Suffix to display immediately after the command output. |
| `disabled` | `false` | Disables this `custom` module. |
| Variable | 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` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
| `symbol` | `""` | The symbol used before displaying the command output. |
| `style` | `"bold green"` | Stil für dieses Modul. |
| `prefix` | `""` | Prefix to display immediately before the command output. |
| `suffix` | `""` | Suffix to display immediately after the command output. |
| `disabled` | `false` | Disables this `custom` module. |
#### Custom command shell
@ -1436,12 +1454,12 @@ shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
The `purescript` module shows the currently installed version of PureScript version. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- The current directory contains a `spago.dhall` file
- Das aktuelle Verzeichnis enthält eine `spago.dhall`-Datei
- The current directory contains a \*.purs files
### Optionen
| Variable | Standardwert | Beschreibung |
| Variable | Standartwert | Beschreibung |
| ---------- | -------------- | ------------------------------------------------------------ |
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
| `style` | `"bold white"` | Stil für dieses Modul. |

View File

@ -51,3 +51,22 @@ If you get an error like "*version 'GLIBC_2.18' not found (required by starship)
```sh
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
```
## Why don't I see a glyph symbol in my prompt?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
- You are using a [powerline-patched font](https://github.com/powerline/fonts).
To test your system, run the following commands in a terminal:
```
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).
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)

View File

@ -9,7 +9,7 @@
Para iniciar la configuración de starship, crea el siguiente fichero: `~/.config.toml`.
```sh
$ mkdir -p ~/.config && touch ~/.config/starship.toml
mkdir -p ~/.config && touch ~/.config/starship.toml
```
Toda la configuración de starship se incluye en este fichero [TOML](https://github.com/toml-lang/toml):
@ -404,7 +404,7 @@ truncation_length = 8
## Docker context
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`.
El módulo `docker_context` muestra el [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) activo si no está a `default`.
### Opciones
@ -426,7 +426,7 @@ symbol = "🐋 "
## Dotnet
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.
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.
This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly.
@ -1040,7 +1040,7 @@ The `nodejs` module shows the currently installed version of NodeJS. El módulo
symbol = "🤖 "
```
## Package Version
## Versión del paquete
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` packages.
@ -1134,12 +1134,12 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
El módulo se muestra si algunas de las siguientes condiciones se cumplen:
- The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- El directorio actual contiene un fichero `requirements.txt`
- El directorio actual contiene un fichero `pyproject.toml`
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- El directorio actual contiene un fichero `tox.ini`
- El directorio actual contiene un fichero `setup.py`
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
@ -1154,6 +1154,24 @@ El módulo se muestra si algunas de las siguientes condiciones se cumplen:
| `style` | `"bold yellow"` | El estilo del módulo. |
| `disabled` | `false` | Disables the `python` module. |
<details>
<summary>This module has some advanced configuration options.</summary>
| Variable | Por defecto | Descripción |
| --------------- | ----------- | ----------------------------------------------------------------------------- |
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used.
```toml
# ~/.config/starship.toml
[python]
python_binary = "python3"
```
</details>
### Ejemplo
```toml
@ -1263,7 +1281,7 @@ The `terraform` module shows the currently selected terraform workspace and vers
symbol = "🏎💨 "
```
## Time
## Hora
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
@ -1275,14 +1293,14 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Opciones
| Variable | Por defecto | Descripción |
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Enables 12 hour formatting. |
| `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 |
| Variable | Por defecto | Descripción |
| ----------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Activa el formato de 12 horas. |
| `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. |
| `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 |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.
@ -1298,7 +1316,7 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Username
## Nombre de usuario
The `username` module shows active user's username. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
@ -1349,7 +1367,7 @@ The `zig` module shows the currently installed version of Zig. El módulo se mue
symbol = "⚡️ "
```
## Custom commands
## Comandos personalizados
The `custom` modules show the output of some arbitrary commands.
@ -1378,7 +1396,7 @@ The order in which custom modules are shown can be individually set by setting `
| `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) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `descripción` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
@ -1436,7 +1454,7 @@ shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
The `purescript` module shows the currently installed version of PureScript version. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
- The current directory contains a `spago.dhall` file
- El directorio actual contiene un fichero `spago.dhall`
- The current directory contains a \*.purs files
### Opciones

View File

@ -51,3 +51,22 @@ Si obtienes un error como "*version 'GLIBC_2.18' not found (required by starship
```sh
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
```
## Why don't I see a glyph symbol in my prompt?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
- You are using a [powerline-patched font](https://github.com/powerline/fonts).
To test your system, run the following commands in a terminal:
```
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).
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)

View File

@ -9,7 +9,7 @@
Pour commencer à configurer starship, créez le fichier suivant : `~/.config/starship.toml`.
```sh
$ mkdir -p ~/.config && touch ~/.config/starship.toml
mkdir -p ~/.config && touch ~/.config/starship.toml
```
Toute la configuration de starship est effectuée dans ce fichier [TOML](https://github.com/toml-lang/toml) :
@ -32,7 +32,7 @@ Vous pouvez changer l'emplacement du fichier de configuration `starship.toml` gr
export STARSHIP_CONFIG=~/.starship
```
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
De manière équivalente, pour Powershell (Windows), ajoutez la ligne suivante à votre `$PROFILE`:
```ps1
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
```
@ -141,9 +141,9 @@ prompt_order = [
## AWS
The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file.
Le module `aws` affiche la région et le profil AWS courant. Ces informations sont basées sur les variables d'environnement `AWS_REGION`, `AWS_DEFAULT_REGION`, et `AWS_PROFILE` ainsi que le fichier `~/.aws/config`.
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
Quand [aws-vault](https://github.com/99designs/aws-vault) est utilisé, la valeur du profil est lu dans la variable d'environnement: `AWS_VAULT`.
### Options
@ -152,8 +152,8 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
| `displayed_items` | `all` | Choose which item to display. Possible values: [`all`, `profile`, `region`] |
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `AWS` module. |
| `style` | `"bold yellow"` | Le style du module. |
| `disabled` | `false` | Désactive le module `AWS`. |
### Exemple
@ -175,13 +175,13 @@ The `battery` module shows how charged the device's battery is and its current c
### Options
| Variable | Default | Description |
| -------------------- | ------------------------ | ------------------------------------------------- |
| `full_symbol` | `"•"` | The symbol shown when the battery is full. |
| `charging_symbol` | `"⇡"` | The symbol shown when the battery is charging. |
| `discharging_symbol` | `"⇣"` | The symbol shown when the battery is discharging. |
| `display` | [lien](#battery-display) | Display threshold and style for the module. |
| `disabled` | `false` | Disables the `battery` module. |
| Variable | Default | Description |
| -------------------- | ------------------------ | --------------------------------------------------- |
| `full_symbol` | `"•"` | Le symbole affiché lorsque la batterie est pleine. |
| `charging_symbol` | `"⇡"` | Le symbole affiché lorsque la batterie se charge. |
| `discharging_symbol` | `"⇣"` | Le symbole affiché lorsque la batterie se décharge. |
| `display` | [lien](#battery-display) | Affiche le seuil et le style du module. |
| `disabled` | `false` | Désactive le module `battery`. |
<details>
<summary>There are also options for some uncommon battery states.</summary>
@ -288,7 +288,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `prefix` | `took` | Prefix to display immediately before the command duration. |
| `style` | `"bold yellow"` | The style for the module. |
| `style` | `"bold yellow"` | Le style du module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
### Exemple
@ -317,7 +317,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| ------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. |
| `symbol` | `"C "` | The symbol used before the environment name. |
| `style` | `"bold green"` | The style for the module. |
| `style` | `"bold green"` | Le style du module. |
| `disabled` | `false` | Disables the `conda` module. |
### Exemple
@ -341,7 +341,7 @@ The `crystal` module shows the currently installed version of Crystal. Le module
| Variable | Default | Description |
| ---------- | -------------- | --------------------------------------------------------- |
| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. |
| `style` | `"bold green"` | The style for the module. |
| `style` | `"bold green"` | Le style du module. |
| `disabled` | `false` | Disables the `crystal` module. |
### Exemple
@ -369,7 +369,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `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. |
| `prefix` | `"in "` | Prefix to display immediately before the directory. |
| `style` | `"bold cyan"` | The style for the module. |
| `style` | `"bold cyan"` | Le style du module. |
| `disabled` | `false` | Disables the `directory` module. |
<details>
@ -412,7 +412,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| ----------------- | ------------- | --------------------------------------------------------------------------------------- |
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context . |
| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
| `style` | `"bold blue"` | The style for the module. |
| `style` | `"bold blue"` | Le style du module. |
| `disabled` | `true` | Disables the `docker_context` module. |
### Exemple
@ -438,7 +438,7 @@ Internally, this module uses its own mechanism for version detection. Typically
| ----------- | ------------- | -------------------------------------------------------- |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
| `style` | `"bold blue"` | The style for the module. |
| `style` | `"bold blue"` | Le style du module. |
| `disabled` | `false` | Disables the `dotnet` module. |
### Exemple
@ -463,7 +463,7 @@ The `elixir` module shows the currently installed version of Elixir and Erlang/O
| Variable | Default | Description |
| ---------- | --------------- | --------------------------------------------------------------- |
| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. |
| `style` | `"bold purple"` | The style for the module. |
| `style` | `"bold purple"` | Le style du module. |
| `disabled` | `false` | Disables the `elixir` module. |
### Exemple
@ -490,7 +490,7 @@ The `elm` module shows the currently installed version of Elm. Le module est aff
| Variable | Default | Description |
| ---------- | ------------- | ----------------------------------------------------- |
| `symbol` | `"🌳 "` | The symbol used before displaying the version of Elm. |
| `style` | `"bold cyan"` | The style for the module. |
| `style` | `"bold cyan"` | Le style du module. |
| `disabled` | `false` | Disables the `elm` module. |
@ -519,7 +519,7 @@ The `env_var` module displays the current value of a selected environment variab
| `default` | | The default value to be displayed when the selected variable is not defined. |
| `prefix` | `""` | Prefix to display immediately before the variable value. |
| `suffix` | `""` | Suffix to display immediately after the variable value. |
| `style` | `"dimmed bold black"` | The style for the module. |
| `style` | `"dimmed bold black"` | Le style du module. |
| `disabled` | `false` | Disables the `env_var` module. |
### Exemple
@ -567,7 +567,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
| `symbol` | `" "` | The symbol used before the branch name of the repo in your current directory. |
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use "" for no symbol |
| `style` | `"bold purple"` | The style for the module. |
| `style` | `"bold purple"` | Le style du module. |
| `disabled` | `false` | Disables the `git_branch` module. |
### Exemple
@ -592,7 +592,7 @@ The `git_commit` module shows the current commit hash of the repo in your curren
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `prefix` | `"("` | Prefix to display immediately before git commit. |
| `suffix` | `")"` | Suffix to display immediately after git commit. |
| `style` | `"bold green"` | The style for the module. |
| `style` | `"bold green"` | Le style du module. |
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state |
| `disabled` | `false` | Disables the `git_commit` module. |
@ -621,7 +621,7 @@ The `git_state` module will show in directories which are part of a git reposito
| `am` | `"AM"` | The text displayed when an `apply-mailbox` (`git am`) is in progress. |
| `am_or_rebase` | `"AM/REBASE"` | The text displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
| `progress_divider` | `"/"` | The symbol or text which will separate the current and total progress amounts. (e.g., `" of "`, for `"3 of 10"`) |
| `style` | `"bold yellow"` | The style for the module. |
| `style` | `"bold yellow"` | Le style du module. |
| `disabled` | `false` | Disables the `git_state` module. |
### Exemple
@ -662,7 +662,7 @@ The `git_status` module shows symbols representing the state of the repo in your
| `show_sync_count` | `false` | Show ahead/behind count of the branch being tracked. |
| `prefix` | `[` | Prefix to display immediately before git status. |
| `suffix` | `]` | Suffix to display immediately after git status. |
| `style` | `"bold green"` | The style for the module. |
| `style` | `"bold green"` | Le style du module. |
| `disabled` | `false` | Disables the `git_status` module. |
#### Git Status Counts
@ -711,7 +711,7 @@ The `golang` module shows the currently installed version of Golang. Le module e
| Variable | Default | Description |
| ---------- | ------------- | -------------------------------------------------------- |
| `symbol` | `"🐹 "` | The symbol used before displaying the version of Golang. |
| `style` | `"bold cyan"` | The style for the module. |
| `style` | `"bold cyan"` | Le style du module. |
| `disabled` | `false` | Disables the `golang` module. |
### Exemple
@ -733,7 +733,7 @@ The `haskell` module shows the currently installed version of Haskell Stack vers
| Variable | Default | Description |
| ---------- | -------------- | --------------------------------------------------------- |
| `symbol` | `"λ "` | The symbol used before displaying the version of Haskell. |
| `style` | `"bold green"` | The style for the module. |
| `style` | `"bold green"` | Le style du module. |
| `disabled` | `false` | Disables the `haskell` module. |
@ -758,7 +758,7 @@ The `hostname` module shows the system hostname.
| `prefix` | `""` | Prefix to display immediately before the hostname. |
| `suffix` | `""` | Suffix to display immediately after the hostname. |
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
| `style` | `"bold dimmed green"` | The style for the module. |
| `style` | `"bold dimmed green"` | Le style du module. |
| `disabled` | `false` | Disables the `hostname` module. |
### Exemple
@ -786,7 +786,7 @@ The `java` module shows the currently installed version of Java. Le module est a
| Variable | Default | Description |
| ---------- | -------------- | ------------------------------------------------------ |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. |
| `style` | `"dimmed red"` | The style for the module. |
| `style` | `"dimmed red"` | Le style du module. |
| `disabled` | `false` | Disables the `java` module. |
### Exemple
@ -808,7 +808,7 @@ The `jobs` module shows the current number of jobs running. The module will be s
| ----------- | ------------- | ----------------------------------------------------- |
| `symbol` | `"✦"` | The symbol used before displaying the number of jobs. |
| `threshold` | `1` | Show number of jobs if exceeded. |
| `style` | `"bold blue"` | The style for the module. |
| `style` | `"bold blue"` | Le style du module. |
| `disabled` | `false` | Disables the `jobs` module. |
### Exemple
@ -834,7 +834,7 @@ The `julia` module shows the currently installed version of Julia. Le module est
| Variable | Default | Description |
| ---------- | --------------- | ------------------------------------------------------- |
| `symbol` | `"ஃ "` | The symbol used before displaying the version of Julia. |
| `style` | `"bold purple"` | The style for the module. |
| `style` | `"bold purple"` | Le style du module. |
| `disabled` | `false` | Disables the `julia` module. |
### Exemple
@ -851,7 +851,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
:::
@ -861,7 +861,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| ----------------- | ------------- | --------------------------------------------------- |
| `symbol` | `"☸ "` | The symbol used before displaying the Cluster info. |
| `context_aliases` | | Table of context aliases to display |
| `style` | `"bold blue"` | The style for the module. |
| `style` | `"bold blue"` | Le style du module. |
| `disabled` | `true` | Disables the `kubernetes` module |
### Exemple
@ -904,7 +904,7 @@ By default the swap usage is displayed if the total system swap is non-zero.
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
:::
@ -917,7 +917,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
| `symbol` | `"🐏 "` | The symbol used before displaying the memory usage. |
| `separator` | `" | "` | The symbol or text that will seperate the ram and swap usage. |
| `style` | `"bold dimmed white"` | The style for the module. |
| `style` | `"bold dimmed white"` | Le style du module. |
| `disabled` | `true` | Disables the `memory_usage` module. |
### Exemple
@ -946,7 +946,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
| `style` | `"bold purple"` | The style for the module. |
| `style` | `"bold purple"` | Le style du module. |
| `disabled` | `true` | Disables the `hg_branch` module. |
### Exemple
@ -973,7 +973,7 @@ The `nim` module shows the currently installed version of Nim. Le module est aff
| Variable | Default | Description |
| ---------- | --------------- | ----------------------------------------------------- |
| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. |
| `style` | `"bold yellow"` | The style for the module. |
| `style` | `"bold yellow"` | Le style du module. |
| `disabled` | `false` | Disables the `nim` module. |
### Exemple
@ -998,7 +998,7 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
| `impure_msg` | `"impure"` | Customize the "impure" msg. |
| `pure_msg` | `"pure"` | Customize the "pure" msg. |
| `symbol` | `"❄️ "` | The symbol used before displaying the shell name. |
| `style` | `"bold blue"` | The style for the module. |
| `style` | `"bold blue"` | Le style du module. |
| `disabled` | `false` | Disables the `nix_shell` module. |
### Exemple
@ -1028,7 +1028,7 @@ The `nodejs` module shows the currently installed version of NodeJS. Le module e
| Variable | Default | Description |
| ---------- | -------------- | -------------------------------------------------------- |
| `symbol` | `"⬢ "` | The symbol used before displaying the version of NodeJS. |
| `style` | `"bold green"` | The style for the module. |
| `style` | `"bold green"` | Le style du module. |
| `disabled` | `false` | Disables the `nodejs` module. |
### Exemple
@ -1059,7 +1059,7 @@ The `package` module is shown when the current directory is the repository for a
| Variable | Default | Description |
| ----------------- | ------------ | ---------------------------------------------------------- |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| `style` | `"bold 208"` | The style for the module. |
| `style` | `"bold 208"` | Le style du module. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | Disables the `package` module. |
@ -1088,7 +1088,7 @@ The `ocaml` module shows the currently installed version of OCaml. Le module est
| Variable | Default | Description |
| ---------- | --------------- | ------------------------------------------------------- |
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
| `style` | `"bold yellow"` | The style for the module. |
| `style` | `"bold yellow"` | Le style du module. |
| `disabled` | `false` | Disables the `ocaml` module. |
### Exemple
@ -1113,7 +1113,7 @@ The `php` module shows the currently installed version of PHP. Le module est aff
| Variable | Default | Description |
| ---------- | ------------ | ----------------------------------------------------- |
| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
| `style` | `"bold 147"` | The style for the module. |
| `style` | `"bold 147"` | Le style du module. |
| `disabled` | `false` | Disables the `php` module. |
### Exemple
@ -1151,9 +1151,27 @@ Le module est affiché si l'une des ces conditions est remplie :
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_prefix` | `"pyenv "` | Prefix before pyenv version display (default display is `pyenv MY_VERSION`) |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | The style for the module. |
| `style` | `"bold yellow"` | Le style du module. |
| `disabled` | `false` | Disables the `python` module. |
<details>
<summary>This module has some advanced configuration options.</summary>
| Variable | Défaut | Description |
| --------------- | -------- | ----------------------------------------------------------------------------- |
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used.
```toml
# ~/.config/starship.toml
[python]
python_binary = "python3"
```
</details>
### Exemple
```toml
@ -1175,10 +1193,10 @@ The `ruby` module shows the currently installed version of Ruby. Le module est a
### Options
| Variable | Défaut | Description |
| Variable | Default | Description |
| ---------- | -------------- | ------------------------------------------------------ |
| `symbol` | `"💎 "` | The symbol used before displaying the version of Ruby. |
| `style` | `"bold green"` | The style for the module. |
| `style` | `"bold green"` | Le style du module. |
| `disabled` | `false` | Disables the `ruby` module. |
### Exemple
@ -1202,7 +1220,7 @@ The `rust` module shows the currently installed version of Rust. Le module est a
| Variable | Default | Description |
| ---------- | -------------- | ------------------------------------------------------ |
| `symbol` | `"🦀 "` | The symbol used before displaying the version of Rust. |
| `style` | `"bold green"` | The style for the module. |
| `style` | `"bold green"` | Le style du module. |
| `disabled` | `false` | Disables the `rust` module. |
### Exemple
@ -1226,7 +1244,7 @@ The `singularity` module shows the current singularity image, if inside a contai
| `prefix` | `"["` | Prefix to display immediately before image name. |
| `suffix` | `"]"` | Suffix to display immediately after image name. |
| `symbol` | `""` | The symbol used before the image name. |
| `style` | `"bold dimmed blue"` | The style for the module. |
| `style` | `"bold dimmed blue"` | Le style du module. |
| `disabled` | `false` | Disables the `singularity` module. |
### Exemple
@ -1251,7 +1269,7 @@ The `terraform` module shows the currently selected terraform workspace and vers
| -------------- | ------------ | ----------------------------------------------------------- |
| `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. |
| `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. |
| `style` | `"bold 105"` | The style for the module. |
| `style` | `"bold 105"` | Le style du module. |
| `disabled` | `false` | Disables the `terraform` module. |
### Exemple
@ -1263,28 +1281,28 @@ The `terraform` module shows the currently selected terraform workspace and vers
symbol = "🏎💨 "
```
## Time
## Temps
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
Le module `time` affiche l'heure actuelle **localement**. La valeur de `format` est utilisée par le package [`chrono`](https://crates.io/crates/chrono) pour contrôler la façon dont l'heure est affichée. Consultez la [doc de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) pour découvrir les options disponibles.
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
:::
### Options
| Variable | Default | Description |
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Enables 12 hour formatting. |
| `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 |
| Variable | Default | Description |
| ----------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Activer le format 12h. |
| `format` | voir plus bas | Le [format chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilisé pour formater l'heure. |
| `style` | `"bold yellow"` | Le style utilisé par le module. |
| `utc_time_offset` | `"local"` | Définir le décalage horaire UTC à utiliser. Intervalle de -24 < x < 24. Accepte des nombres décimaux pour s'adapter aux décalages de 30/45 minutes. |
| `disabled` | `true` | Désactiver le module `time`. |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.
Si `use_12hr` a pour valeur `true`, le `format` par défaut est `"%r"`. Sinon, il est défini comme `"%T"`. Définir manuellement le `format` passera outre la valeur de `user_12hr`.
### Exemple
@ -1298,23 +1316,23 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Username
## Nom d'utilisateur
The `username` module shows active user's username. Le module est affiché si l'une des ces conditions est remplie :
Le module `username` affiche le nom d'utilisateur de l'utilisateur actif. Le module est affiché si l'une des ces conditions est remplie :
- 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
- L'utilisateur courant est root
- L'utilisateur courant est différent de celui connecté
- L'utilisateur est actuellement connecté à une session SSH
- La variable `show_always` a comme valeur true
### Options
| Variable | Default | Description |
| ------------- | --------------- | ------------------------------------- |
| `style_root` | `"bold green"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| Variable | Default | Description |
| ------------- | --------------- | ------------------------------------------------ |
| `style_root` | `"bold green"` | Le style utilisé quand l'utilisateur est root. |
| `style_user` | `"bold yellow"` | Le style utilisé pour les utilisateurs non-root. |
| `show_always` | `false` | Toujours afficher le module `username`. |
| `disabled` | `false` | Désactiver le module `username`. |
### Exemple
@ -1337,7 +1355,7 @@ The `zig` module shows the currently installed version of Zig. Le module est aff
| Variable | Default | Description |
| ---------- | --------------- | ----------------------------------------------------- |
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
| `style` | `"bold yellow"` | The style for the module. |
| `style` | `"bold yellow"` | Le style du module. |
| `disabled` | `false` | Disables the `zig` module. |
### Exemple
@ -1383,7 +1401,7 @@ The order in which custom modules are shown can be individually set by setting `
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
| `symbol` | `""` | The symbol used before displaying the command output. |
| `style` | `"bold green"` | The style for the module. |
| `style` | `"bold green"` | Le style du module. |
| `prefix` | `""` | Prefix to display immediately before the command output. |
| `suffix` | `""` | Suffix to display immediately after the command output. |
| `disabled` | `false` | Disables this `custom` module. |
@ -1434,18 +1452,18 @@ shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
## PureScript
The `purescript` module shows the currently installed version of PureScript version. Le module est affiché si l'une des ces conditions est remplie :
Le module `purescript` affiche la version courante de Purescript installée. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `spago.dhall` file
- The current directory contains a \*.purs files
### Options
| Variable | Default | Description |
| ---------- | -------------- | ------------------------------------------------------------ |
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
| `style` | `"bold white"` | The style for the module. |
| `disabled` | `false` | Disables the `purescript` module. |
| Variable | Default | Description |
| ---------- | -------------- | ------------------------------------------------------------- |
| `symbol` | `"<=> "` | Le symbole utilisé avant d'afficher la version de PureScript. |
| `style` | `"bold white"` | Le style du module. |
| `disabled` | `false` | Désactive le module `purescript`. |
### Exemple

View File

@ -51,3 +51,22 @@ If you get an error like "*version 'GLIBC_2.18' not found (required by starship)
```sh
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
```
## Why don't I see a glyph symbol in my prompt?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
- You are using a [powerline-patched font](https://github.com/powerline/fonts).
To test your system, run the following commands in a terminal:
```
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).
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)

View File

@ -9,7 +9,7 @@
Starshipの設定を開始するには、`~/.config/starship.toml` ファイルを作成します。
```sh
$ mkdir -p ~/.config && touch ~/.config/starship.toml
mkdir -p ~/.config && touch ~/.config/starship.toml
```
Starshipのすべての設定は、この[TOML](https://github.com/toml-lang/toml)ファイルで行われます。
@ -375,11 +375,11 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた
<details>
<summary>このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。</summary>
| 変数 | デフォルト | 説明 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| `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` | | A table of substitutions to be made to the path. |
| `fish_style_pwd_dir_length` | `0` | fish shellのpwdパスロジックを適用するときに使用する文字数です。 |
| `use_logical_path` | `true` | OSからのパスの代わりに、シェル(`PWD`) によって提供される論理パスを表示します。 |
`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.
@ -879,7 +879,7 @@ disabled = false
## 改行
The `line_break` module separates the prompt into two lines.
`line_break`モジュールは、プロンプトを2行に分割します。
### オプション
@ -898,13 +898,14 @@ disabled = true
## メモリ使用量
The `memory_usage` module shows current system memory and swap usage.
`memory_usage</ 0>モジュールは、現在のシステムメモリとスワップ使用量を示します。</p>
By default the swap usage is displayed if the total system swap is non-zero.
<p spaces-before="0">デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。</p>
::: tip
<p spaces-before="0">::: tip</p>
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
<p spaces-before="0">このモジュールはデフォルトで無効になっています。
有効にするには、設定ファイルで<code>disabled`を`false`に設定します。
:::
@ -937,7 +938,7 @@ style = "bold dimmed green"
## Mercurial ブランチ
The `hg_branch` module shows the active branch of the repo in your current directory.
` hg_branch `モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを示します。
### オプション
@ -988,18 +989,18 @@ symbol = "🎣 "
## Nix-shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
`nix_shell`モジュールは、nix-shell環境を示しています。 このモジュールは、nixシェル環境内にあるときに表示されます。
### オプション
| 変数 | デフォルト | 説明 |
| ------------ | ------------- | ------------------------------------------------- |
| `use_name` | `false` | Display the name of the nix-shell. |
| `impure_msg` | `"impure"` | Customize the "impure" msg. |
| `pure_msg` | `"pure"` | Customize the "pure" msg. |
| `use_name` | `false` | nix-shellの名前を表示します。 |
| `impure_msg` | `"impure"` | impureメッセージをカスタマイズします。 |
| `pure_msg` | `"pure"` | pureメッセージをカスタマイズします。 |
| `symbol` | `"❄️ "` | The symbol used before displaying the shell name. |
| `style` | `"bold blue"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `nix_shell` module. |
| `disabled` | `false` | `nix_shell`モジュールを無効にします。 |
### 設定例
@ -1016,20 +1017,20 @@ symbol = "☃️ "
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. 次の条件のいずれかが満たされると、モジュールが表示されます。
`nodejs`モジュールは、現在インストールされているNodeJSのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `package.json` file
- カレントディレクトリに`package.json`ファイルが含まれている
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory
- The current directory contains a file with the `.js` extension
- カレントディレクトリに`node_modules`ディレクトリが含まれている
- カレントディレクトリに`.js`の拡張子のファイルが含まれている
### オプション
| 変数 | デフォルト | 説明 |
| ---------- | -------------- | -------------------------------------------------------- |
| `symbol` | `"⬢ "` | The symbol used before displaying the version of NodeJS. |
| `style` | `"bold green"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `nodejs` module. |
| 変数 | デフォルト | 説明 |
| ---------- | -------------- | ----------------------------- |
| `symbol` | `"⬢ "` | NodeJSのバージョンを表示する前に使用される記号です。 |
| `style` | `"bold green"` | モジュールのスタイルです。 |
| `disabled` | `false` | `nodejs`モジュールを無効にします。 |
### 設定例
@ -1040,14 +1041,14 @@ The `nodejs` module shows the currently installed version of NodeJS. 次の条
symbol = "🤖 "
```
## 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.
`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` 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
- **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
- **npm** `npm`パッケージバージョンは、現在のディレクトリにある`package.json`から抽出されます
- **cargo** `cargo`パッケージバージョンは、現在のディレクトリにある`Cargo.toml`から抽出されます。
- **poetry** `poetry`パッケージバージョンは、現在のディレクトリにある`pyproject.toml`から抽出されます
- **composer** `composer`パッケージバージョンは、現在のディレクトリにある`composer.json`から抽出されます
- **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
@ -1056,12 +1057,12 @@ The `package` module is shown when the current directory is the repository for a
### オプション
| 変数 | デフォルト | 説明 |
| ----------------- | ------------ | ---------------------------------------------------------- |
| `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. |
| 変数 | デフォルト | 説明 |
| ----------------- | ------------ | --------------------------------------------------------- |
| `symbol` | `"📦 "` | パッケージのバージョンを表示する前に使用される記号です。 |
| `style` | `"bold 208"` | モジュールのスタイルです。 |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | `package`モジュールを無効にします。 |
### 設定例
@ -1102,19 +1103,19 @@ symbol = "🐪 "
## PHP
The `php` module shows the currently installed version of PHP. 次の条件のいずれかが満たされると、モジュールが表示されます。
`php`モジュールは、現在インストールされているPHPのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `composer.json` file
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file
- カレントディレクトリに`.php`の拡張子のファイルが含まれている
### オプション
| 変数 | デフォルト | 説明 |
| ---------- | ------------ | ----------------------------------------------------- |
| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
| `style` | `"bold 147"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `php` module. |
| 変数 | デフォルト | 説明 |
| ---------- | ------------ | -------------------------- |
| `symbol` | `"🐘 "` | PHPのバージョンを表示する前に使用される記号です。 |
| `style` | `"bold 147"` | モジュールのスタイルです。 |
| `disabled` | `false` | `php`モジュールを無効にします。 |
### 設定例
@ -1133,26 +1134,44 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- カレントディレクトリに`.python-version`ファイルが含まれている
- カレントディレクトリに`requirements.txt`ファイルが含まれている
- カレントディレクトリに`pyproject.toml`ファイルが含まれている
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- カレントディレクトリに`Pipfile`ファイルが含まれている
- カレントディレクトリに`tox.ini`ファイルが含まれている
- カレントディレクトリに`setup.py`ファイルが含まれている
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
- 仮想環境がアクティブである
### オプション
| 変数 | デフォルト | 説明 |
| -------------------- | --------------- | --------------------------------------------------------------------------- |
| `symbol` | `"🐍 "` | The symbol used before displaying the version of Python. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_prefix` | `"pyenv "` | Prefix before pyenv version display (default display is `pyenv MY_VERSION`) |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `python` module. |
| 変数 | デフォルト | 説明 |
| -------------------- | --------------- | -------------------------------------------------------------------------- |
| `symbol` | `"🐍 "` | Pythonのバージョンを表示する前に使用される記号です。 |
| `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します |
| `pyenv_prefix` | `"pyenv "` | pyenvバージョン表示の前のprefix (デフォルトの表示は`pyenv MY_VERSION`) です |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | `python`モジュールを無効にします。 |
<details>
<summary>This module has some advanced configuration options.</summary>
| 変数 | デフォルト | 説明 |
| --------------- | -------- | ----------------------------------------------------------------------------- |
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used.
```toml
# ~/.config/starship.toml
[python]
python_binary = "python3"
```
</details>
### 設定例
@ -1167,19 +1186,19 @@ pyenv_prefix = "foo "
## Ruby
The `ruby` module shows the currently installed version of Ruby. 次の条件のいずれかが満たされると、モジュールが表示されます。
`ruby`モジュールは、現在インストールされているRubyのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `Gemfile` file
- カレントディレクトリに`Gemfile`ファイルが含まれている
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file
- カレントディレクトリに`.rb`の拡張子のファイルが含まれている
### オプション
| 変数 | デフォルト | 説明 |
| ---------- | ------------ | ------------------------------------------------------ |
| `symbol` | `"💎 "` | The symbol used before displaying the version of Ruby. |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `ruby` module. |
| 変数 | デフォルト | 説明 |
| ---------- | ------------ | --------------------------- |
| `symbol` | `"💎 "` | Rubyのバージョンを表示する前に使用される記号です。 |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | `ruby`モジュールを無効にします。 |
### 設定例
@ -1192,18 +1211,18 @@ symbol = "🔺 "
## Rust
The `rust` module shows the currently installed version of Rust. 次の条件のいずれかが満たされると、モジュールが表示されます。
`rust`モジュールには、現在インストールされているRustのバージョンが表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `Cargo.toml` file
- The current directory contains a file with the `.rs` extension
- カレントディレクトリに`Cargo.toml`ファイルが含まれている
- カレントディレクトリに`.rs`の拡張子のファイルが含まれている
### オプション
| 変数 | デフォルト | 説明 |
| ---------- | ------------ | ------------------------------------------------------ |
| `symbol` | `"🦀 "` | The symbol used before displaying the version of Rust. |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `rust` module. |
| 変数 | デフォルト | 説明 |
| ---------- | ------------ | --------------------------- |
| `symbol` | `"🦀 "` | Rustのバージョンを表示する前に使用される記号です。 |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | `rust`モジュールを無効にします。 |
### 設定例
@ -1240,19 +1259,19 @@ symbol = "📦 "
## 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. 次の条件のいずれかが満たされると、モジュールが表示されます。
`terraform`モジュールには、現在選択されているterraformワークスペースとバージョンが表示されます。 デフォルトでは、Terraformのバージョンは表示されません。これは、多くのプラグインが使用されている場合、Terraformの現在のバージョンでは遅いためです。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `.terraform` folder
- Current directory contains a file with the `.tf` extension
- カレントディレクトリに`.terraform`フォルダが含まれている
- カレントディレクトリに`.tf`の拡張子のファイルが含まれている
### オプション
| 変数 | デフォルト | 説明 |
| -------------- | ------------ | ----------------------------------------------------------- |
| `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. |
| `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. |
| `style` | `"bold 105"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `terraform` module. |
| 変数 | デフォルト | 説明 |
| -------------- | ------------ | --------------------------------------------- |
| `symbol` | `"💠 "` | Terraform ワークスペースを表示する前に使用される記号です。 |
| `show_version` | `false` | Terraformのバージョンを表示します。 大きなワークスペースでは非常に遅くなります。 |
| `style` | `"bold 105"` | モジュールのスタイルです。 |
| `disabled` | `false` | `terraform`モジュールを無効にします。 |
### 設定例
@ -1263,9 +1282,9 @@ The `terraform` module shows the currently selected terraform workspace and vers
symbol = "🏎💨 "
```
## Time
## 時刻
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
`time`モジュールは、現在の**現地**時間を示します。 `format`設定は、時間の表示方法を制御するために[`chrono`](https://crates.io/crates/chrono)クレートによって使用されます。 使用可能なオプションを確認するには、[chrono strftimeのドキュメント](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)をご覧ください。
::: tip
@ -1275,16 +1294,16 @@ The `time` module shows the current **local** time. The `format` configuration v
### オプション
| 変数 | デフォルト | 説明 |
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Enables 12 hour formatting. |
| `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 |
| 変数 | デフォルト | 説明 |
| ----------------- | --------------- | ----------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Enables 12 hour formatting. |
| `format` | この表の下を参照してください | 時刻のフォーマットに使用される[クロノフォーマット文字列](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) です。 |
| `style` | `"bold yellow"` | The style for the module time. |
| `utc_time_offset` | `"local"` | 使用するUTCオフセットを設定します。 -24から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 |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.
`use_12hr``true` の場合、`format` のデフォルトは `"%r"` です。 それ以外の場合、デフォルトは`"%T"`です。 `format`を手動で設定すると、`use_12hr`の設定が上書きされます。
### 設定例
@ -1298,23 +1317,23 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Username
## ユーザー名
The `username` module shows active user's username. 次の条件のいずれかが満たされると、モジュールが表示されます。
`username`モジュールには、アクティブなユーザーのユーザー名が表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます。
- 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
- カレントユーザーがroot
- カレントユーザーが、ログインしているユーザーとは異なる
- ユーザーがSSHセッションとして接続されている
- `show_always`変数がtrueに設定されている
### オプション
| 変数 | デフォルト | 説明 |
| ------------- | --------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| 変数 | デフォルト | 説明 |
| ------------- | --------------- | ------------------------- |
| `style_root` | `"bold red"` | ユーザーがrootのときに使用されるスタイルです。 |
| `style_user` | `"bold yellow"` | 非rootユーザーに使用されるスタイルです。 |
| `show_always` | `false` | `username` モジュールを常に表示します。 |
| `disabled` | `false` | `username` モジュールを無効にします。 |
### 設定例
@ -1377,8 +1396,8 @@ The order in which custom modules are shown can be individually set by setting `
| ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `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) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `shell` | | [この表の下を参照してください](#custom-command-shell) |
| `説明` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
@ -1436,7 +1455,7 @@ shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
The `purescript` module shows the currently installed version of PureScript version. 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `spago.dhall` file
- カレントディレクトリに`spago.dhall`ファイルが含まれている
- The current directory contains a \*.purs files
### オプション

View File

@ -51,3 +51,22 @@ starship prompt --help
```sh
curl -fsSL https://starship.rs/install.sh | bash -s --- -platform unknown-linux-musl
```
## Why don't I see a glyph symbol in my prompt?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
- You are using a [powerline-patched font](https://github.com/powerline/fonts).
To test your system, run the following commands in a terminal:
```
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).
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)

View File

@ -9,7 +9,7 @@ As configurações estão sendo trabalhadas. Muitas novas opções de configura
Para começar a configurar a starship, crie o seguinte arquivo: `~/.config/starship.toml`.
```sh
$ mkdir -p ~/.config && touch ~/.config/starship.toml
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):
@ -1154,6 +1154,24 @@ The module will be shown if any of the following conditions are met:
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `python` module. |
<details>
<summary>This module has some advanced configuration options.</summary>
| Variable | Default | Description |
| --------------- | -------- | ----------------------------------------------------------------------------- |
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used.
```toml
# ~/.config/starship.toml
[python]
python_binary = "python3"
```
</details>
### Example
```toml

View File

@ -51,3 +51,22 @@ If you get an error like "*version 'GLIBC_2.18' not found (required by starship)
```sh
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
```
## Why don't I see a glyph symbol in my prompt?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
- You are using a [powerline-patched font](https://github.com/powerline/fonts).
To test your system, run the following commands in a terminal:
```
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).
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)

View File

@ -9,7 +9,7 @@
To get started configuring starship, create the following file: `~/.config/starship.toml`.
```sh
$ mkdir -p ~/.config && touch ~/.config/starship.toml
mkdir -p ~/.config && touch ~/.config/starship.toml
```
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
@ -1154,6 +1154,24 @@ The module will be shown if any of the following conditions are met:
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `python` module. |
<details>
<summary>This module has some advanced configuration options.</summary>
| Variable | Default | Description |
| --------------- | -------- | ----------------------------------------------------------------------------- |
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used.
```toml
# ~/.config/starship.toml
[python]
python_binary = "python3"
```
</details>
### Example
```toml

View File

@ -51,3 +51,22 @@ If you get an error like "*version 'GLIBC_2.18' not found (required by starship)
```sh
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
```
## Why don't I see a glyph symbol in my prompt?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
- You are using a [powerline-patched font](https://github.com/powerline/fonts).
To test your system, run the following commands in a terminal:
```
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).
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)

View File

@ -9,7 +9,7 @@
Чтобы начать конфигурацию Starship, создайте следующий файл: `~/.config/starship.toml`.
```sh
$ mkdir -p ~/.config && touch ~/.config/starship.toml
mkdir -p ~/.config && touch ~/.config/starship.toml
```
Вся конфигурация Starship выполняется в этом файле [TOML](https://github.com/toml-lang/toml):
@ -375,11 +375,11 @@ style = "bold blue"
<details>
<summary>Этот модуль имеет несколько расширенных опций конфигурации, которые контролируют отображение каталога.</summary>
| Переменная | По умолчанию | Описание |
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
| `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` | | A table of substitutions to be made to the path. |
| `fish_style_pwd_dir_length` | `0` | Количество символов, используемых при использовании логики создания пути из fish. |
| `use_logical_path` | `true` | Отображает логический путь от оболочки (`PWD`) вместо пути от ОС. |
`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.
@ -389,7 +389,7 @@ style = "bold blue"
"src/com/long/java/path" = "mypath"
```
`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
`fish_style_pwd_dir_length` взаимодействует со стандартными параметрами усечения, которые могут сначала показаться странными: если он не равен нулю, элементы пути, который обычно усекается, вместо этого отображаются с указанным количеством символов. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
</details>
@ -404,7 +404,7 @@ truncation_length = 8
## Контекст Docker
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`.
Модуль `docker_context` показывает текущий активный [контекст Docker](https://docs.docker.com/engine/context/working-with-contexts/), если он не установлен как `default`.
### Опции
@ -426,11 +426,11 @@ symbol = "🐋 "
## Dotnet
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.
Модуль `dotnet` показывает соответствующую версию .NET Core SDK для текущего каталога. Если SDK был закреплен в текущей директории, будет показана закрепленная версия. В противном случае модуль отображает последнюю установленную версию SDK.
This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly.
Этот модуль будет показан только, когда один из следующих файлов присутствует в текущей директории: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. Также, для правильного использования, нужны инструменты командной строки .NET Core.
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
Внутренне этот модуль использует свой собственный механизм определения версий. Обычно он в два раза быстрее, чем `dotnet --version`, но он может показывать неправильную версию, если ваш .NET проект имеет необычный формат каталога. Если точность важнее, чем скорость, вы можете отключить механизм опцией `heuristic = false` в настройках модуля.
### Опции
@ -454,7 +454,7 @@ heuristic = false
## Elixir
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `elixir` показывает установленную версию Elixir и Erlang/OTP. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий каталог содержит файл `mix.exs`.
@ -477,7 +477,7 @@ symbol = "🔮 "
## Elm
The `elm` module shows the currently installed version of Elm. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `elm` показывает установленную версию Elm. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий каталог содержит файл `elm.json`
- Текущий каталог содержит файл `elm-package.json`
@ -505,7 +505,7 @@ symbol = " "
## Переменная Окружения
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met:
Модуль `env_var` отображает текущее значение выбранной переменной окружения. Модуль будет показан только в том случае, если любое из следующих условий соблюдено:
- Опция `variable` соответствует существующей переменной среды
- Опция `variable` не определена, но определена опция `default`
@ -558,7 +558,7 @@ symbol = "e "
## Ветвь Git
The `git_branch` module shows the active branch of the repo in your current directory.
Модуль `git_branch` показывает активную ветку репозитория в вашем текущей директории.
### Опции
@ -583,7 +583,7 @@ truncation_symbol = ""
## Коммит Git
The `git_commit` module shows the current commit hash of the repo in your current directory.
Модуль `git_commit` показывает хэш текущего коммита репозитория в вашем текущем каталоге.
### Опции
@ -607,7 +607,7 @@ commit_hash_length = 4
## Состояние Git
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
Модуль `git_state` будет отображаться в директориях, являющимися частью репозитория git, и там, где выполняется операция, такие как: _REBASING_, _BISECTING_, и т. д. Если есть информация о прогрессе (например, REBASING 3/10), эта информация также будет показана.
### Опции
@ -636,7 +636,7 @@ cherry_pick = "🍒 PICKING"
## Статус Git
The `git_status` module shows symbols representing the state of the repo in your current directory.
Модуль `git_status` отображает символы, представляющие состояние репозитория в вашей текущей директории.
### Опции
@ -695,7 +695,7 @@ deleted = "🗑"
## Golang
The `golang` module shows the currently installed version of Golang. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `golang` показывает установленную версию Golang. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий каталог содержит файл `go.mod`
- Текущий каталог содержит файл `go.sum`
@ -724,7 +724,7 @@ symbol = "🏎💨 "
```
## Haskell
The `haskell` module shows the currently installed version of Haskell Stack version. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `haskell` показывает установленную версию Haskell Stack. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий каталог содержит файл `stack.yaml`
@ -748,7 +748,7 @@ symbol = " "
## Имя хоста
The `hostname` module shows the system hostname.
Модуль `hostname` отображает имя системы (хоста).
### Опции
@ -776,7 +776,7 @@ disabled = false
## Java
The `java` module shows the currently installed version of Java. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `java` показывает установленную версию Java. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension
@ -800,7 +800,7 @@ symbol = "🌟 "
## Задачи
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists.
Модуль `jobs` отображает текущее количество запущенных работ. Модуль будет показан только если работы выполняются в фоне. Модуль покажет количество запущенных задач при наличии более чем 1 задачи, или больше, чем значение конфигурации `threshold`, если оно существует.
### Опции
@ -847,11 +847,11 @@ symbol = "∴ "
```
## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
Отображает текущее контекстное имя Kubernetes и, если применено, пространство имён из файла kubeconfig. Пространство имен дожно быть задано в файле kubeconfig, это делается через `kubectl config set-context starship-cluster --namespace astronaut`. Если переменная окружения `$KUBECONFIG` задана, модуль будет использовать его значение, в противном случае будет использовать `~/.kube/config`.
::: tip Подсказка
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
:::
@ -879,7 +879,7 @@ disabled = false
## Перевод Строки
The `line_break` module separates the prompt into two lines.
Модуль `line_break` разделяет командную строку на две строки.
### Опции
@ -898,13 +898,13 @@ disabled = true
## Использование памяти
The `memory_usage` module shows current system memory and swap usage.
Модуль `memory_usage` отображает текущую системную память и использование подкачки.
By default the swap usage is displayed if the total system swap is non-zero.
По умолчанию использование подкачки отображается, если общая сумма подкачки системы не равна нулю.
::: tip Подсказка
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
:::
@ -937,7 +937,7 @@ style = "bold dimmed green"
## Ветка Mercurial
The `hg_branch` module shows the active branch of the repo in your current directory.
Модуль `hg_branch` показывает активную ветку репозитория в вашем текущем каталоге.
### Опции
@ -988,18 +988,18 @@ symbol = "🎣 "
## Nix-shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
Модуль `nix_shell` показывает окружение nix-shell. Модуль будет показываться внутри среды nix-shell.
### Опции
| Переменная | По умолчанию | Описание |
| ------------ | ------------- | ------------------------------------------------- |
| `use_name` | `false` | Display the name of the nix-shell. |
| `impure_msg` | `"impure"` | Customize the "impure" msg. |
| `pure_msg` | `"pure"` | Customize the "pure" msg. |
| `use_name` | `false` | Отображать имя nix-shell. |
| `impure_msg` | `"impure"` | Настройте сообщение "impure". |
| `pure_msg` | `"pure"` | Настройте сообщение "pure". |
| `symbol` | `"❄️ "` | The symbol used before displaying the shell name. |
| `style` | `"bold blue"` | Стиль модуля. |
| `disabled` | `false` | Disables the `nix_shell` module. |
| `disabled` | `false` | Отключает модуль `nix_shell`. |
### Пример
@ -1016,20 +1016,20 @@ symbol = "☃️ "
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `nodejs` показывает установленную версию NodeJS. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `package.json` file
- Текущий каталог содержит файл `package.json`
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory
- The current directory contains a file with the `.js` extension
- Текущий каталог содержит каталог `node_modules`
- Текущий каталог содержит файл с расширением `.js`
### Опции
| Переменная | По умолчанию | Описание |
| ---------- | -------------- | -------------------------------------------------------- |
| `symbol` | `"⬢ "` | The symbol used before displaying the version of NodeJS. |
| `style` | `"bold green"` | Стиль модуля. |
| `disabled` | `false` | Disables the `nodejs` module. |
| Переменная | По умолчанию | Описание |
| ---------- | -------------- | ------------------------------------------------------ |
| `symbol` | `"⬢ "` | Символ, используемый перед отображением версии NodeJS. |
| `style` | `"bold green"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `nodejs`. |
### Пример
@ -1040,15 +1040,15 @@ The `nodejs` module shows the currently installed version of NodeJS. Модул
symbol = "🤖 "
```
## 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.
Модуль `package` отображается, когда текущий каталог является репозиторием для пакета и показывает его текущую версию. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` 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
- **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
- **npm** Версия пакета `npm` из файла `package.json` в текущем каталоге
- **cargo** Версия пакета `cargo` из файла `Cargo.toml` в текущем каталоге
- **poetry** Версия пакета `poetry` из файла `pyproject.toml` в текущем каталоге
- **composer** Версия пакета `composer` из `composer.json` в текущем каталоге
- **gradle** Версия пакета `gradle` извлечена из `build.gradle`
- **julia** - The package version is extracted from the `Project.toml` present
- **mix** - The `mix` package version is extracted from the `mix.exs` present
@ -1056,12 +1056,12 @@ The `package` module is shown when the current directory is the repository for a
### Опции
| Переменная | По умолчанию | Описание |
| ----------------- | ------------ | ---------------------------------------------------------- |
| `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. |
| Переменная | По умолчанию | Описание |
| ----------------- | ------------ | --------------------------------------------------------- |
| `symbol` | `"📦 "` | Символ, используемый перед отображением версии пакета. |
| `style` | `"bold 208"` | Стиль модуля. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | Отключает модуль `package`. |
### Пример
@ -1102,19 +1102,19 @@ symbol = "🐪 "
## PHP
The `php` module shows the currently installed version of PHP. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `php` показывает установленную версию PHP. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `composer.json` file
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file
- Текущий каталог содержит файл `composer.json`
- Текущий каталог содержит файл `.php-version`
- Текущий каталог содержит файл `.php`
### Опции
| Переменная | По умолчанию | Описание |
| ---------- | ------------ | ----------------------------------------------------- |
| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
| `style` | `"bold 147"` | Стиль модуля. |
| `disabled` | `false` | Disables the `php` module. |
| Переменная | По умолчанию | Описание |
| ---------- | ------------ | --------------------------------------------------- |
| `symbol` | `"🐘 "` | Символ, используемый перед отображением версии PHP. |
| `style` | `"bold 147"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `php`. |
### Пример
@ -1133,26 +1133,44 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- Текущий каталог содержит файл `.python-version`
- Текущий каталог содержит файл `requirements.txt`
- Текущий каталог содержит файл `pyproject.toml`
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- Текущий каталог содержит файл `Pipfile`
- Текущий каталог содержит файл `tox.ini`
- Текущий каталог содержит файл `setup.py`
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
- Виртуальная среда в данный момент активирована
### Опции
| Переменная | По умолчанию | Описание |
| -------------------- | --------------- | --------------------------------------------------------------------------- |
| `symbol` | `"🐍 "` | The symbol used before displaying the version of Python. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_prefix` | `"pyenv "` | Prefix before pyenv version display (default display is `pyenv MY_VERSION`) |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | Стиль модуля. |
| `disabled` | `false` | Disables the `python` module. |
| Переменная | По умолчанию | Описание |
| -------------------- | --------------- | ------------------------------------------------------------------------------------- |
| `symbol` | `"🐍 "` | Символ перед отображением текущей версии Python. |
| `pyenv_version_name` | `false` | Использовать pyenv для получения версии Python |
| `pyenv_prefix` | `"pyenv "` | Префикс перед отображением версии pyenv (отображение по умолчанию `pyenv MY_VERSION`) |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | Стиль модуля. |
| `disabled` | `false` | Disables the `python` module. |
<details>
<summary>This module has some advanced configuration options.</summary>
| Переменная | По умолчанию | Описание |
| --------------- | ------------ | ----------------------------------------------------------------------------- |
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used.
```toml
# ~/.config/starship.toml
[python]
python_binary = "python3"
```
</details>
### Пример
@ -1167,19 +1185,19 @@ pyenv_prefix = "foo "
## Ruby
The `ruby` module shows the currently installed version of Ruby. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `ruby` показывает установленную версию Ruby. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `Gemfile` file
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file
- Текущий каталог содержит файл `Gemfile`
- Текущий каталог содержит файл `.ruby-version`
- Текущий каталог содержит файл `.rb`
### Опции
| Переменная | По умолчанию | Описание |
| ---------- | ------------ | ------------------------------------------------------ |
| `symbol` | `"💎 "` | The symbol used before displaying the version of Ruby. |
| `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `ruby` module. |
| Переменная | По умолчанию | Описание |
| ---------- | ------------ | ---------------------------------------------------- |
| `symbol` | `"💎 "` | Символ, используемый перед отображением версии Ruby. |
| `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `ruby`. |
### Пример
@ -1192,18 +1210,18 @@ symbol = "🔺 "
## Rust
The `rust` module shows the currently installed version of Rust. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `rust` показывает установленную версию Rust. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `Cargo.toml` file
- The current directory contains a file with the `.rs` extension
- Текущий каталог содержит файл `Cargo.toml`
- Текущий каталог содержит файл с расширением `.rs`
### Опции
| Переменная | По умолчанию | Описание |
| ---------- | ------------ | ------------------------------------------------------ |
| `symbol` | `"🦀 "` | The symbol used before displaying the version of Rust. |
| `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `rust` module. |
| Переменная | По умолчанию | Описание |
| ---------- | ------------ | ---------------------------------------------------- |
| `symbol` | `"🦀 "` | Символ, используемый перед отображением версии Rust. |
| `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `rust`. |
### Пример
@ -1216,18 +1234,18 @@ symbol = "⚙️ "
## Singularity
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
Модуль `singularity` показывает текущий образ singularity, если внутри контейнера и `$SINGULARITY_NAME` установлена.
### Опции
| Переменная | По умолчанию | Описание |
| ---------- | -------------------- | ------------------------------------------------ |
| `label` | `""` | Prefix before the image name display. |
| `prefix` | `"["` | Prefix to display immediately before image name. |
| `suffix` | `"]"` | Suffix to display immediately after image name. |
| `symbol` | `""` | The symbol used before the image name. |
| `style` | `"bold dimmed blue"` | Стиль модуля. |
| `disabled` | `false` | Disables the `singularity` module. |
| Переменная | По умолчанию | Описание |
| ---------- | -------------------- | -------------------------------------------------- |
| `label` | `""` | Префикс перед отображением имени образа. |
| `prefix` | `"["` | Префикс для отображения сразу перед именем образа. |
| `suffix` | `"]"` | Суффикс, отображаемый сразу после имени образа. |
| `symbol` | `""` | Символ, используемый перед именем образа. |
| `style` | `"bold dimmed blue"` | Стиль модуля. |
| `disabled` | `false` | Disables the `singularity` module. |
### Пример
@ -1240,19 +1258,19 @@ symbol = "📦 "
## 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. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `terraform` показывает выбранную рабочую область и версию terraform. По умолчанию, версия terraform не показана, так как это медленно на текущих версиях terraform, при использовании большого количества плагинов. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `.terraform` folder
- Current directory contains a file with the `.tf` extension
- Текущий каталог содержит папку `.terraform`
- Текущий каталог содержит файл с расширением `.tf`
### Опции
| Переменная | По умолчанию | Описание |
| -------------- | ------------ | ----------------------------------------------------------- |
| `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. |
| `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. |
| `style` | `"bold 105"` | Стиль модуля. |
| `disabled` | `false` | Disables the `terraform` module. |
| Переменная | По умолчанию | Описание |
| -------------- | ------------ | --------------------------------------------------------------------------- |
| `symbol` | `"💠 "` | Символ, используемый перед отображением рабочего пространства terraform. |
| `show_version` | `false` | Показать версию terraform. Очень медленно на больших рабочих пространствах. |
| `style` | `"bold 105"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `terraform`. |
### Пример
@ -1263,28 +1281,28 @@ The `terraform` module shows the currently selected terraform workspace and vers
symbol = "🏎💨 "
```
## Time
## Время
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
Модуль `time` показывает текущее **локальное** время. Значение конфигурации `format` используется пакетом [`chrono`](https://crates.io/crates/chrono) для контроля того, как отображается время. Ознакомьтесь с [документацией chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), чтобы увидеть доступные параметры.
::: tip Подсказка
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
:::
### Опции
| Переменная | По умолчанию | Описание |
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Enables 12 hour formatting. |
| `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 |
| Переменная | По умолчанию | Описание |
| ----------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Включить 12-часовое форматирование. |
| `format` | см. ниже | [Строка формата chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), используемая для форматирования времени. |
| `style` | `"bold yellow"` | Стиль модуля времени. |
| `utc_time_offset` | `"local"` | Устанавливает смещение UTC. Диапазон -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 |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.
Если `use_12hr` равно `true`, то `format` по умолчанию равно `"%r"`. Иначе по умолчанию используется `"%T"`. Установка `format` вручную переопределит параметр `use_12hr`.
### Пример
@ -1298,23 +1316,23 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Username
## Имя пользователя
The `username` module shows active user's username. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `username` показывает имя текущего пользователя. Модуль будет показан, если любое из следующих условий соблюдено:
- 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
- Текущий пользователь - root
- Текущий пользователь отличается от залогиненного
- Пользователь подключен к SSH-сессии
- Переменная `show_always` равна true
### Опции
| Переменная | По умолчанию | Описание |
| ------------- | --------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| Переменная | По умолчанию | Описание |
| ------------- | --------------- | ------------------------------------------------------- |
| `style_root` | `"bold red"` | Стиль, используемый для пользователя root. |
| `style_user` | `"bold yellow"` | Стиль, используемый для всех пользователей, кроме root. |
| `show_always` | `false` | Всегда показывать модуль `username`. |
| `disabled` | `false` | Отключает модуль `username`. |
### Пример
@ -1359,13 +1377,13 @@ 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
::: tip Подсказка
::: tip
Multiple custom modules can be defined by using a `.`.
:::
::: tip Подсказка
::: tip
The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
@ -1378,7 +1396,7 @@ The order in which custom modules are shown can be individually set by setting `
| `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) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `описание` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
@ -1436,7 +1454,7 @@ shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
The `purescript` module shows the currently installed version of PureScript version. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `spago.dhall` file
- Текущий каталог содержит файл `spago.dhall`
- The current directory contains a \*.purs files
### Опции

View File

@ -51,3 +51,22 @@ starship prompt --help
```sh
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
```
## Why don't I see a glyph symbol in my prompt?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
- You are using a [powerline-patched font](https://github.com/powerline/fonts).
To test your system, run the following commands in a terminal:
```
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).
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)

View File

@ -9,7 +9,7 @@ Starship 目前正在开发中。 很多新的配置选项将会在之后的版
您需要创建配置文件 `~/.config/starship.toml` 以供 Starship 使用。
```sh
$ mkdir -p ~/.config && touch ~/.config/starship.toml
mkdir -p ~/.config && touch ~/.config/starship.toml
```
Starship 的所有配置都在此 [TOML](https://github.com/toml-lang/toml) 配置文件中完成:
@ -375,11 +375,11 @@ style = "bold blue"
<details>
<summary>此组件有几个高级配置选项来控制当前目录路径的显示方式。</summary>
| 字段 | 默认值 | 描述 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| `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` | | 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 提供的路径。 |
`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.
@ -426,11 +426,11 @@ symbol = "🐋 "
## Dotnet
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.
`dotnet` 模块显示与当前目录下使用的 .NET Core SDK 相关联的版本。 如果当前目录已被绑定了一个版本的 SDK则显示被帮定的版本。 否则此组件将显示最新安装的 SDK 版本。
This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly.
此组件只会在以下文件之一出现在当前目录中时显示:`global.json``project.json``*.sln``*.csproj``*.fsproj``*.xproj`。 为了正确使用此组件,您还需要安装 .NET Core 命令行工具。
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
在内部,此组件使用自己的版本检测机制。 一般来说此组件是直接执行 `dotnet --version` 的两倍快,但当你的 .NET 项目使用了不常见的目录布局时此组件可能显示一个错误的版本。 如果相比于速度您更需要正确的版本号,您可以在组件设置中设置 `heuristic = false` 来禁用该机制。
### 配置项
@ -505,7 +505,7 @@ symbol = " "
## Environment Variable
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met:
`env_var` 组件显示选定的环境变量的当前值。 此组件只有满足以下条件之一时才会被显示:
- 设置的 `variable` 是一个已存在的环境变量
- 未定义 `variable`,但定义了 `default`
@ -534,7 +534,7 @@ default = "unknown shell"
## Erlang
The `erlang` module shows the currently installed version of Erlang/OTP. 此组件将在符合以下任意条件之一时显示:
The `erlang` module shows the currently installed version of Erlang/OTP. 此组件只有满足以下条件之一时才会被显示:
- 当前目录包含一个 `rebar.config` 文件.
- 当前目录包含一个 `erlang.mk` 文件.
@ -558,7 +558,7 @@ symbol = "e "
## Git Branch
The `git_branch` module shows the active branch of the repo in your current directory.
`git_branch` 组件显示当前目录的 git 仓库的活动分支。
### 配置项
@ -583,7 +583,7 @@ truncation_symbol = ""
## Git Commit
The `git_commit` module shows the current commit hash of the repo in your current directory.
`git_commit` 组件显示当前目录的 git 仓库的当前提交的哈希值。
### 配置项
@ -607,7 +607,7 @@ commit_hash_length = 4
## Git State
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
`git_state` 组件会显示当前目录在哪个 git 仓库中以及正在进行的操作例如_REBASING__BISECTING_ 等。 进度信息(例如 REBASING 3/10如果存在则也会被显示。
### 配置项
@ -636,7 +636,7 @@ cherry_pick = "🍒 PICKING"
## Git Status
The `git_status` module shows symbols representing the state of the repo in your current directory.
`git_status`组件通过相应的符号显示您当前目录中 git 仓库的状态。
### 配置项
@ -695,7 +695,7 @@ deleted = "🗑"
## Golang
The `golang` module shows the currently installed version of Golang. 此组件将在符合以下任意条件之一时显示:
`golang` 组件显示当前安装的 Golang 版本。 此组件将在符合以下任意条件之一时显示:
- 当前目录包含 `go.mod` 文件
- 当前目录包含 `go.sum` 文件
@ -724,7 +724,7 @@ symbol = "🏎💨 "
```
## Haskell
The `haskell` module shows the currently installed version of Haskell Stack version. 此组件将在符合以下任意条件之一时显示:
`haskell` 组件显示当前安装的 Haskell Stack 版本。 此组件将在符合以下任意条件之一时显示:
- 当前目录包含 `stack.yaml` 文件
@ -748,7 +748,7 @@ symbol = " "
## Hostname
The `hostname` module shows the system hostname.
`hostname` 组件显示系统主机名。
### 配置项
@ -776,7 +776,7 @@ disabled = false
## Java
The `java` module shows the currently installed version of Java. 此组件将在符合以下任意条件之一时显示:
`java` 组件显示当前安装的 Java 版本。 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- 当前目录包含一个扩展名为 `.java``.class``.gradle` 或 `.jar` 的文件
@ -800,7 +800,7 @@ symbol = "🌟 "
## Jobs
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists.
`jobs` 组件显示当前正在运行的任务数量。 仅当有后台任务运行时,此组件才会显示。 如果有超过 1 个作业,模块将显示正在运行的作业数量,如果配置了 `threshold` 字段,则使用它作为显示作业数量的下限。
### 配置项
@ -823,7 +823,7 @@ threshold = 4
## Julia
The `julia` module shows the currently installed version of Julia. 此组件将在符合以下任意条件之一时显示:
The `julia` module shows the currently installed version of Julia. 此组件将在符合以下条件之一时显示:
- The current directory contains a `Project.toml` file
- The current directory contains a `Manifest.toml` file
@ -847,11 +847,11 @@ symbol = "∴ "
```
## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
显示当前的 Kubernetes 上下文名以及,如果有相关设置,则显示来自 kubeconig 文件的命名空间。 命名空间需要在 kubeconfig 文件中设置,这可以通过 `kubectl config set-context starship-cluster --namespace astronaut` 完成。 如果设置了环境变量 `$KUBECONFIG`,此组件将使用该值,否则会使用 `~/.kube/config`
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`
:::
@ -879,7 +879,7 @@ disabled = false
## Line Break
The `line_break` module separates the prompt into two lines.
`line_break` 组件将提示分隔为两行。
### 配置项
@ -898,13 +898,13 @@ disabled = true
## Memory Usage
The `memory_usage` module shows current system memory and swap usage.
`memory_usage` 组件显示当前系统内存和交换区使用情况。
By default the swap usage is displayed if the total system swap is non-zero.
默认情况下,如果系统交换区使用不为 0则会显示交换区使用情况。
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`
:::
@ -937,7 +937,7 @@ style = "bold dimmed green"
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
`hg_branch` 组件显示当前目录的 hg 仓库的活动分支。
### 配置项
@ -962,7 +962,7 @@ truncation_symbol = ""
## Nim
The `nim` module shows the currently installed version of Nim. 此组件将在符合以下任意条件之一时显示:
The `nim` module shows the currently installed version of Nim. 此组件只有满足以下条件之一时才会被显示:
- 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
@ -988,18 +988,18 @@ symbol = "🎣 "
## Nix-shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
`nix_shell` 组件显示 nix-shell 环境。 当处于一个 nix-shell 环境中时,此组件会被显示。
### 配置项
| 字段 | 默认值 | 描述 |
| ------------ | ------------- | ------------------------------------------------- |
| `use_name` | `false` | Display the name of the nix-shell. |
| `impure_msg` | `"impure"` | Customize the "impure" msg. |
| `pure_msg` | `"pure"` | Customize the "pure" msg. |
| `use_name` | `false` | 显示 nix-shell 的名称。 |
| `impure_msg` | `"impure"` | 自定义“impure”消息。 |
| `pure_msg` | `"pure"` | 自定义“pure”消息。 |
| `symbol` | `"❄️ "` | The symbol used before displaying the shell name. |
| `style` | `"bold blue"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `nix_shell` module. |
| `disabled` | `false` | 禁用 `nix_shell` 组件。 |
### 示例
@ -1016,20 +1016,20 @@ symbol = "☃️ "
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. 此组件将在符合以下任意条件之一时显示:
`nodejs` 组件显示当前安装的 NodeJS 版本。 此组件将在符合以下任意条件时显示:
- The current directory contains a `package.json` file
- 当前目录包含 `package.json` 文件
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory
- The current directory contains a file with the `.js` extension
- 当前目录包含 `node_modules` 目录
- 当前目录包含一个使用 `.js` 扩展名的文件
### 配置项
| 字段 | 默认值 | 描述 |
| ---------- | -------------- | -------------------------------------------------------- |
| `symbol` | `"⬢ "` | The symbol used before displaying the version of NodeJS. |
| `style` | `"bold green"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `nodejs` module. |
| 字段 | 默认值 | 描述 |
| ---------- | -------------- | -------------------------- |
| `symbol` | `"⬢ "` | 这个字段的内容会显示在当前 NodeJS 版本之前。 |
| `style` | `"bold green"` | 此组件的样式。 |
| `disabled` | `false` | 禁用 `nodejs` 组件。 |
### 示例
@ -1042,12 +1042,12 @@ symbol = "🤖 "
## 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.
当前目录是软件包的代码仓库时,将显示 `package` 组件,并显示软件包当前版本。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` 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
- **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
- **npm** —— `npm` 软件包版本从当前目录下的 `package.json` 中得到
- **cargo** —— `cargo` 软件包的版本从当前目录下的 `Cargo.toml` 中得到
- **poetry** —— `poetry` 软件包版本从当前目录下的 `pyproject.toml` 中得到
- **composer** —— `composer` 软件包版本从当前目录下的 `composer.json` 中得到
- **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
@ -1056,12 +1056,12 @@ The `package` module is shown when the current directory is the repository for a
### 配置项
| 字段 | 默认值 | 描述 |
| ----------------- | ------------ | ---------------------------------------------------------- |
| `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. |
| 字段 | 默认值 | 描述 |
| ----------------- | ------------ | --------------------------------------------------------- |
| `symbol` | `"📦 "` | 这个字段的内容会显示在当前软件包版本之前。 |
| `style` | `"bold 208"` | 此组件的样式。 |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | 禁用 `package` 组件。 |
### 示例
@ -1102,19 +1102,19 @@ symbol = "🐪 "
## PHP
The `php` module shows the currently installed version of PHP. 此组件将在符合以下任意条件之一时显示:
`php` 组件显示当前安装的 PHP 版本。 此组件只有满足以下条件之一时才会被显示:
- The current directory contains a `composer.json` file
- 当前目录包含一个 `composer.json` 文件
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file
- 当前目录包含一个 `.php` 文件
### 配置项
| 字段 | 默认值 | 描述 |
| ---------- | ------------ | ----------------------------------------------------- |
| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
| `style` | `"bold 147"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `php` module. |
| 字段 | 默认值 | 描述 |
| ---------- | ------------ | ----------------------- |
| `symbol` | `"🐘 "` | 这个字段的内容会显示在当前 PHP 版本之前。 |
| `style` | `"bold 147"` | 此组件的样式。 |
| `disabled` | `false` | 禁用 `php` 组件。 |
### 示例
@ -1133,26 +1133,44 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
此组件将在符合以下任意条件之一时显示:
- The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- 当前目录包含 `.python-version` 文件
- 当前目录包含 `requirements.txt` 文件
- 当前目录包含 `pyproject.toml` 文件
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- 当前目录包含 `Pipfile` 文件
- 当前目录包含一个 `tox.ini` 文件
- 当前目录包含一个 `setup.py` 文件
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
- 当前处于一个活跃的 python 虚拟环境中
### 配置项
| 字段 | 默认值 | 描述 |
| -------------------- | --------------- | --------------------------------------------------------------------------- |
| `symbol` | `"🐍 "` | The symbol used before displaying the version of Python. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_prefix` | `"pyenv "` | Prefix before pyenv version display (default display is `pyenv MY_VERSION`) |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `python` module. |
| 字段 | 默认值 | 描述 |
| -------------------- | --------------- | -------------------------------------------------------------------------- |
| `symbol` | `"🐍 "` | 这个字段的内容会显示在当前 Python 版本之前。 |
| `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 |
| `pyenv_prefix` | `"pyenv "` | 在 pyenv 版本前显示的前缀(默认显示 `pyenv MY_VERSION` |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | 此组件的样式。 |
| `disabled` | `false` | 禁用 `python` 组件。 |
<details>
<summary>This module has some advanced configuration options.</summary>
| 字段 | 默认值 | 描述 |
| --------------- | -------- | ----------------------------------------------------------------------------- |
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used.
```toml
# ~/.config/starship.toml
[python]
python_binary = "python3"
```
</details>
### 示例
@ -1167,11 +1185,11 @@ pyenv_prefix = "foo "
## Ruby
The `ruby` module shows the currently installed version of Ruby. 此组件将在符合以下任意条件之一时显示:
`ruby` 组件显示当前安装的 Ruby 版本。 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `Gemfile` file
- 当前目录包含 `Gemfile` 文件
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file
- 当前目录包含 `.rb` 文件
### 配置项
@ -1179,7 +1197,7 @@ The `ruby` module shows the currently installed version of Ruby. 此组件将在
| ---------- | ------------ | ------------------------------------------------------ |
| `symbol` | `"💎 "` | The symbol used before displaying the version of Ruby. |
| `style` | `"bold red"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `ruby` module. |
| `disabled` | `false` | 禁用 `ruby` 组件。 |
### 示例
@ -1192,18 +1210,18 @@ symbol = "🔺 "
## Rust
The `rust` module shows the currently installed version of Rust. 此组件将在符合以下任意条件之一时显示:
`rust` 组件显示当前安装的 Rust 版本。 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `Cargo.toml` file
- The current directory contains a file with the `.rs` extension
- 当前目录包含 `Cargo.toml` 文件
- 当前目录包含一个使用 `.rs` 扩展名的文件
### 配置项
| 字段 | 默认值 | 描述 |
| ---------- | ------------ | ------------------------------------------------------ |
| `symbol` | `"🦀 "` | The symbol used before displaying the version of Rust. |
| `style` | `"bold red"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `rust` module. |
| 字段 | 默认值 | 描述 |
| ---------- | ------------ | ------------------------ |
| `symbol` | `"🦀 "` | 这个字段的内容会显示在当前 Rust 版本之前。 |
| `style` | `"bold red"` | 此组件的样式。 |
| `disabled` | `false` | 禁用 `rust` 组件。 |
### 示例
@ -1240,19 +1258,19 @@ symbol = "📦 "
## 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. 此组件将在符合以下任意条件之一时显示:
`terraform` 组件显示当前选定的 terraform 工作区和版本。 默认情况下不会显示 terraform 版本,因为当使用大量插件时,当前版本 terraform 查询版本号很慢。 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `.terraform` folder
- Current directory contains a file with the `.tf` extension
- 当前目录包含 `.terraform` 目录
- 当前目录包含一个使用 `.tf` 扩展名的文件
### 配置项
| 字段 | 默认值 | 描述 |
| -------------- | ------------ | ----------------------------------------------------------- |
| `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. |
| `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. |
| `style` | `"bold 105"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `terraform` module. |
| 字段 | 默认值 | 描述 |
| -------------- | ------------ | -------------------------------- |
| `symbol` | `"💠 "` | 这个字段的内容会显示在当前 terraform 工作区之前。 |
| `show_version` | `false` | 显示 terraform 版本信息。 在大型工作空间中非常缓慢。 |
| `style` | `"bold 105"` | 此组件的样式。 |
| `disabled` | `false` | 禁用 `terraform` 组件。 |
### 示例
@ -1265,26 +1283,26 @@ symbol = "🏎💨 "
## Time
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
`time` 组件显示当前的 **本地** 时间。 `format` 字段值会提供给 [`chrono`](https://crates.io/crates/chrono) crate 用来控制时间显示方式。 请参阅 [chrono strftime 文档](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) 以了解可用格式选项。
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`
:::
### 配置项
| 字段 | 默认值 | 描述 |
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Enables 12 hour formatting. |
| `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 |
| 字段 | 默认值 | 描述 |
| ----------------- | --------------- | ----------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | 启用 12 小时格式. |
| `format` | 见下文解释 | 用来格式化时间显示的 [chrono 格式字符串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) |
| `style` | `"bold yellow"` | The style for the module time. |
| `utc_time_offset` | `"local"` | 设置所用 UTC 偏移量。 范围是 -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 |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.
如果 `use_12hr``true`,则`format` 默认值为 `"%r"`。 否则,其默认值为 `"%T"`。 手动设置 `format` 将使 `use_12hr` 被忽略。
### 示例
@ -1300,21 +1318,21 @@ time_range = "10:00:00-14:00:00"
## Username
The `username` module shows active user's username. 此组件将在符合以下任意条件之一时显示:
`username` 组件显示当前活跃的用户名。 此组件将在符合以下任意条件之一时显示:
- 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
- 当前用户是 root
- 当前用户与登录用户不相同
- 用户正通过 SSH 会话连接访问
- 字段 `show_always` 被设置为 true
### 配置项
| 字段 | 默认值 | 描述 |
| ------------- | --------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| 字段 | 默认值 | 描述 |
| ------------- | --------------- | ------------------- |
| `style_root` | `"bold red"` | 当前用户为 root 时使用的样式。 |
| `style_user` | `"bold yellow"` | 非 root 用户使用的样式。 |
| `show_always` | `false` | 总是显示 `username` 组件。 |
| `disabled` | `false` | 禁用 `username` 组件。 |
### 示例
@ -1378,7 +1396,7 @@ The order in which custom modules are shown can be individually set by setting `
| `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) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `描述` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
@ -1436,7 +1454,7 @@ shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
The `purescript` module shows the currently installed version of PureScript version. 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `spago.dhall` file
- 当前目录包含一个 `spago.dhall` 文件
- The current directory contains a \*.purs files
### 配置项

View File

@ -51,3 +51,22 @@ If you get an error like "*version 'GLIBC_2.18' not found (required by starship)
```sh
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
```
## Why don't I see a glyph symbol in my prompt?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
- You are using a [powerline-patched font](https://github.com/powerline/fonts).
To test your system, run the following commands in a terminal:
```
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).
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)

View File

@ -9,7 +9,7 @@
為了開始設定 Starship請建立下右檔案 `~/.config/starship.toml`.
```sh
$ mkdir -p ~/.config && touch ~/.config/starship.toml
mkdir -p ~/.config && touch ~/.config/starship.toml
```
所有關於 Starship 的設定都在這個 [TOML](https://github.com/toml-lang/toml) 檔案內:
@ -375,11 +375,11 @@ style = "bold blue"
<details>
<summary>這個模組有些進階設定選項可以控制顯示資料夾。</summary>
| 變數 | 預設 | 說明 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| `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` | | 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 的路徑。 |
`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.
@ -426,11 +426,11 @@ symbol = "🐋 "
## Dotnet
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.
`dotnet` 模組顯示現在資料夾使用的 .NET Core SDK 的版本。 如果這個資料夾已經選定一個 SDK則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。
This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly.
這個模組只會在下列檔案出現在你的現在資料夾中時,顯示在你的提示字元:`global.json`、`project.json`、`*.sln`、`*.csproj`、`*.fsproj`、`*.xproj`。 你也會需要安裝 .NET Core 文字命令工具來正確使用這個模組。
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。
### 選項
@ -505,7 +505,7 @@ symbol = " "
## 環境變數
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met:
`env_var`模組顯示一個選擇的環境變數的現在數值。 這個模組只在下列條件其中之一達到時顯示:
- `variable` 設定選項符合一個存在的環境變數。
- 沒有設定 `variable` 選項,但是有設定 `default` 選項。
@ -558,7 +558,7 @@ symbol = "e "
## Git 分支
The `git_branch` module shows the active branch of the repo in your current directory.
`git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
### 選項
@ -607,7 +607,7 @@ commit_hash_length = 4
## Git State
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
`git_state` 模組會顯示在 git 儲存庫中的資料夾內以及會在有作業正在進行時顯示像是_REBASING_、_BISECTING_ 等等。 如果有進展的資訊 (像是 REBASING 3/10),也會一併顯示出來。
### 選項
@ -636,7 +636,7 @@ cherry_pick = "🍒 PICKING"
## Git Status
The `git_status` module shows symbols representing the state of the repo in your current directory.
`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
### 選項
@ -695,7 +695,7 @@ deleted = "🗑"
## Golang
The `golang` module shows the currently installed version of Golang. 這個模組在下列其中一個條件達成時顯示:
`golang` 模組顯示現在安裝的 Golang 版本。 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中含有一個 `go.mod` 檔案
- 現在資料夾中含有一個 `go.sum` 檔案
@ -748,7 +748,7 @@ symbol = " "
## 主機名稱
The `hostname` module shows the system hostname.
`hostname` 模組顯示系統的主機名稱。
### 選項
@ -776,7 +776,7 @@ disabled = false
## Java
The `java` module shows the currently installed version of Java. 這個模組在下列其中一個條件達成時顯示:
`java` 模組顯示現在安裝的 Java 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension
@ -800,7 +800,7 @@ symbol = "🌟 "
## 工作
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists.
`jobs` 模組顯示現在正在執行中的工作。 這個模組只會在有背景工作正在執行時顯示。 這個模組會在工作數量超過一個,或者有設定 `threshold` 時且數量超過設定值時,顯示工作的數量。
### 選項
@ -847,11 +847,11 @@ symbol = "∴ "
```
## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
顯示現在 Kubernetes 主體名稱以及從 kubeconfig 檔案來的名稱空間 (如果有設定的話)。 The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 如果有設定 `$KUBECONFIG` 環境變數,這個模組就會使用設定值;如果沒有,它就會使用 `~/.kube/config`
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
:::
@ -879,7 +879,7 @@ disabled = false
## 換行
The `line_break` module separates the prompt into two lines.
`line_break` 模組將提示字元分成兩行。
### 選項
@ -898,13 +898,13 @@ disabled = true
## 記憶體使用量
The `memory_usage` module shows current system memory and swap usage.
`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。
By default the swap usage is displayed if the total system swap is non-zero.
預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
:::
@ -988,18 +988,18 @@ symbol = "🎣 "
## Nix-shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
`nix_shell` 模組顯示 nix-shell 環境。 這個模組會在 nix-shell 環境中顯示。
### 選項
| 變數 | 預設 | 說明 |
| ------------ | ------------- | ------------------------------------------------- |
| `use_name` | `false` | Display the name of the nix-shell. |
| `impure_msg` | `"impure"` | Customize the "impure" msg. |
| `pure_msg` | `"pure"` | Customize the "pure" msg. |
| `use_name` | `false` | 顯示 nix-shell 的名稱。 |
| `impure_msg` | `"impure"` | 自定義「impure」訊息。 |
| `pure_msg` | `"pure"` | 自定義「pure」訊息。 |
| `symbol` | `"❄️ "` | The symbol used before displaying the shell name. |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `nix_shell` module. |
| `disabled` | `false` | 停用 `nix_shell` 模組。 |
### 範例
@ -1016,20 +1016,20 @@ symbol = "☃️ "
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. 這個模組在下列其中一個條件達成時顯示:
`nodejs` 模組顯示現在安裝的 NodeJS 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `package.json` file
- 現在資料夾中包含一個 `package.json` 檔案
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory
- The current directory contains a file with the `.js` extension
- 現在資料夾中包含一個 `node_modules` 資料夾
- 現在資料夾中包含一個檔案具有 `.js` 副檔名
### 選項
| 變數 | 預設 | 說明 |
| ---------- | -------------- | -------------------------------------------------------- |
| `symbol` | `"⬢ "` | The symbol used before displaying the version of NodeJS. |
| `style` | `"bold green"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `nodejs` module. |
| 變數 | 預設 | 說明 |
| ---------- | -------------- | -------------------- |
| `symbol` | `"⬢ "` | 在顯示 NodeJS 版本之前用的符號。 |
| `style` | `"bold green"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `nodejs` 模組。 |
### 範例
@ -1040,13 +1040,13 @@ The `nodejs` module shows the currently installed version of NodeJS. 這個模
symbol = "🤖 "
```
## 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` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` 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
- **poetry** The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
- **npm** `npm` 套件的版本是從現在資料夾中的 `package.json` 之中擷取出來的
- **cargo** `cargo` 套件的版本是從現在資料夾中的 `Cargo.toml` 之中擷取出來的
- **poetry** `poetry` 套件的版本是從現在資料夾中的 `pyproject.toml` 之中擷取出來的
- **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
@ -1056,12 +1056,12 @@ The `package` module is shown when the current directory is the repository for a
### 選項
| 變數 | 預設 | 說明 |
| ----------------- | ------------ | ---------------------------------------------------------- |
| `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. |
| 變數 | 預設 | 說明 |
| ----------------- | ------------ | --------------------------------------------------------- |
| `symbol` | `"📦 "` | 顯示在套件的版本之前的符號。 |
| `style` | `"bold 208"` | 這個模組的風格。 |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | 停用 `package` 模組。 |
### 範例
@ -1133,26 +1133,44 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- 目前資料夾中有一個 `.python-version` 檔案
- 目前資料夾中有一個 `requirements.txt` 檔案
- 目前資料夾中有一個 `pyproject.toml` 檔案
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- 目前資料夾中有一個 `Pipfile` 檔案
- 目前資料夾中有一個 `tox.ini` 檔案
- 現在資料夾中包含一個 `setup.py` 檔案
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
### 選項
| 變數 | 預設 | 說明 |
| -------------------- | --------------- | --------------------------------------------------------------------------- |
| `symbol` | `"🐍 "` | The symbol used before displaying the version of Python. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_prefix` | `"pyenv "` | Prefix before pyenv version display (default display is `pyenv MY_VERSION`) |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `python` module. |
| 變數 | 預設 | 說明 |
| -------------------- | --------------- | -------------------------------------------------------------------------- |
| `symbol` | `"🐍 "` | 顯示在 Python 版本之前的符號。 |
| `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 |
| `pyenv_prefix` | `"pyenv "` | 顯示在 pyenv 版本之前的前綴 (預設顯示是 `pyenv MY_VERSION`)。 |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `python` 模組。 |
<details>
<summary>This module has some advanced configuration options.</summary>
| 變數 | 預設 | 說明 |
| --------------- | -------- | ----------------------------------------------------------------------------- |
| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. |
The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used.
```toml
# ~/.config/starship.toml
[python]
python_binary = "python3"
```
</details>
### 範例
@ -1167,19 +1185,19 @@ pyenv_prefix = "foo "
## Ruby
The `ruby` module shows the currently installed version of Ruby. 這個模組在下列其中一個條件達成時顯示:
`ruby` 模組顯示現在安裝的 Ruby 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `Gemfile` file
- 目前資料夾中有一個 `Gemfile` 檔案
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file
- 目前資料夾中有一個 `.rb` 檔案
### 選項
| 變數 | 預設 | 說明 |
| ---------- | ------------ | ------------------------------------------------------ |
| `symbol` | `"💎 "` | The symbol used before displaying the version of Ruby. |
| `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `ruby` module. |
| 變數 | 預設 | 說明 |
| ---------- | ------------ | ----------------- |
| `symbol` | `"💎 "` | 顯示在 Ruby 版本之前的符號。 |
| `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `ruby` 模組。 |
### 範例
@ -1192,18 +1210,18 @@ symbol = "🔺 "
## Rust
The `rust` module shows the currently installed version of Rust. 這個模組在下列其中一個條件達成時顯示:
`rust` 模組顯示現在安裝的 Rust 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `Cargo.toml` file
- The current directory contains a file with the `.rs` extension
- 目前資料夾中有一個 `Cargo.toml` 檔案
- 現在資料夾中包含一個檔案具有 `.rs` 副檔名
### 選項
| 變數 | 預設 | 說明 |
| ---------- | ------------ | ------------------------------------------------------ |
| `symbol` | `"🦀 "` | The symbol used before displaying the version of Rust. |
| `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `rust` module. |
| 變數 | 預設 | 說明 |
| ---------- | ------------ | ----------------- |
| `symbol` | `"🦀 "` | 顯示在 Rust 版本之前的符號。 |
| `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `rust` 模組。 |
### 範例
@ -1263,28 +1281,28 @@ The `terraform` module shows the currently selected terraform workspace and vers
symbol = "🏎💨 "
```
## Time
## 時間
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
`time` 模組顯示目前的**當地**時間. `format` 設定值被 [`chrono`](https://crates.io/crates/chrono) crate 用來控制時間如何顯示。 請看 [chrono 的 strftime 文件](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)來了解有那些選項可以使用。
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
:::
### 選項
| 變數 | 預設 | 說明 |
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Enables 12 hour formatting. |
| `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 |
| 變數 | 預設 | 說明 |
| ----------------- | --------------- | ----------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Enables 12 hour formatting. |
| `format` | 請看下列 | 用來顯示時間的 [chrono 格式字串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)。 |
| `style` | `"bold yellow"` | The style for the module time. |
| `utc_time_offset` | `"local"` | 設定相對於 UTC 的時差。 範圍 -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 |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.
如果 `use_12hr``true` 的話,`format` 會被預設為 `"%r"`。 不然的話,它會被預設為 `"%T"`。 手動設定 `format` 的設定值會覆寫 `use_12hr` 的設定。
### 範例
@ -1298,23 +1316,23 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Username
## 使用者名稱
The `username` module shows active user's username. 這個模組在下列其中一個條件達成時顯示:
`username` 模組顯示現在使用中的使用者名稱。 這個模組在下列其中一個條件達成時顯示:
- 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
- 目前使用者為 root
- 目前使用者並非登入時的使用者
- 使用者透過 SSH session 進行連線
- 變數 `show_always` 被設為 true
### 選項
| 變數 | 預設 | 說明 |
| ------------- | --------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| 變數 | 預設 | 說明 |
| ------------- | --------------- | ------------------- |
| `style_root` | `"bold red"` | 使用者為 root 時使用的風格。 |
| `style_user` | `"bold yellow"` | 非 root 使用者時使用的風格。 |
| `show_always` | `false` | 總是顯示 `username` 模組。 |
| `disabled` | `false` | 停用 `username` 模組。 |
### 範例
@ -1378,7 +1396,7 @@ The order in which custom modules are shown can be individually set by setting `
| `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) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `說明` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
@ -1436,7 +1454,7 @@ shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
The `purescript` module shows the currently installed version of PureScript version. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `spago.dhall` file
- 現在資料夾中包含一個 `spago.dhall` 檔案
- The current directory contains a \*.purs files
### 選項

View File

@ -51,3 +51,22 @@ If you get an error like "*version 'GLIBC_2.18' not found (required by starship)
```sh
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
```
## Why don't I see a glyph symbol in my prompt?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
- You are using a [powerline-patched font](https://github.com/powerline/fonts).
To test your system, run the following commands in a terminal:
```
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).
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)