docs(i18n): new Crowdin translations (#1059)
This commit is contained in:
parent
761fa020df
commit
4607e21fa6
|
@ -103,6 +103,7 @@ prompt_order = [
|
|||
"dotnet",
|
||||
"elixir",
|
||||
"elm",
|
||||
"erlang",
|
||||
"golang",
|
||||
"haskell",
|
||||
"java",
|
||||
|
@ -120,6 +121,7 @@ prompt_order = [
|
|||
"env_var",
|
||||
"crystal",
|
||||
"cmd_duration",
|
||||
"custom",
|
||||
"line_break",
|
||||
"jobs",
|
||||
"battery",
|
||||
|
@ -482,6 +484,28 @@ The `elm` module shows the currently installed version of Elm. Das Modul wird nu
|
|||
symbol = " "
|
||||
```
|
||||
|
||||
## Erlang
|
||||
|
||||
The `erlang` module shows the currently installed version of Erlang/OTP. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
|
||||
- The current directory contains a `rebar.config` file.
|
||||
- The current directory contains a `erlang.mk` file.
|
||||
|
||||
### Optionen
|
||||
|
||||
| Variable | Standardwert | Beschreibung |
|
||||
| ---------- | ------------ | -------------------------------------------------------- |
|
||||
| `symbol` | `"🖧 "` | The symbol used before displaying the version of Erlang. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Beispiel
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[erlang]
|
||||
symbol = "e "
|
||||
```
|
||||
## Umgebungsvariablen
|
||||
|
||||
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:
|
||||
|
@ -679,7 +703,7 @@ symbol = "🏎💨 "
|
|||
```
|
||||
## Haskell
|
||||
|
||||
The `haskell` module shows the currently installed version of Haskell Stack version. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
The `haskell` module shows the currently installed version of Haskell Stack version. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `stack.yaml`-Datei
|
||||
|
||||
|
@ -731,7 +755,7 @@ disabled = false
|
|||
|
||||
## Java
|
||||
|
||||
Das `java` Modul zeigt die derzeit installierte Version von Java an. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
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
|
||||
|
@ -778,7 +802,7 @@ threshold = 4
|
|||
|
||||
## Julia
|
||||
|
||||
The `julia` module shows the currently installed version of Julia. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
The `julia` module shows the currently installed version of Julia. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- The current directory contains a `Project.toml` file
|
||||
- The current directory contains a `Manifest.toml` file
|
||||
|
@ -788,7 +812,7 @@ The `julia` module shows the currently installed version of Julia. Das Modul wir
|
|||
|
||||
| Variable | Standardwert | Beschreibung |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
|
||||
| `symbol` | `"ஃ "` | The symbol used before displaying the version of Julia. |
|
||||
| `style` | `"bold purple"` | Stil für dieses Modul. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
|
||||
|
@ -798,13 +822,13 @@ The `julia` module shows the currently installed version of Julia. Das Modul wir
|
|||
# ~/.config/starship.toml
|
||||
|
||||
[julia]
|
||||
symbol = "👸 "
|
||||
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`.
|
||||
|
||||
::: tip
|
||||
::: Tipp
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
|
||||
|
@ -857,7 +881,7 @@ Das `memory_usage` Modul zeigt den aktuellen Systemspeicher und die swap-Nutzung
|
|||
|
||||
Standardmäßig wird die swap-Nutzung angezeigt, wenn der gesamte System-swap nicht Null ist.
|
||||
|
||||
::: tip
|
||||
::: Tipp
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
|
||||
|
@ -921,13 +945,14 @@ Das `nix_shell`-Modul zeigt die nix-shell Umgebung an. Das Modul wird angezeigt,
|
|||
|
||||
### Optionen
|
||||
|
||||
| Variable | Standardwert | Beschreibung |
|
||||
| ------------ | ------------ | ---------------------------------- |
|
||||
| `use_name` | `false` | Namen der nix-Shell anzeigen. |
|
||||
| `impure_msg` | `"impure"` | Passt die "impure"-Nachricht an. |
|
||||
| `pure_msg` | `"pure"` | Passt die "pure"-Nachricht an. |
|
||||
| `style` | `"bold red"` | Stil für dieses Modul. |
|
||||
| `disabled` | `false` | Deaktiviert das `nix_shell`-Modul. |
|
||||
| Variable | Standardwert | Beschreibung |
|
||||
| ------------ | ------------- | ------------------------------------------------- |
|
||||
| `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` | Deaktiviert das `nix_shell`-Modul. |
|
||||
|
||||
### Beispiel
|
||||
|
||||
|
@ -939,11 +964,12 @@ disabled = true
|
|||
use_name = true
|
||||
impure_msg = "impure shell"
|
||||
pure_msg = "pure shell"
|
||||
symbol = "☃️ "
|
||||
```
|
||||
|
||||
## NodeJS
|
||||
|
||||
Das `nodejs` Modul zeigt die derzeit installierte Version von NodeJS. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
Das `nodejs`-Modul zeigt die aktuell installierte Version von NodeJS. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `package.json`-Datei
|
||||
- The current directory contains a `.node-version` file
|
||||
|
@ -969,7 +995,7 @@ symbol = "🤖 "
|
|||
|
||||
## Paketversion
|
||||
|
||||
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`, and `gradle` 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** – 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
|
||||
|
@ -977,16 +1003,18 @@ Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository
|
|||
- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- **gradle** – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- **julia** - The package version is extracted from the `Project.toml` present
|
||||
- **mix** - The `mix` package version is extracted from the `mix.exs` present
|
||||
|
||||
> ⚠️ Die angezeigte Version ist die des Pakets, dessen Quellcode im Verzeichnis liegt, nicht die des Paketmanagers.
|
||||
|
||||
### Optionen
|
||||
|
||||
| Variable | Standardwert | Beschreibung |
|
||||
| ---------- | ------------ | ----------------------------------------------- |
|
||||
| `symbol` | `"📦 "` | Symbol das vor der Paketversion angezeigt wird. |
|
||||
| `style` | `"bold red"` | Stil für dieses Modul. |
|
||||
| `disabled` | `false` | Deaktiviert das `package`-Modul. |
|
||||
| Variable | Standartwert | Beschreibung |
|
||||
| ----------------- | ------------ | --------------------------------------------------------- |
|
||||
| `symbol` | `"📦 "` | Symbol das vor der Paketversion angezeigt wird. |
|
||||
| `style` | `"bold red"` | Stil für dieses Modul. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Deaktiviert das `package`-Modul. |
|
||||
|
||||
### Beispiel
|
||||
|
||||
|
@ -999,7 +1027,7 @@ symbol = "🎁 "
|
|||
|
||||
## PHP
|
||||
|
||||
Das `php`-Modul zeigt die aktuell installierte Version von PHP. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
Das `php`-Modul zeigt die aktuell installierte Version von PHP. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `composer.json`-Datei
|
||||
- The current directory contains a `.php-version` file
|
||||
|
@ -1007,7 +1035,7 @@ Das `php`-Modul zeigt die aktuell installierte Version von PHP. Das Modul wird n
|
|||
|
||||
### Optionen
|
||||
|
||||
| Variable | Standartwert | Beschreibung |
|
||||
| Variable | Standardwert | Beschreibung |
|
||||
| ---------- | ------------ | ---------------------------------------------- |
|
||||
| `symbol` | `"🐘 "` | Symbol das vor der PHP-Version angezeigt wird. |
|
||||
| `style` | `"bold red"` | Stil für dieses Modul. |
|
||||
|
@ -1030,25 +1058,28 @@ Wenn `pyenv_version_name` auf `true` gesetzt ist, wird die version der pyenv ang
|
|||
|
||||
Andernfalls wird die gleiche Versionsnummer angezeigt wie `python --version`, sowie der Name des aktuellen virtualenvs, wenn eines aktiv ist.
|
||||
|
||||
Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- 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
|
||||
- Das aktuelle Verzeichnis enthält eine Datei mit der `.py`-Erweiterung
|
||||
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
|
||||
- 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
|
||||
- Ein virtualenv ist momentan aktiv
|
||||
|
||||
### Optionen
|
||||
|
||||
| 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`) |
|
||||
| `style` | `"bold yellow"` | Stil für dieses Modul. |
|
||||
| `disabled` | `false` | Deaktiviert das `python`-Modul. |
|
||||
| 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. |
|
||||
|
||||
### Beispiel
|
||||
|
||||
|
@ -1088,7 +1119,7 @@ symbol = "🔺 "
|
|||
|
||||
## Rust
|
||||
|
||||
Das `rust` Modul zeigt die derzeit installierte Version von Rust an. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
Das `rust` Modul zeigt die derzeit installierte Version von Rust an. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `Cargo.toml`-Datei
|
||||
- Das aktuelle Verzeichnis enthält eine Datei mit der `.rs`-Erweiterung
|
||||
|
@ -1114,8 +1145,6 @@ symbol = "⚙️ "
|
|||
|
||||
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
|
||||
|
||||
:::
|
||||
|
||||
### Optionen
|
||||
|
||||
| Variable | Standardwert | Beschreibung |
|
||||
|
@ -1138,7 +1167,7 @@ symbol = "📦 "
|
|||
|
||||
## Terraform
|
||||
|
||||
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 nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
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:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `.terraform`-Datei
|
||||
- Das aktuelle Verzeichnis enthält eine Datei mit der `.tf`-Erweiterung
|
||||
|
@ -1161,11 +1190,11 @@ Das `Terraform` Modul zeigt den aktuell ausgewählten terraform Arbeitsbereich u
|
|||
symbol = "🏎💨 "
|
||||
```
|
||||
|
||||
## Uhrzeit
|
||||
## Zeit
|
||||
|
||||
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
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
|
||||
|
@ -1173,15 +1202,15 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
|
|||
|
||||
### Optionen
|
||||
|
||||
| Variable | Standardwert | Beschreibung |
|
||||
| ----------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `use_12hr` | `false` | Aktiviert die Formatierung der Uhrzeit im 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"` | Legt das UTC-Offset fest, das verwendet werden soll. Reicht von -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
|
||||
| `disabled` | `true` | Deaktiviert das `time`-Modul. |
|
||||
| Variable | Standardwert | 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. |
|
||||
|
||||
Wird `use_12hr` auf `true` gestellt, so wird `format` automatisch auf `"%r"` gesetzt. Ansonsten ist der Standardwert hierfür `"%T"`. Wird hingegen `format` gesetzt, so überschreibt dies die Einstellung `use_12hr`.
|
||||
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
|
||||
|
||||
|
@ -1194,23 +1223,23 @@ format = "🕙[ %T ]"
|
|||
utc_time_offset = "-5"
|
||||
```
|
||||
|
||||
## Benutzername
|
||||
## Username
|
||||
|
||||
Das Modul `username` zeigt den Benutzernamen des aktiven Benutzers. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
Das `username` Modul zeigt den Namen des aktiven Benutzers. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- Der aktuelle Benutzer ist root
|
||||
- Der aktuelle Benutzer ist nicht derjenige, der derzeit angemeldet ist
|
||||
- Der Benutzer ist über eine SSH-Sitzung verbunden
|
||||
- Die Variale `show_always` ist auf `true` gesetzt
|
||||
- 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 | Standardwert | Beschreibung |
|
||||
| ------------- | --------------- | --------------------------------- |
|
||||
| `style_root` | `"bold red"` | Stil beim root-Benutzer. |
|
||||
| `style_user` | `"bold yellow"` | Stil bei allen anderen Benutzern. |
|
||||
| `show_always` | `false` | `username`-Modul immer anzeigen. |
|
||||
| `disabled` | `false` | Deaktiviert das `username`-Modul. |
|
||||
| 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
|
||||
|
||||
|
@ -1220,3 +1249,54 @@ Das Modul `username` zeigt den Benutzernamen des aktiven Benutzers. Das Modul wi
|
|||
[username]
|
||||
disabled = true
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
|
||||
These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a file whose name is in `files`
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
|
||||
::: Tipp
|
||||
|
||||
Multiple custom modules can be defined by using a `.`.
|
||||
|
||||
:::
|
||||
|
||||
::: 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.
|
||||
|
||||
:::
|
||||
|
||||
### 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` | | The path to the shell to use to execute the command. If unset, it will fallback to STARSHIP_SHELL and then to "sh". |
|
||||
| `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. |
|
||||
|
||||
### Beispiel
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
|
|
@ -43,3 +43,11 @@ starship prompt --help
|
|||
```
|
||||
|
||||
Die Eingabeaufforderung verwendet so viel Kontext wie möglich, aber keine Flagge ist "notwendig".
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
|
||||
If you get an error like "*version 'GLIBC_2.18' not found (required by starship)*" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<p align="center">
|
||||
<a href="https://starship.rs">Website</a>
|
||||
·
|
||||
<a href="#-installation">Installation</a>
|
||||
<a href="#🚀-installation">Installation</a>
|
||||
·
|
||||
<a href="https://starship.rs/config/">Konfiguration</a>
|
||||
</p>
|
||||
|
@ -115,6 +115,8 @@
|
|||
<a href="https://starship.rs/"><strong>Explore the Starship docs ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
### Voraussetzungen
|
||||
|
@ -250,7 +252,7 @@ Support this project with your organization. Your logo will show up here with a
|
|||
|
||||
## 💭 Inspiriert durch
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
Checkt bitte diese älteren Projekte, die das Entstehen von Starhip inspiriert haben. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Ein ZSH-Prompt für Astronauten.
|
||||
|
||||
|
@ -260,9 +262,9 @@ Please check out these previous works that helped inspire the creation of starsh
|
|||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship Raketen Icon">
|
||||
</p>
|
||||
|
||||
## 📝 Lizenz
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> Unter der [ISC](https://github.com/starship/starship/blob/master/LICENSE) Lizens.
|
||||
|
|
|
@ -26,21 +26,39 @@ discharging_symbol = ""
|
|||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[docker]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
home: true
|
||||
heroImage: /logo.svg
|
||||
heroText:
|
||||
tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
|
||||
tagline: El símbolo de sistema minimalista, ultrarápido e infinitamente customizable para cualquier intérprete de comandos.
|
||||
actionText: Empezar →
|
||||
actionLink: ./guide/
|
||||
features:
|
||||
|
@ -17,8 +17,8 @@ features:
|
|||
details: Puedes personalizar cada pequeño detalle a tu gusto, de manera que puedes tener una interfaz minimalista o rica en funcionalidades.
|
||||
footer: Bajo una licencia ISC | Derechos de autor © 2019-presente Colaboradores de Starship
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
|
||||
metaTitle: "Starship: el indicador de comando multi-intérprete"
|
||||
description: Starship es el símbolo de sistema minimalista, ultrarápido e infinitamente customizable para cualquier intérprete de comandos. Muestra la información que necesitas, a la par que es elegante y minimalista. Instalación rápida disponible para Bash, Fish, ZSH, Ion y PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
|
|
|
@ -59,7 +59,7 @@ precmd_functions+=(set_win_title)
|
|||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zsrhc`) to make it permanent.
|
||||
|
||||
## Style Strings
|
||||
## Dar estilo a cadenas de texto
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -10,36 +10,44 @@
|
|||
- **Configuración**: [archivos de configuración de matchai](https://github.com/matchai/dotfiles/blob/master/.config/fish/config.fish)
|
||||
- **Prompt**: [Starship](https://starship.rs/)
|
||||
|
||||
## Do `prompt_order` and `<module>.disabled` do the same thing?
|
||||
## ¿`prompt_order` y `<module>.disabled` hacen lo mismo?
|
||||
|
||||
Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `<module>.disabled` is the preferred way to do so for these reasons:
|
||||
Sí, se pueden usar ambos para desactivar los módulos en el símbolo del sistema. Si todo lo que planeas es desactivar módulos, `<module>.disabled` es el método preferido por las siguientes razones:
|
||||
|
||||
- Disabling modules is more explicit than omitting them from the prompt_order
|
||||
- Newly created modules will be added to the prompt as Starship is updated
|
||||
- Es más evidente desactivar módulos que omitirlos usando prompt_order
|
||||
- Los nuevos módulos se añadirán al símbolo del sistema en cuanto Starship se actualice
|
||||
|
||||
## The docs say Starship is cross-shell, but it doesn't support X shell. Why?
|
||||
## La documentación dice que Starship es compatible con cualquier intérprete de comandos pero no soporta X Shell. ¿Por qué?
|
||||
|
||||
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
|
||||
Por la forma en que Starshp está construído, debería ser posible añadir soporte para prácticamente cualquier intérprete de comandos. El binario de Starship es sin estado y agnóstico, por lo que mientras que tu intérprete de comandos se pueda ampliar y soporte la personalización del símbolo del sistema, puede utilizar Starship.
|
||||
|
||||
Here's a small example getting Starship working with bash:
|
||||
Aquí tienes un pequeño ejemplo haciendo que Starship funcione con bash:
|
||||
|
||||
```sh
|
||||
# Get the status code from the last command executed
|
||||
# Obtener el código de estado del último comando ejecutado
|
||||
STATUS=$?
|
||||
|
||||
# Get the number of jobs running.
|
||||
# Calcula el número de tareas ejecutándose.
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
# Actualiza el símbolo del sistema para mostrar la salida de `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
La [implementación de Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash) en Starship es sensíblemente is ligeramente más compleja para permitir características avanzadas como [el módulo de duración de comando](https://starship.rs/config/#Command-Duration) y para asegurar que Starship es compatible con las configuraciones preinstaladas de Bash.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
Para obtener una lista de todos los parámetros aceptados por `el símbolo del sistema starship`, usa el siguiente comando:
|
||||
|
||||
```sh
|
||||
starship prompt --help
|
||||
```
|
||||
|
||||
The prompt will use as much context as is provided, but no flags are "required".
|
||||
El símbolo de sistema usará tanto contexto como le proveas, pero no hay parámetros "obligatorios".
|
||||
|
||||
## ¿Cómo lanzo Starship en distribuciones Linux con versiones antiguas de glibc?
|
||||
|
||||
Si obtienes un error como "*version 'GLIBC_2.18' not found (required by starship)*" al usar el binario precompilado (por ejemplo, en CentOS 6 o 7), puedes usar el binario compilado con `musl` en vez de `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter" /></a>
|
||||
alt="Sigue a @StarshipPrompt en Twitter" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs">Sitio</a>
|
||||
<a href="https://starship.rs">Web</a>
|
||||
·
|
||||
<a href="#-installation">Instalación</a>
|
||||
<a href="#🚀-installation">Instalación</a>
|
||||
·
|
||||
<a href="https://starship.rs/config/">Configuration</a>
|
||||
</p>
|
||||
|
@ -101,20 +101,22 @@
|
|||
align="right" />
|
||||
|
||||
|
||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
||||
**El símbolo del sistema minimalista, ultrarápido e infinitamente customizable para cualquier intérprete de comandos!**
|
||||
|
||||
|
||||
- **Fast:** it's fast – _really really_ fast! 🚀
|
||||
- **Customizable:** configure every aspect of your prompt.
|
||||
- **Universal:** works on any shell, on any operating system.
|
||||
- **Intelligent:** shows relevant information at a glance.
|
||||
- **Feature rich:** support for all your favorite tools.
|
||||
- **Easy:** quick to install – start using it in minutes.
|
||||
- **Rápido:** es rápido – _muy muy_ rápido! 🚀
|
||||
- **Customizable:** configura cada parte de tu intérprete de comandos.
|
||||
- **Universal:** funciona en cualquier símbolo del sistema, en cualquier sistema operativo.
|
||||
- **Inteligente:** muestra información relevante de un vistazo.
|
||||
- **Repleto de funciones**: con soporte para tus herramientas favoritas.
|
||||
- **Fácil de instalar**: empieza a usarlo en pocos minutos.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/"><strong>Explore the Starship docs ▶</strong></a>
|
||||
<a href="https://starship.rs/"><strong>Explora la documentación de Starship </strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 Instalacíon
|
||||
|
||||
### Prerequisitos
|
||||
|
@ -129,14 +131,14 @@
|
|||
#### Instalar la última versión
|
||||
|
||||
|
||||
##### From prebuilt binary, with Shell:
|
||||
##### Desde un binario, con Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
```
|
||||
|
||||
|
||||
##### From source on [crates.io](https://crates.io/):
|
||||
##### Con [crates.io](https://crates.io/):
|
||||
|
||||
```sh
|
||||
cargo install starship
|
||||
|
@ -220,22 +222,22 @@
|
|||
|
||||
Si quiere ayudar a colaborar a starship, por favor mira a nuestra [Guía de Colaboradores](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) (Contributing Guide). Además, juntarse con nosotros en nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y di "¡hola!". 👋
|
||||
|
||||
### Code Contributors
|
||||
### Desarrolladores
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
||||
Este proyecto existe gracias a todas las personas que han ayudado. [[Contribuir](CONTRIBUTING.md)].
|
||||
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
### Financial Contributors
|
||||
### Financiadores
|
||||
|
||||
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
Invierte y ayúdanos a mantener nuestra comunidad. [[Contribuir](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Individuals
|
||||
#### Personas
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organizations
|
||||
#### Organizaciones
|
||||
|
||||
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
Apoya este proyecto con tu organización. Vuestro logo se mostrará aquí con un enlace a vuestra web. [[Contribuir](https://opencollective.com/starship/contribute)]
|
||||
|
||||
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
|
||||
|
@ -248,9 +250,9 @@ Support this project with your organization. Your logo will show up here with a
|
|||
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
|
||||
|
||||
## 💭 Inspiracíon
|
||||
## 💭 Inspiración
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
Aquí tienes algunos de los trabajos previos que ayudaron a crear starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Una prompt Zsh para astronautas.
|
||||
|
||||
|
@ -260,9 +262,9 @@ Please check out these previous works that helped inspire the creation of starsh
|
|||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Icono de Starship">
|
||||
</p>
|
||||
|
||||
## 📝 Licencia
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
||||
Copyright © 2019-actualidad, [Creadores de Starship](https://github.com/starship/starship/graphs/contributors).<br /> Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE).
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
# Presets
|
||||
# Preajustes
|
||||
|
||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
||||
Aqui tienes una colección de preajustes creados por la comunidad de Starship. Si quieres compartir un ajuste predefinido, por favor, [envía un PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) para actualizar este fichero. 😊
|
||||
|
||||
## Nerd Font Symbols
|
||||
## Símbolos de la fuente Nerd
|
||||
|
||||
This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye!
|
||||
Este ajuste predefinido no modifica nada excepto los símbolos usados para cada módulo. Si los emojis no son lo tuyo, ¡presta atención!
|
||||
|
||||
![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png)
|
||||
![Capturas de pantalla obtenidas de Nerd Font](/presets/nerd-font-symbols.png)
|
||||
|
||||
### Prerequisitos
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
- Una [fuente Nerd](https://www.nerdfonts.com/) instalada y funcionando en tu terminal (el ejemplo usa Fira Code)
|
||||
|
||||
### Configuración
|
||||
|
||||
|
@ -26,21 +26,39 @@ discharging_symbol = ""
|
|||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[docker]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ prompt_order = [
|
|||
"dotnet",
|
||||
"elixir",
|
||||
"elm",
|
||||
"erlang",
|
||||
"golang",
|
||||
"haskell",
|
||||
"java",
|
||||
|
@ -120,6 +121,7 @@ prompt_order = [
|
|||
"env_var",
|
||||
"crystal",
|
||||
"cmd_duration",
|
||||
"custom",
|
||||
"line_break",
|
||||
"jobs",
|
||||
"battery",
|
||||
|
@ -482,6 +484,28 @@ The `elm` module shows the currently installed version of Elm. Le module est aff
|
|||
symbol = " "
|
||||
```
|
||||
|
||||
## Erlang
|
||||
|
||||
The `erlang` module shows the currently installed version of Erlang/OTP. Le module est affiché si l'une des ces conditions est remplie :
|
||||
|
||||
- The current directory contains a `rebar.config` file.
|
||||
- The current directory contains a `erlang.mk` file.
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | ------- | -------------------------------------------------------- |
|
||||
| `symbol` | `"🖧 "` | The symbol used before displaying the version of Erlang. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Exemple
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[erlang]
|
||||
symbol = "e "
|
||||
```
|
||||
## 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:
|
||||
|
@ -788,7 +812,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. |
|
||||
| `symbol` | `"ஃ "` | The symbol used before displaying the version of Julia. |
|
||||
| `style` | `"bold purple"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
|
||||
|
@ -798,7 +822,7 @@ The `julia` module shows the currently installed version of Julia. Le module est
|
|||
# ~/.config/starship.toml
|
||||
|
||||
[julia]
|
||||
symbol = "👸 "
|
||||
symbol = "∴ "
|
||||
```
|
||||
## Kubernetes
|
||||
|
||||
|
@ -921,13 +945,14 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
|
|||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ------------ | -------------- | ---------------------------------- |
|
||||
| `use_name` | `false` | Display the name of the nix-shell. |
|
||||
| `impure_msg` | `"impure"` | Customize the "impure" msg. |
|
||||
| `pure_msg` | `"pure"` | Customize the "pure" msg. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nix_shell` module. |
|
||||
| Variable | Default | Description |
|
||||
| ------------ | ------------- | ------------------------------------------------- |
|
||||
| `use_name` | `false` | Display the name of the nix-shell. |
|
||||
| `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. |
|
||||
| `disabled` | `false` | Disables the `nix_shell` module. |
|
||||
|
||||
### Exemple
|
||||
|
||||
|
@ -939,6 +964,7 @@ disabled = true
|
|||
use_name = true
|
||||
impure_msg = "impure shell"
|
||||
pure_msg = "pure shell"
|
||||
symbol = "☃️ "
|
||||
```
|
||||
|
||||
## NodeJS
|
||||
|
@ -969,7 +995,7 @@ 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`, and `gradle` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` 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
|
||||
|
@ -977,16 +1003,18 @@ The `package` module is shown when the current directory is the repository for a
|
|||
- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- **gradle** – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- **julia** - The package version is extracted from the `Project.toml` present
|
||||
- **mix** - The `mix` package version is extracted from the `mix.exs` present
|
||||
|
||||
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | -------------- | ---------------------------------------------------------- |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| Variable | Default | Description |
|
||||
| ----------------- | -------------- | ---------------------------------------------------------- |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Exemple
|
||||
|
||||
|
@ -1035,9 +1063,11 @@ Le module est affiché si l'une des ces conditions est remplie :
|
|||
- The current directory contains a `.python-version` file
|
||||
- The current directory contains a `requirements.txt` file
|
||||
- The current directory contains a `pyproject.toml` file
|
||||
- The current directory contains a file with the `.py` extension
|
||||
- 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
|
||||
- The current directory contains a `__init__.py` file
|
||||
- A virtual environment is currently activated
|
||||
|
||||
### Options
|
||||
|
@ -1047,6 +1077,7 @@ Le module est affiché si l'une des ces conditions est remplie :
|
|||
| `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"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
|
@ -1095,7 +1126,7 @@ The `rust` module shows the currently installed version of Rust. Le module est a
|
|||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| Variable | Défault | Description |
|
||||
| ---------- | -------------- | ------------------------------------------------------ |
|
||||
| `symbol` | `"🦀 "` | The symbol used before displaying the version of Rust. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
|
@ -1114,11 +1145,9 @@ symbol = "⚙️ "
|
|||
|
||||
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Défault | Description |
|
||||
| Variable | Défaut | Description |
|
||||
| ---------- | -------------------- | ------------------------------------------------ |
|
||||
| `label` | `""` | Prefix before the image name display. |
|
||||
| `prefix` | `"["` | Prefix to display immediately before image name. |
|
||||
|
@ -1145,7 +1174,7 @@ The `terraform` module shows the currently selected terraform workspace and vers
|
|||
|
||||
### Options
|
||||
|
||||
| Variable | Défaut | Description |
|
||||
| Variable | Default | Description |
|
||||
| -------------- | ------------ | ----------------------------------------------------------- |
|
||||
| `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. |
|
||||
| `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. |
|
||||
|
@ -1220,3 +1249,54 @@ Le module `username` affiche le nom d'utilisateur de l'utilisateur actif. Le mod
|
|||
[username]
|
||||
disabled = true
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
|
||||
These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a file whose name is in `files`
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
|
||||
::: tip
|
||||
|
||||
Multiple custom modules can be defined by using a `.`.
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
|
||||
The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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` | | The path to the shell to use to execute the command. If unset, it will fallback to STARSHIP_SHELL and then to "sh". |
|
||||
| `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"` | The style for the 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. |
|
||||
|
||||
### Exemple
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
|
|
@ -43,3 +43,11 @@ starship prompt --help
|
|||
```
|
||||
|
||||
L'invite de commande utilisera toutes les données contextuelles fournies, mais aucun indicateur n'est "requis".
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
|
||||
If you get an error like "*version 'GLIBC_2.18' not found (required by starship)*" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<p align="center">
|
||||
<a href="https://starship.rs">Site web</a>
|
||||
·
|
||||
<a href="#-installation">Installation</a>
|
||||
<a href="#🚀-installation">Installation</a>
|
||||
·
|
||||
<a href="https://starship.rs/config/">Configuration</a>
|
||||
</p>
|
||||
|
@ -115,6 +115,8 @@
|
|||
<a href="https://starship.rs/"><strong>Consulter la documentation de Starship ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
### Pré-requis
|
||||
|
@ -250,7 +252,7 @@ Support this project with your organization. Your logo will show up here with a
|
|||
|
||||
## 💭Inspiré par
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
Voyez ces travaux précédents qui ont contribué à inspirer la création de vaisseau. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un ZSH prompt pour les astronautes.
|
||||
|
||||
|
@ -260,9 +262,9 @@ Please check out these previous works that helped inspire the creation of starsh
|
|||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Icône de fusée de Starship">
|
||||
</p>
|
||||
|
||||
## 📝 License
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
||||
Copyright © 2019-présent, [Contributeurs Starship](https://github.com/starship/starship/graphs/contributors).<br /> Ce projet est sous licence[ISC](https://github.com/starship/starship/blob/master/LICENSE).
|
||||
|
|
|
@ -26,21 +26,39 @@ discharging_symbol = ""
|
|||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[docker]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ prompt_order = [
|
|||
"dotnet",
|
||||
"elixir",
|
||||
"elm",
|
||||
"erlang",
|
||||
"golang",
|
||||
"haskell",
|
||||
"java",
|
||||
|
@ -120,6 +121,7 @@ prompt_order = [
|
|||
"env_var",
|
||||
"crystal",
|
||||
"cmd_duration",
|
||||
"custom",
|
||||
"line_break",
|
||||
"jobs",
|
||||
"battery",
|
||||
|
@ -482,6 +484,28 @@ symbol = "🔮 "
|
|||
symbol = " "
|
||||
```
|
||||
|
||||
## Erlang
|
||||
|
||||
The `erlang` module shows the currently installed version of Erlang/OTP. 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
|
||||
- The current directory contains a `rebar.config` file.
|
||||
- The current directory contains a `erlang.mk` file.
|
||||
|
||||
### オプション
|
||||
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| ---------- | ------- | -------------------------------------------------------- |
|
||||
| `symbol` | `"🖧 "` | The symbol used before displaying the version of Erlang. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### 設定例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[erlang]
|
||||
symbol = "e "
|
||||
```
|
||||
## 環境変数
|
||||
|
||||
`env_var`モジュールは、選択された環境変数の現在の値を表示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
|
@ -742,7 +766,7 @@ disabled = false
|
|||
| ---------- | -------------- | --------------------------- |
|
||||
| `symbol` | `"☕ "` | Javaのバージョンを表示する前に使用される記号です。 |
|
||||
| `style` | `"dimmed red"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | `Java`モジュールを無効にします。 |
|
||||
| `disabled` | `false` | `java`モジュールを無効にします。 |
|
||||
|
||||
### 設定例
|
||||
|
||||
|
@ -778,19 +802,19 @@ threshold = 4
|
|||
|
||||
## Julia
|
||||
|
||||
The `julia` module shows the currently installed version of Julia. 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
`julia`モジュールは、現在インストールされているJuliaのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
|
||||
- The current directory contains a `Project.toml` file
|
||||
- The current directory contains a `Manifest.toml` file
|
||||
- The current directory contains a file with the `.jl` extension
|
||||
- カレントディレクトリに`Project.toml`ファイルが含まれている
|
||||
- カレントディレクトリに`Manifest.toml`ファイルが含まれている
|
||||
- カレントディレクトリに`.jl`の拡張子のファイルが含まれている
|
||||
|
||||
### オプション
|
||||
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
|
||||
| `style` | `"bold purple"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| ---------- | --------------- | ---------------------------- |
|
||||
| `symbol` | `"ஃ "` | Juliaのバージョンを表示する前に使用される記号です。 |
|
||||
| `style` | `"bold purple"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | `julia`モジュールを無効にします。 |
|
||||
|
||||
### 設定例
|
||||
|
||||
|
@ -798,7 +822,7 @@ The `julia` module shows the currently installed version of Julia. 次の条件
|
|||
# ~/.config/starship.toml
|
||||
|
||||
[julia]
|
||||
symbol = "👸 "
|
||||
symbol = "∴ "
|
||||
```
|
||||
## Kubernetes
|
||||
|
||||
|
@ -853,13 +877,14 @@ disabled = true
|
|||
|
||||
## メモリ使用量
|
||||
|
||||
`memory_usage`モジュールは、現在のシステムメモリとスワップ使用量を示します。
|
||||
`memory_usage</ 0>モジュールは、現在のシステムメモリとスワップ使用量を示します。</p>
|
||||
|
||||
デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。
|
||||
<p spaces-before="0">デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。</p>
|
||||
|
||||
::: tip
|
||||
<p spaces-before="0">::: tip</p>
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
<p spaces-before="0">このモジュールはデフォルトで無効になっています。
|
||||
有効にするには、設定ファイルで<code>disabled`を`false`に設定します。
|
||||
|
||||
:::
|
||||
|
||||
|
@ -921,13 +946,14 @@ truncation_symbol = ""
|
|||
|
||||
### オプション
|
||||
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| ------------ | ------------ | ------------------------ |
|
||||
| `use_name` | `false` | nix-shellの名前を表示します。 |
|
||||
| `impure_msg` | `"impure"` | impureメッセージをカスタマイズします。 |
|
||||
| `pure_msg` | `"pure"` | pureメッセージをカスタマイズします。 |
|
||||
| `style` | `"bold red"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | `nix_shell`モジュールを無効にします。 |
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| ------------ | ------------- | ------------------------------------------------- |
|
||||
| `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` | `nix_shell`モジュールを無効にします。 |
|
||||
|
||||
### 設定例
|
||||
|
||||
|
@ -939,6 +965,7 @@ disabled = true
|
|||
use_name = true
|
||||
impure_msg = "impure shell"
|
||||
pure_msg = "pure shell"
|
||||
symbol = "☃️ "
|
||||
```
|
||||
|
||||
## NodeJS
|
||||
|
@ -969,7 +996,7 @@ symbol = "🤖 "
|
|||
|
||||
## パッケージのバージョン
|
||||
|
||||
`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, and `gradle` packages.
|
||||
`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` packages.
|
||||
|
||||
- **npm** – `npm`パッケージバージョンは、現在のディレクトリにある`package.json`から抽出されます
|
||||
- **cargo** – `cargo`パッケージバージョンは、現在のディレクトリにある`Cargo.toml`から抽出されます。
|
||||
|
@ -977,16 +1004,18 @@ symbol = "🤖 "
|
|||
- **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
|
||||
|
||||
> ⚠️ 表示されるバージョンは、パッケージマネージャーではなく、ソースコードが現在のディレクトリにあるパッケージのバージョンです。
|
||||
|
||||
### オプション
|
||||
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| ---------- | ------------ | ---------------------------- |
|
||||
| `symbol` | `"📦 "` | パッケージのバージョンを表示する前に使用される記号です。 |
|
||||
| `style` | `"bold red"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | `package`モジュールを無効にします。 |
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| ----------------- | ------------ | --------------------------------------------------------- |
|
||||
| `symbol` | `"📦 "` | パッケージのバージョンを表示する前に使用される記号です。 |
|
||||
| `style` | `"bold red"` | モジュールのスタイルです。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | `package` モジュールを無効にします。 |
|
||||
|
||||
### 設定例
|
||||
|
||||
|
@ -1035,20 +1064,23 @@ symbol = "🔹 "
|
|||
- カレントディレクトリに`.python-version`ファイルが含まれている
|
||||
- カレントディレクトリに`requirements.txt`ファイルが含まれている
|
||||
- カレントディレクトリに`pyproject.toml`ファイルが含まれている
|
||||
- カレントディレクトリに`.py`の拡張子のファイルが含まれている
|
||||
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
|
||||
- カレントディレクトリに`Pipfile`ファイルが含まれている
|
||||
- カレントディレクトリに`tox.ini`ファイルが含まれている
|
||||
- カレントディレクトリに`setup.py`ファイルが含まれている
|
||||
- The current directory contains a `__init__.py` file
|
||||
- 仮想環境がアクティブである
|
||||
|
||||
### オプション
|
||||
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| -------------------- | --------------- | ---------------------------------------------------- |
|
||||
| `symbol` | `"🐍 "` | Pythonのバージョンを表示する前に使用される記号です。 |
|
||||
| `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します |
|
||||
| `pyenv_prefix` | `"pyenv "` | pyenvバージョン表示の前のprefix(デフォルトの表示は`pyenv MY_VERSION`)です |
|
||||
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | `python`モジュールを無効にします。 |
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| -------------------- | --------------- | -------------------------------------------------------------------------- |
|
||||
| `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`モジュールを無効にします。 |
|
||||
|
||||
### 設定例
|
||||
|
||||
|
@ -1114,8 +1146,6 @@ symbol = "⚙️ "
|
|||
|
||||
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
|
||||
|
||||
:::
|
||||
|
||||
### オプション
|
||||
|
||||
| 変数 | デフォルト | 説明 |
|
||||
|
@ -1209,8 +1239,8 @@ utc_time_offset = "-5"
|
|||
| ------------- | --------------- | ------------------------- |
|
||||
| `style_root` | `"bold red"` | ユーザーがrootのときに使用されるスタイルです。 |
|
||||
| `style_user` | `"bold yellow"` | 非rootユーザーに使用されるスタイルです。 |
|
||||
| `show_always` | `false` | `username`モジュールを常に表示します。 |
|
||||
| `disabled` | `false` | `username`モジュールを無効にします。 |
|
||||
| `show_always` | `false` | `username` モジュールを常に表示します。 |
|
||||
| `disabled` | `false` | `username` モジュールを無効にします。 |
|
||||
|
||||
### 設定例
|
||||
|
||||
|
@ -1220,3 +1250,54 @@ utc_time_offset = "-5"
|
|||
[username]
|
||||
disabled = true
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
|
||||
These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a file whose name is in `files`
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
|
||||
::: tip
|
||||
|
||||
Multiple custom modules can be defined by using a `.`.
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
|
||||
The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
|
||||
|
||||
:::
|
||||
|
||||
### オプション
|
||||
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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` | | The path to the shell to use to execute the command. If unset, it will fallback to STARSHIP_SHELL and then to "sh". |
|
||||
| `説明` | `"<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"` | モジュールのスタイルです。 |
|
||||
| `prefix` | `""` | Prefix to display immediately before the command output. |
|
||||
| `suffix` | `""` | Suffix to display immediately after the command output. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
|
||||
### 設定例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
|
|
@ -43,3 +43,11 @@ starship prompt --help
|
|||
```
|
||||
|
||||
プロンプトは提供されているコンテキストを使用しますが、フラグは「必須」ではありません。
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
|
||||
If you get an error like "*version 'GLIBC_2.18' not found (required by starship)*" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/ja/">ウェブサイト</a>
|
||||
<a href="https://starship.rs">Website</a>
|
||||
·
|
||||
<a href="#-インストール">インストール</a>
|
||||
<a href="#🚀-installation">Installation</a>
|
||||
·
|
||||
<a href="https://starship.rs/ja/config/">設定</a>
|
||||
<a href="https://starship.rs/config/">Configuration</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
|
@ -115,6 +115,8 @@
|
|||
<a href="https://starship.rs/"><strong>Starshipのドキュメントを見る ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 インストール
|
||||
|
||||
### 必要なもの
|
||||
|
@ -250,7 +252,7 @@ Support this project with your organization. Your logo will show up here with a
|
|||
|
||||
## 💭影響を受けたプロダクト
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
よければStarship の作成に影響を与えた、これまでのプロジェクトをチェックしてください 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 宇宙飛行士のための ZSH プロンプト。
|
||||
|
||||
|
@ -265,4 +267,4 @@ Please check out these previous works that helped inspire the creation of starsh
|
|||
|
||||
## 📝 ライセンス
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> このプロジェクトは [ISC](https://github.com/starship/starship/blob/master/LICENSE) でライセンスされています。
|
||||
|
|
|
@ -26,21 +26,39 @@ discharging_symbol = ""
|
|||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[docker]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
|
|
|
@ -0,0 +1,114 @@
|
|||
---
|
||||
home: true
|
||||
heroImage: /logo.svg
|
||||
heroText:
|
||||
tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
|
||||
actionText: Get Started →
|
||||
actionLink: ./guide/
|
||||
features:
|
||||
-
|
||||
title: Compatibility First
|
||||
details: Works on the most common shells on the most common operating systems. Use it everywhere!
|
||||
-
|
||||
title: Rust-Powered
|
||||
details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.
|
||||
-
|
||||
title: Customizable
|
||||
details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be.
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
<video class="demo-video" muted autoplay loop playsinline>
|
||||
<source src="/demo.webm" type="video/webm">
|
||||
<source src="/demo.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Install the **starship** binary:
|
||||
|
||||
|
||||
#### Install Latest Version
|
||||
|
||||
With Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
```
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
|
||||
With [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
|
||||
With [Scoop](https://scoop.sh):
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
1. Add the init script to your shell's config file:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
|
||||
#### Fish
|
||||
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
|
||||
#### Zsh
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
|
||||
Add the following to the end of `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix):
|
||||
|
||||
```sh
|
||||
# ~\Documents\PowerShell\Profile.ps1
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
|
||||
#### Ion
|
||||
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
|
@ -0,0 +1,84 @@
|
|||
# Advanced Configuration
|
||||
|
||||
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
|
||||
|
||||
::: warning
|
||||
|
||||
The configurations in this section are subject to change in future releases of Starship.
|
||||
|
||||
:::
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Bash
|
||||
|
||||
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
|
||||
}
|
||||
```
|
||||
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zsrhc`) to make it permanent.
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string, so that e.g. `fg:red none fg:blue` will still create a string with no styling. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,53 @@
|
|||
# FAQ
|
||||
|
||||
## What is the configuration used in the demo GIF?
|
||||
|
||||
- **Terminal Emulator**: [iTerm2](https://iterm2.com/)
|
||||
- **Theme**: Minimal
|
||||
- **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **Font**: [Fira Code](https://github.com/tonsky/FiraCode)
|
||||
- **Shell**: [Fish Shell](https://fishshell.com/)
|
||||
- **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/master/.config/fish/config.fish)
|
||||
- **Prompt**: [Starship](https://starship.rs/)
|
||||
|
||||
## Do `prompt_order` and `<module>.disabled` do the same thing?
|
||||
|
||||
Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `<module>.disabled` is the preferred way to do so for these reasons:
|
||||
|
||||
- Disabling modules is more explicit than omitting them from the prompt_order
|
||||
- Newly created modules will be added to the prompt as Starship is updated
|
||||
|
||||
## The docs say Starship is cross-shell, but it doesn't support X shell. Why?
|
||||
|
||||
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
|
||||
|
||||
Here's a small example getting Starship working with bash:
|
||||
|
||||
```sh
|
||||
# Get the status code from the last command executed
|
||||
STATUS=$?
|
||||
|
||||
# Get the number of jobs running.
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
```sh
|
||||
starship prompt --help
|
||||
```
|
||||
|
||||
The prompt will use as much context as is provided, but no flags are "required".
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
|
||||
If you get an error like "*version 'GLIBC_2.18' not found (required by starship)*" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
|
@ -0,0 +1,270 @@
|
|||
<p align="center">
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status" /></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version" /></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
alt="Packaging status" /></a
|
||||
><br />
|
||||
<a href="https://discord.gg/8Jzqu3T"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Chat on Discord" /></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs">Website</a>
|
||||
·
|
||||
<a href="#🚀-installation">Installation</a>
|
||||
·
|
||||
<a href="https://starship.rs/config/">Configuration</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/blob/master/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
|
||||
<a href="https://translate.starship.rs/project/starship-prompt/es"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
|
||||
<a href="https://translate.starship.rs/project/starship-prompt/fr"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
|
||||
<img
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right" />
|
||||
|
||||
|
||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
||||
|
||||
|
||||
- **Fast:** it's fast – _really really_ fast! 🚀
|
||||
- **Customizable:** configure every aspect of your prompt.
|
||||
- **Universal:** works on any shell, on any operating system.
|
||||
- **Intelligent:** shows relevant information at a glance.
|
||||
- **Feature rich:** support for all your favorite tools.
|
||||
- **Easy:** quick to install – start using it in minutes.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/"><strong>Explore the Starship docs ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Powerline font](https://github.com/powerline/fonts) installed and enabled in your terminal (for example, try [Fira Code](https://github.com/tonsky/FiraCode)).
|
||||
|
||||
### Getting Started
|
||||
|
||||
1. Install the **starship** binary:
|
||||
|
||||
|
||||
#### Install Latest Version
|
||||
|
||||
|
||||
##### From prebuilt binary, with Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
```
|
||||
|
||||
|
||||
##### From source on [crates.io](https://crates.io/):
|
||||
|
||||
```sh
|
||||
cargo install starship
|
||||
```
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
|
||||
|
||||
##### With [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
|
||||
|
||||
##### With [Scoop](https://scoop.sh):
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
1. Add the init script to your shell's config file:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
|
||||
#### Fish
|
||||
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
|
||||
#### Zsh
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
|
||||
#### PowerShell
|
||||
|
||||
Add the following to the end of `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix):
|
||||
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
|
||||
#### Ion
|
||||
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
|
||||
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
|
||||
|
||||
### Code Contributors
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
||||
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
### Financial Contributors
|
||||
|
||||
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Individuals
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organizations
|
||||
|
||||
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
|
||||
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/2/website"><img src="https://opencollective.com/starship/organization/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/3/website"><img src="https://opencollective.com/starship/organization/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/4/website"><img src="https://opencollective.com/starship/organization/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/5/website"><img src="https://opencollective.com/starship/organization/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/6/website"><img src="https://opencollective.com/starship/organization/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/7/website"><img src="https://opencollective.com/starship/organization/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
|
||||
|
||||
## 💭 Inspired By
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
</p>
|
||||
|
||||
## 📝 License
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
|
@ -0,0 +1,79 @@
|
|||
# Presets
|
||||
|
||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
||||
|
||||
## Nerd Font Symbols
|
||||
|
||||
This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye!
|
||||
|
||||
![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[battery]
|
||||
full_symbol = ""
|
||||
charging_symbol = ""
|
||||
discharging_symbol = ""
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[docker]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
```
|
|
@ -0,0 +1,114 @@
|
|||
---
|
||||
home: true
|
||||
heroImage: /logo.svg
|
||||
heroText:
|
||||
tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
|
||||
actionText: Get Started →
|
||||
actionLink: ./guide/
|
||||
features:
|
||||
-
|
||||
title: Compatibility First
|
||||
details: Works on the most common shells on the most common operating systems. Use it everywhere!
|
||||
-
|
||||
title: Rust-Powered
|
||||
details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.
|
||||
-
|
||||
title: Customizable
|
||||
details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be.
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
<video class="demo-video" muted autoplay loop playsinline>
|
||||
<source src="/demo.webm" type="video/webm">
|
||||
<source src="/demo.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Install the **starship** binary:
|
||||
|
||||
|
||||
#### Install Latest Version
|
||||
|
||||
With Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
```
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
|
||||
With [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
|
||||
With [Scoop](https://scoop.sh):
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
1. Add the init script to your shell's config file:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
|
||||
#### Fish
|
||||
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
|
||||
#### Zsh
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
|
||||
Add the following to the end of `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix):
|
||||
|
||||
```sh
|
||||
# ~\Documents\PowerShell\Profile.ps1
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
|
||||
#### Ion
|
||||
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
|
@ -0,0 +1,84 @@
|
|||
# Advanced Configuration
|
||||
|
||||
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
|
||||
|
||||
::: warning
|
||||
|
||||
The configurations in this section are subject to change in future releases of Starship.
|
||||
|
||||
:::
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Bash
|
||||
|
||||
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
|
||||
}
|
||||
```
|
||||
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zsrhc`) to make it permanent.
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string, so that e.g. `fg:red none fg:blue` will still create a string with no styling. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,53 @@
|
|||
# FAQ
|
||||
|
||||
## What is the configuration used in the demo GIF?
|
||||
|
||||
- **Terminal Emulator**: [iTerm2](https://iterm2.com/)
|
||||
- **Theme**: Minimal
|
||||
- **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **Font**: [Fira Code](https://github.com/tonsky/FiraCode)
|
||||
- **Shell**: [Fish Shell](https://fishshell.com/)
|
||||
- **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/master/.config/fish/config.fish)
|
||||
- **Prompt**: [Starship](https://starship.rs/)
|
||||
|
||||
## Do `prompt_order` and `<module>.disabled` do the same thing?
|
||||
|
||||
Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `<module>.disabled` is the preferred way to do so for these reasons:
|
||||
|
||||
- Disabling modules is more explicit than omitting them from the prompt_order
|
||||
- Newly created modules will be added to the prompt as Starship is updated
|
||||
|
||||
## The docs say Starship is cross-shell, but it doesn't support X shell. Why?
|
||||
|
||||
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
|
||||
|
||||
Here's a small example getting Starship working with bash:
|
||||
|
||||
```sh
|
||||
# Get the status code from the last command executed
|
||||
STATUS=$?
|
||||
|
||||
# Get the number of jobs running.
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
```sh
|
||||
starship prompt --help
|
||||
```
|
||||
|
||||
The prompt will use as much context as is provided, but no flags are "required".
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
|
||||
If you get an error like "*version 'GLIBC_2.18' not found (required by starship)*" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
|
@ -0,0 +1,270 @@
|
|||
<p align="center">
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status" /></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version" /></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
alt="Packaging status" /></a
|
||||
><br />
|
||||
<a href="https://discord.gg/8Jzqu3T"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Chat on Discord" /></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs">Website</a>
|
||||
·
|
||||
<a href="#🚀-installation">Installation</a>
|
||||
·
|
||||
<a href="https://starship.rs/config/">Configuration</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/blob/master/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
|
||||
<a href="https://translate.starship.rs/project/starship-prompt/es"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
|
||||
<a href="https://translate.starship.rs/project/starship-prompt/fr"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
|
||||
<img
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right" />
|
||||
|
||||
|
||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
||||
|
||||
|
||||
- **Fast:** it's fast – _really really_ fast! 🚀
|
||||
- **Customizable:** configure every aspect of your prompt.
|
||||
- **Universal:** works on any shell, on any operating system.
|
||||
- **Intelligent:** shows relevant information at a glance.
|
||||
- **Feature rich:** support for all your favorite tools.
|
||||
- **Easy:** quick to install – start using it in minutes.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/"><strong>Explore the Starship docs ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Powerline font](https://github.com/powerline/fonts) installed and enabled in your terminal (for example, try [Fira Code](https://github.com/tonsky/FiraCode)).
|
||||
|
||||
### Getting Started
|
||||
|
||||
1. Install the **starship** binary:
|
||||
|
||||
|
||||
#### Install Latest Version
|
||||
|
||||
|
||||
##### From prebuilt binary, with Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
```
|
||||
|
||||
|
||||
##### From source on [crates.io](https://crates.io/):
|
||||
|
||||
```sh
|
||||
cargo install starship
|
||||
```
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
|
||||
|
||||
##### With [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
|
||||
|
||||
##### With [Scoop](https://scoop.sh):
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
1. Add the init script to your shell's config file:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
|
||||
#### Fish
|
||||
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
|
||||
#### Zsh
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
|
||||
#### PowerShell
|
||||
|
||||
Add the following to the end of `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix):
|
||||
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
|
||||
#### Ion
|
||||
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
|
||||
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
|
||||
|
||||
### Code Contributors
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
||||
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
### Financial Contributors
|
||||
|
||||
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Individuals
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organizations
|
||||
|
||||
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
|
||||
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/2/website"><img src="https://opencollective.com/starship/organization/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/3/website"><img src="https://opencollective.com/starship/organization/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/4/website"><img src="https://opencollective.com/starship/organization/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/5/website"><img src="https://opencollective.com/starship/organization/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/6/website"><img src="https://opencollective.com/starship/organization/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/7/website"><img src="https://opencollective.com/starship/organization/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
|
||||
|
||||
## 💭 Inspired By
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
</p>
|
||||
|
||||
## 📝 License
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
|
@ -0,0 +1,79 @@
|
|||
# Presets
|
||||
|
||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
||||
|
||||
## Nerd Font Symbols
|
||||
|
||||
This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye!
|
||||
|
||||
![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[battery]
|
||||
full_symbol = ""
|
||||
charging_symbol = ""
|
||||
discharging_symbol = ""
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[docker]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
```
|
|
@ -103,6 +103,7 @@ prompt_order = [
|
|||
"dotnet",
|
||||
"elixir",
|
||||
"elm",
|
||||
"erlang",
|
||||
"golang",
|
||||
"haskell",
|
||||
"java",
|
||||
|
@ -120,6 +121,7 @@ prompt_order = [
|
|||
"env_var",
|
||||
"crystal",
|
||||
"cmd_duration",
|
||||
"custom",
|
||||
"line_break",
|
||||
"jobs",
|
||||
"battery",
|
||||
|
@ -132,7 +134,7 @@ prompt_order = [
|
|||
|
||||
Модуль `aws` показывает текущий регион и профиль AWS. Основано на `AWS_REGION`, `AWS_DEFAULT_REGION`, и `AWS_PROFILE` переменных окружения и файле`~/.aws/config`.
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
При использовании [aws-vault](https://github.com/99designs/aws-vault) профиль читается из переменной среды `AWS_VAULT`.
|
||||
|
||||
### Опции
|
||||
|
||||
|
@ -369,7 +371,7 @@ style = "bold blue"
|
|||
| `fish_style_pwd_dir_length` | `0` | Количество символов, используемых при использовании логики создания пути из fish. |
|
||||
| `use_logical_path` | `true` | Отображает логический путь от оболочки (`PWD`) вместо пути от ОС. |
|
||||
|
||||
`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>
|
||||
|
||||
|
@ -382,9 +384,9 @@ style = "bold blue"
|
|||
truncation_length = 8
|
||||
```
|
||||
|
||||
## Docker Context
|
||||
## Контекст 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`.
|
||||
|
||||
### Опции
|
||||
|
||||
|
@ -434,16 +436,16 @@ heuristic = false
|
|||
|
||||
## Elixir
|
||||
|
||||
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
Модуль `elixir` показывает установленную версию Elixir и Erlang/OTP. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
|
||||
- Текущий каталог содержит файл `mix.exs`.
|
||||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | ------------ | --------------------------------------------------------------- |
|
||||
| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | ------------ | ------------------------------------------------------------- |
|
||||
| `symbol` | `"💧 "` | Символ, используемый перед отображением версии Elixir/Erlang. |
|
||||
| `disabled` | `false` | Отключает модуль `elixir`. |
|
||||
|
||||
### Пример
|
||||
|
||||
|
@ -456,21 +458,21 @@ symbol = "🔮 "
|
|||
|
||||
## Elm
|
||||
|
||||
The `elm` module shows the currently installed version of Elm. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
Модуль `elm` показывает установленную версию Elm. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
|
||||
- Текущий каталог содержит файл `elm.json`
|
||||
- Текущий каталог содержит файл `elm-package.json`
|
||||
- The current directory contains a `.elm-version` file
|
||||
- The current directory contains a `elm-stuff` folder
|
||||
- The current directory contains a `*.elm` files
|
||||
- Текущий каталог содержит файл `.elm-version`
|
||||
- Текущий каталог содержит папку `elm-stuff`
|
||||
- Текущий каталог содержит файлы `*.elm`
|
||||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | ------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `"🌳 "` | The symbol used before displaying the version of Elm. |
|
||||
| `style` | `"bold cyan"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Disables the `elm` module. |
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | ------------- | --------------------------------------------------- |
|
||||
| `symbol` | `"🌳 "` | Символ, используемый перед отображением версии Elm. |
|
||||
| `style` | `"bold cyan"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `elm`. |
|
||||
|
||||
|
||||
### Пример
|
||||
|
@ -482,6 +484,28 @@ The `elm` module shows the currently installed version of Elm. Модуль бу
|
|||
symbol = " "
|
||||
```
|
||||
|
||||
## Erlang
|
||||
|
||||
The `erlang` module shows the currently installed version of Erlang/OTP. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
|
||||
- The current directory contains a `rebar.config` file.
|
||||
- The current directory contains a `erlang.mk` file.
|
||||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | ------------ | -------------------------------------------------------- |
|
||||
| `symbol` | `"🖧 "` | The symbol used before displaying the version of Erlang. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Пример
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[erlang]
|
||||
symbol = "e "
|
||||
```
|
||||
## Переменная Окружения
|
||||
|
||||
Модуль `env_var` отображает текущее значение выбранной переменной окружения. Модуль будет показан только в том случае, если любое из следующих условий соблюдено:
|
||||
|
@ -542,14 +566,14 @@ truncation_symbol = ""
|
|||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| -------------------- | -------------- | ----------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | Длина отображаемого хэша коммита git. |
|
||||
| `prefix` | `"("` | Префикс, отображаемый сразу после коммита. |
|
||||
| `suffix` | `")"` | Суффикс, отображаемый сразу после коммита git. |
|
||||
| `style` | `"bold green"` | Стиль модуля. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state |
|
||||
| `disabled` | `false` | Отключает модуль `git_commit`. |
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| -------------------- | -------------- | ----------------------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | Длина отображаемого хэша коммита git. |
|
||||
| `prefix` | `"("` | Префикс, отображаемый сразу после коммита. |
|
||||
| `suffix` | `")"` | Суффикс, отображаемый сразу после коммита git. |
|
||||
| `style` | `"bold green"` | Стиль модуля. |
|
||||
| `only_detached` | `true` | Показывать хэш коммита git, только находясь в состоянии отделённой HEAD |
|
||||
| `disabled` | `false` | Отключает модуль `git_commit`. |
|
||||
|
||||
### Пример
|
||||
|
||||
|
@ -703,18 +727,18 @@ symbol = " "
|
|||
|
||||
## Имя хоста
|
||||
|
||||
Модуль `hostname` отображает имя системы (хоста).
|
||||
Модуль `hostname` отображает имя системного хоста.
|
||||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ssh_only` | `true` | Показывать имя хоста только при подключении к SSH-сессии. |
|
||||
| `prefix` | `""` | Префикс, отображаемый непосредственно перед именем хоста. |
|
||||
| `suffix` | `""` | Суффикс, отображаемый непосредственно перед именем хоста. |
|
||||
| `trim_at` | `"."` | Символы, по которую имя хоста будет сокращено после первого совпадения. `"."` остановится после первой точки. `""` отключит любое усечение |
|
||||
| `style` | `"bold dimmed green"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `hostname`. |
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `ssh_only` | `true` | Показывать имя хоста только при подключении к SSH-сессии. |
|
||||
| `prefix` | `""` | Префикс, отображаемый непосредственно перед именем хоста. |
|
||||
| `suffix` | `""` | Суффикс, отображаемый непосредственно перед именем хоста. |
|
||||
| `trim_at` | `"."` | Строка, по которую имя хоста будет сокращено после первого совпадения. `"."` остановится после первой точки. `""` отключит любое усечение |
|
||||
| `style` | `"bold dimmed green"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `hostname`. |
|
||||
|
||||
### Пример
|
||||
|
||||
|
@ -755,13 +779,13 @@ symbol = "🌟 "
|
|||
|
||||
## Задачи
|
||||
|
||||
Модуль `jobs` отображает текущее количество запущенных работ. Модуль будет показан только если работы выполняются в фоне. Модуль покажет количество запущенных задач при более 1 задачи, или больше, чем значение настройки `threshold`, если оно существует.
|
||||
Модуль `jobs` отображает текущее количество запущенных работ. Модуль будет показан только если работы выполняются в фоне. Модуль покажет количество запущенных задач при наличии более чем 1 задачи, или больше, чем значение конфигурации `threshold`, если оно существует.
|
||||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ----------- | ------------- | --------------------------------------------------------- |
|
||||
| `symbol` | `"✦"` | Символ, используемый перед отображением количества задач. |
|
||||
| `symbol` | `"✦"` | Символ, используемый перед отображением количества работ. |
|
||||
| `threshold` | `1` | Показывать количество задач, если превышено. |
|
||||
| `style` | `"bold blue"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `jobs`. |
|
||||
|
@ -788,7 +812,7 @@ The `julia` module shows the currently installed version of Julia. Модуль
|
|||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
|
||||
| `symbol` | `"ஃ "` | The symbol used before displaying the version of Julia. |
|
||||
| `style` | `"bold purple"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
|
||||
|
@ -798,13 +822,13 @@ The `julia` module shows the currently installed version of Julia. Модуль
|
|||
# ~/.config/starship.toml
|
||||
|
||||
[julia]
|
||||
symbol = "👸 "
|
||||
symbol = "∴ "
|
||||
```
|
||||
## Kubernetes
|
||||
|
||||
Отображает текущее контекстное имя Kubernetes и, если применено, пространство имён из файла kubeconfig. Пространство имен дожно быть задано в файле kubeconfig, это делается через `kubectl config set-context starship-cluster --namespace astronaut`. Если переменная окружения `$KUBECONFIG` установлена, модуль будет использовать это, в противном случае будет использовать `~/.kube/config`.
|
||||
|
||||
::: tip Подсказка
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
|
||||
|
@ -857,7 +881,7 @@ disabled = true
|
|||
|
||||
По умолчанию использование подкачки отображается, если общая сумма подкачки системы не равна нулю.
|
||||
|
||||
::: tip Подсказка
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
|
||||
|
@ -890,7 +914,7 @@ separator = "/"
|
|||
style = "bold dimmed green"
|
||||
```
|
||||
|
||||
## Ветвь Mercurial
|
||||
## Ветка Mercurial
|
||||
|
||||
Модуль `hg_branch` показывает активную ветку репозитория в вашем текущем каталоге.
|
||||
|
||||
|
@ -898,7 +922,7 @@ style = "bold dimmed green"
|
|||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ------------------- | --------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `symbol` | `" "` | Символ, используемый перед закладкой hg или именем ветки репозитория в текущем каталоге. |
|
||||
| `symbol` | `" "` | Символ, используемый перед закладкой hg или именем ветви репозитория в текущем каталоге. |
|
||||
| `truncation_length` | `2^63 - 1` | Обрезает имя ветки hg до X графемов |
|
||||
| `truncation_symbol` | `"…"` | Символ, используемый для обозначения усечения названия ветки. |
|
||||
| `style` | `"bold purple"` | Стиль модуля. |
|
||||
|
@ -921,13 +945,14 @@ truncation_symbol = ""
|
|||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ------------ | ------------ | ----------------------------- |
|
||||
| `use_name` | `false` | Отображать имя nix-shell. |
|
||||
| `impure_msg` | `"impure"` | Настройте сообщение "impure". |
|
||||
| `pure_msg` | `"pure"` | Настройте сообщение "pure". |
|
||||
| `style` | `"bold red"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `nix_shell`. |
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ------------ | ------------- | ------------------------------------------------- |
|
||||
| `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` | Отключает модуль `nix_shell`. |
|
||||
|
||||
### Пример
|
||||
|
||||
|
@ -939,6 +964,7 @@ disabled = true
|
|||
use_name = true
|
||||
impure_msg = "impure shell"
|
||||
pure_msg = "pure shell"
|
||||
symbol = "☃️ "
|
||||
```
|
||||
|
||||
## NodeJS
|
||||
|
@ -969,7 +995,7 @@ symbol = "🤖 "
|
|||
|
||||
## Версия пакета
|
||||
|
||||
Модуль `package` отображается, когда текущий каталог является репозиторием для пакета и показывает его текущую версию. Модуль в настоящее время поддерживает `npm`, `cargo`, `poetry`, `composer`, и `gradle` пакеты.
|
||||
Модуль `package` отображается, когда текущий каталог является репозиторием для пакета и показывает его текущую версию. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` packages.
|
||||
|
||||
- **npm** – Версия пакета `npm` из файла `package.json` в текущем каталоге
|
||||
- **cargo** – Версия пакета `cargo` из файла `Cargo.toml` в текущем каталоге
|
||||
|
@ -977,16 +1003,18 @@ symbol = "🤖 "
|
|||
- **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
|
||||
|
||||
> ⚠ Показана версия пакета, исходный код которого находится в текущем каталоге, а не в менеджере пакетов.
|
||||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | ------------ | ------------------------------------------------------ |
|
||||
| `symbol` | `"📦 "` | Символ, используемый перед отображением версии пакета. |
|
||||
| `style` | `"bold red"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `package`. |
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ----------------- | ------------ | --------------------------------------------------------- |
|
||||
| `symbol` | `"📦 "` | Символ, используемый перед отображением версии пакета. |
|
||||
| `style` | `"bold red"` | Стиль модуля. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Отключает модуль `package`. |
|
||||
|
||||
### Пример
|
||||
|
||||
|
@ -1002,7 +1030,7 @@ symbol = "🎁 "
|
|||
Модуль `php` показывает установленную версию PHP. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
|
||||
- Текущий каталог содержит файл `composer.json`
|
||||
- The current directory contains a `.php-version` file
|
||||
- Текущий каталог содержит файл `.php-version`
|
||||
- Текущий каталог содержит файл `.php`
|
||||
|
||||
### Опции
|
||||
|
@ -1035,9 +1063,11 @@ symbol = "🔹 "
|
|||
- Текущий каталог содержит файл `.python-version`
|
||||
- Текущий каталог содержит файл `requirements.txt`
|
||||
- Текущий каталог содержит файл `pyproject.toml`
|
||||
- Текущий каталог содержит файл с расширением `.py`
|
||||
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
|
||||
- Текущий каталог содержит файл `Pipfile`
|
||||
- Текущий каталог содержит файл `tox.ini`
|
||||
- Текущий каталог содержит файл `setup.py`
|
||||
- The current directory contains a `__init__.py` file
|
||||
- Виртуальная среда в данный момент активирована
|
||||
|
||||
### Опции
|
||||
|
@ -1047,6 +1077,7 @@ symbol = "🔹 "
|
|||
| `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. |
|
||||
|
||||
|
@ -1066,7 +1097,7 @@ pyenv_prefix = "foo "
|
|||
Модуль `ruby` показывает установленную версию Ruby. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
|
||||
- Текущий каталог содержит файл `Gemfile`
|
||||
- The current directory contains a `.ruby-version` file
|
||||
- Текущий каталог содержит файл `.ruby-version`
|
||||
- Текущий каталог содержит файл `.rb`
|
||||
|
||||
### Опции
|
||||
|
@ -1112,20 +1143,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. |
|
||||
|
||||
### Пример
|
||||
|
||||
|
@ -1165,7 +1194,7 @@ symbol = "🏎💨 "
|
|||
|
||||
Модуль `time` показывает текущее **локальное** время. Значение конфигурации `format` используется пакетом [`chrono`](https://crates.io/crates/chrono) для контроля того, как отображается время. Ознакомьтесь с [документацией chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), чтобы увидеть доступные параметры.
|
||||
|
||||
::: tip Подсказка
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
|
||||
|
@ -1220,3 +1249,54 @@ utc_time_offset = "-5"
|
|||
[username]
|
||||
disabled = true
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
|
||||
These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a file whose name is in `files`
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
|
||||
::: tip
|
||||
|
||||
Multiple custom modules can be defined by using a `.`.
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
|
||||
The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
|
||||
|
||||
:::
|
||||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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` | | The path to the shell to use to execute the command. If unset, it will fallback to STARSHIP_SHELL and then to "sh". |
|
||||
| `описание` | `"<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"` | Стиль модуля. |
|
||||
| `prefix` | `""` | Prefix to display immediately before the command output. |
|
||||
| `suffix` | `""` | Suffix to display immediately after the command output. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
|
||||
### Пример
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
|
|
@ -43,3 +43,11 @@ starship prompt --help
|
|||
```
|
||||
|
||||
Подсказка будет использовать столько контекста, сколько доступно, но ни один флаг не обязателен.
|
||||
|
||||
## Как запускать Starship на Linux-дистрибутивах с более ранними версиями glibc?
|
||||
|
||||
Если вы получаете ошибку типа "*version 'GLIBC_2.18' not found (required by starship)*" при использовании заранее собранного бинарного файла (например, на CentOS 6 или 7), вы можете использовать бинарный файл, скомпилированый с `musl` вместо `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<p align="center">
|
||||
<a href="https://starship.rs">Сайт</a>
|
||||
·
|
||||
<a href="#-installation">Установка</a>
|
||||
<a href="#🚀-installation">Установка</a>
|
||||
·
|
||||
<a href="https://starship.rs/config/">Конфигурация</a>
|
||||
</p>
|
||||
|
@ -115,6 +115,8 @@
|
|||
<a href="https://starship.rs/"><strong>Изучите документацию Starship ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 Установка
|
||||
|
||||
### Требования
|
||||
|
@ -220,22 +222,22 @@
|
|||
|
||||
Если вы хотите помочь в создании Starship, пожалуйста, ознакомьтесь с нашим [Руководством по содействию](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Кроме того, заходите на наш [Discord сервер](https://discord.gg/8Jzqu3T) и поздоровайтесь. 👋
|
||||
|
||||
### Code Contributors
|
||||
### Соавторы кода
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
||||
Этот проект существует благодаря всем тем, кто внес свой вклад. [[Внести вклад](CONTRIBUTING.md)].
|
||||
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
### Financial Contributors
|
||||
### Финансовые спонсоры
|
||||
|
||||
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
Станьте финансовым спонсором и помогайте нам поддерживать наше сообщество. [[Внести вклад](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Individuals
|
||||
#### Частные лица
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organizations
|
||||
#### Организации
|
||||
|
||||
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
Поддержите этот проект вашей организацией. Ваш логотип будет отображаться здесь со ссылкой на ваш сайт. [[Внести вклад](https://opencollective.com/starship/contribute)]
|
||||
|
||||
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
|
||||
|
@ -250,7 +252,7 @@ Support this project with your organization. Your logo will show up here with a
|
|||
|
||||
## 💭 Вдохновления
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
Пожалуйста, ознакомьтесь с этими предыдущими работами, которые помогли вдохновить создание Starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - командная строка ZSH для астронавтов.
|
||||
|
||||
|
@ -260,9 +262,9 @@ Please check out these previous works that helped inspire the creation of starsh
|
|||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Иконка ракеты Starship">
|
||||
</p>
|
||||
|
||||
## 📝 Лицензия
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
||||
Авторское право © 2019-настоящее, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> Этот проект [ISC](https://github.com/starship/starship/blob/master/LICENSE) лицензирован.
|
||||
|
|
|
@ -26,21 +26,39 @@ discharging_symbol = ""
|
|||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[docker]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ prompt_order = [
|
|||
"dotnet",
|
||||
"elixir",
|
||||
"elm",
|
||||
"erlang",
|
||||
"golang",
|
||||
"haskell",
|
||||
"java",
|
||||
|
@ -120,6 +121,7 @@ prompt_order = [
|
|||
"env_var",
|
||||
"crystal",
|
||||
"cmd_duration",
|
||||
"custom",
|
||||
"line_break",
|
||||
"jobs",
|
||||
"battery",
|
||||
|
@ -482,6 +484,28 @@ The `elm` module shows the currently installed version of Elm. 此组件将在
|
|||
symbol = " "
|
||||
```
|
||||
|
||||
## Erlang
|
||||
|
||||
The `erlang` module shows the currently installed version of Erlang/OTP. 此组件只有满足以下条件之一时才会被显示:
|
||||
|
||||
- 当前目录包含一个 `rebar.config` 文件.
|
||||
- 当前目录包含一个 `erlang.mk` 文件.
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ---------- | ------- | -------------------------------------------------------- |
|
||||
| `symbol` | `"🖧 "` | The symbol used before displaying the version of Erlang. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### 示例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[erlang]
|
||||
symbol = "e "
|
||||
```
|
||||
## Environment Variable
|
||||
|
||||
`env_var` 组件显示选定的环境变量的当前值。 此组件只有满足以下条件之一时才会被显示:
|
||||
|
@ -650,7 +674,7 @@ deleted = "🗑"
|
|||
|
||||
## Golang
|
||||
|
||||
`golang` 组件显示当前安装的 Golang 版本。 此组件将在符合以下任意条件时显示:
|
||||
`golang` 组件显示当前安装的 Golang 版本。 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含 `go.mod` 文件
|
||||
- 当前目录包含 `go.sum` 文件
|
||||
|
@ -778,7 +802,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
|
||||
|
@ -788,7 +812,7 @@ The `julia` module shows the currently installed version of Julia. 此组件将
|
|||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
|
||||
| `symbol` | `"ஃ "` | The symbol used before displaying the version of Julia. |
|
||||
| `style` | `"bold purple"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
|
||||
|
@ -798,7 +822,7 @@ The `julia` module shows the currently installed version of Julia. 此组件将
|
|||
# ~/.config/starship.toml
|
||||
|
||||
[julia]
|
||||
symbol = "👸 "
|
||||
symbol = "∴ "
|
||||
```
|
||||
## Kubernetes
|
||||
|
||||
|
@ -921,13 +945,14 @@ truncation_symbol = ""
|
|||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ------------ | ------------ | ------------------ |
|
||||
| `use_name` | `false` | 显示 nix-shell 的名称。 |
|
||||
| `impure_msg` | `"impure"` | 自定义“impure”消息。 |
|
||||
| `pure_msg` | `"pure"` | 自定义“pure”消息。 |
|
||||
| `style` | `"bold red"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `nix_shell` 组件。 |
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ------------ | ------------- | ------------------------------------------------- |
|
||||
| `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` | 禁用 `nix_shell` 组件。 |
|
||||
|
||||
### 示例
|
||||
|
||||
|
@ -939,11 +964,12 @@ disabled = true
|
|||
use_name = true
|
||||
impure_msg = "impure shell"
|
||||
pure_msg = "pure shell"
|
||||
symbol = "☃️ "
|
||||
```
|
||||
|
||||
## NodeJS
|
||||
|
||||
`nodejs` 组件显示当前安装的 NodeJS 版本。 此组件将在符合以下任意条件时显示:
|
||||
`nodejs` 组件显示当前安装的 NodeJS 版本。 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含 `package.json` 文件
|
||||
- The current directory contains a `.node-version` file
|
||||
|
@ -969,7 +995,7 @@ symbol = "🤖 "
|
|||
|
||||
## Package Version
|
||||
|
||||
当前目录是软件包的代码仓库时,将显示 `package` 组件,并显示软件包当前版本。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, and `gradle` packages.
|
||||
当前目录是软件包的代码仓库时,将显示 `package` 组件,并显示软件包当前版本。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` packages.
|
||||
|
||||
- **npm** —— `npm` 软件包版本从当前目录下的 `package.json` 中得到
|
||||
- **cargo** —— `cargo` 软件包的版本从当前目录下的 `Cargo.toml` 中得到
|
||||
|
@ -977,16 +1003,18 @@ symbol = "🤖 "
|
|||
- **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
|
||||
|
||||
> ⚠ 此组件显示的是源代码在当前目录中的软件包的版本,而不是包管理器的版本。
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ---------- | ------------ | --------------------- |
|
||||
| `symbol` | `"📦 "` | 这个字段的内容会显示在当前软件包版本之前。 |
|
||||
| `style` | `"bold red"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `package` 组件。 |
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ----------------- | ------------ | --------------------------------------------------------- |
|
||||
| `symbol` | `"📦 "` | 这个字段的内容会显示在当前软件包版本之前。 |
|
||||
| `style` | `"bold red"` | 此组件的样式。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | 禁用 `package` 组件。 |
|
||||
|
||||
### 示例
|
||||
|
||||
|
@ -999,7 +1027,7 @@ symbol = "🎁 "
|
|||
|
||||
## PHP
|
||||
|
||||
`php` 组件显示当前安装的 PHP 版本。 此组件将在符合以下任意条件时显示:
|
||||
`php` 组件显示当前安装的 PHP 版本。 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含一个 `composer.json` 文件
|
||||
- The current directory contains a `.php-version` file
|
||||
|
@ -1035,20 +1063,23 @@ symbol = "🔹 "
|
|||
- 当前目录包含 `.python-version` 文件
|
||||
- 当前目录包含 `requirements.txt` 文件
|
||||
- 当前目录包含 `pyproject.toml` 文件
|
||||
- 当前目录包含一个使用 `.py` 扩展名的文件
|
||||
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
|
||||
- 当前目录包含 `Pipfile` 文件
|
||||
- 当前目录包含一个 `tox.ini` 文件
|
||||
- 当前目录包含一个 `setup.py` 文件
|
||||
- The current directory contains a `__init__.py` file
|
||||
- 当前处于一个活跃的 python 虚拟环境中
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| -------------------- | --------------- | ----------------------------------------- |
|
||||
| `symbol` | `"🐍 "` | 这个字段的内容会显示在当前 Python 版本之前。 |
|
||||
| `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 |
|
||||
| `pyenv_prefix` | `"pyenv "` | 在 pyenv 版本前显示的前缀(默认显示 `pyenv MY_VERSION`) |
|
||||
| `style` | `"bold yellow"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `python` 组件。 |
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| -------------------- | --------------- | -------------------------------------------------------------------------- |
|
||||
| `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` 组件。 |
|
||||
|
||||
### 示例
|
||||
|
||||
|
@ -1063,7 +1094,7 @@ pyenv_prefix = "foo "
|
|||
|
||||
## Ruby
|
||||
|
||||
`ruby` 组件显示当前安装的 Ruby 版本。 此组件将在符合以下任意条件时显示:
|
||||
`ruby` 组件显示当前安装的 Ruby 版本。 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含 `Gemfile` 文件
|
||||
- The current directory contains a `.ruby-version` file
|
||||
|
@ -1114,8 +1145,6 @@ symbol = "⚙️ "
|
|||
|
||||
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
|
||||
|
||||
:::
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
|
@ -1138,7 +1167,7 @@ symbol = "📦 "
|
|||
|
||||
## Terraform
|
||||
|
||||
`terraform` 组件显示当前选定的 terraform 工作区和版本。 默认情况下不会显示 terraform 版本,因为当使用大量插件时,当前版本 terraform 查询版本号很慢。 此组件将在符合以下任意条件时显示:
|
||||
`terraform` 组件显示当前选定的 terraform 工作区和版本。 默认情况下不会显示 terraform 版本,因为当使用大量插件时,当前版本 terraform 查询版本号很慢。 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含 `.terraform` 目录
|
||||
- 当前目录包含一个使用 `.tf` 扩展名的文件
|
||||
|
@ -1220,3 +1249,54 @@ utc_time_offset = "-5"
|
|||
[username]
|
||||
disabled = true
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
|
||||
These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a file whose name is in `files`
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
|
||||
::: tip
|
||||
|
||||
Multiple custom modules can be defined by using a `.`.
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
|
||||
The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
|
||||
|
||||
:::
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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` | | The path to the shell to use to execute the command. If unset, it will fallback to STARSHIP_SHELL and then to "sh". |
|
||||
| `描述` | `"<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"` | 此组件的样式。 |
|
||||
| `prefix` | `""` | Prefix to display immediately before the command output. |
|
||||
| `suffix` | `""` | Suffix to display immediately after the command output. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
|
||||
### 示例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
|
|
@ -43,3 +43,11 @@ starship prompt --help
|
|||
```
|
||||
|
||||
Starship 会处理所提供的全部上下文参数并在提示符中显示,但没有参数是“必需”的。
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
|
||||
If you get an error like "*version 'GLIBC_2.18' not found (required by starship)*" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<p align="center">
|
||||
<a href="https://starship.rs">网站</a>
|
||||
·
|
||||
<a href="#-installation">安装</a>
|
||||
<a href="#🚀-installation">安装</a>
|
||||
·
|
||||
<a href="https://starship.rs/config/">配置</a>
|
||||
</p>
|
||||
|
@ -115,6 +115,8 @@
|
|||
<a href="https://starship.rs/"><strong>Explore the Starship docs ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 安装
|
||||
|
||||
### 前置要求
|
||||
|
@ -250,7 +252,7 @@ Support this project with your organization. Your logo will show up here with a
|
|||
|
||||
## 💭该项目受以下项目启发
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
请参考这些曾经为 Starship 提供启发的工程。 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
|
||||
|
||||
|
|
|
@ -26,21 +26,39 @@ discharging_symbol = ""
|
|||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[docker]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ prompt_order = [
|
|||
"dotnet",
|
||||
"elixir",
|
||||
"elm",
|
||||
"erlang",
|
||||
"golang",
|
||||
"haskell",
|
||||
"java",
|
||||
|
@ -120,6 +121,7 @@ prompt_order = [
|
|||
"env_var",
|
||||
"crystal",
|
||||
"cmd_duration",
|
||||
"custom",
|
||||
"line_break",
|
||||
"jobs",
|
||||
"battery",
|
||||
|
@ -482,6 +484,28 @@ The `elm` module shows the currently installed version of Elm. 這個模組在
|
|||
symbol = " "
|
||||
```
|
||||
|
||||
## Erlang
|
||||
|
||||
The `erlang` module shows the currently installed version of Erlang/OTP. 這個模組在下列其中一個條件達成時顯示:
|
||||
|
||||
- The current directory contains a `rebar.config` file.
|
||||
- The current directory contains a `erlang.mk` file.
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| ---------- | ------- | -------------------------------------------------------- |
|
||||
| `symbol` | `"🖧 "` | The symbol used before displaying the version of Erlang. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### 範例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[erlang]
|
||||
symbol = "e "
|
||||
```
|
||||
## 環境變數
|
||||
|
||||
`env_var`模組顯示一個選擇的環境變數的現在數值。 這個模組只在下列條件其中之一達到時顯示:
|
||||
|
@ -681,7 +705,7 @@ symbol = "🏎💨 "
|
|||
|
||||
The `haskell` module shows the currently installed version of Haskell Stack version. 這個模組在下列其中一個條件達成時顯示:
|
||||
|
||||
- 現在資料夾中包含一個 `stack.yaml` 檔案
|
||||
- 現在資料夾中含有一個 `stack.yaml` 檔案
|
||||
|
||||
### 選項
|
||||
|
||||
|
@ -788,7 +812,7 @@ The `julia` module shows the currently installed version of Julia. 這個模組
|
|||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
|
||||
| `symbol` | `"ஃ "` | The symbol used before displaying the version of Julia. |
|
||||
| `style` | `"bold purple"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
|
||||
|
@ -798,7 +822,7 @@ The `julia` module shows the currently installed version of Julia. 這個模組
|
|||
# ~/.config/starship.toml
|
||||
|
||||
[julia]
|
||||
symbol = "👸 "
|
||||
symbol = "∴ "
|
||||
```
|
||||
## Kubernetes
|
||||
|
||||
|
@ -921,13 +945,14 @@ truncation_symbol = ""
|
|||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| ------------ | ------------ | ------------------ |
|
||||
| `use_name` | `false` | 顯示 nix-shell 的名稱。 |
|
||||
| `impure_msg` | `"impure"` | 自定義「impure」訊息。 |
|
||||
| `pure_msg` | `"pure"` | 自定義「pure」訊息。 |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `nix_shell` 模組。 |
|
||||
| 變數 | 預設 | 說明 |
|
||||
| ------------ | ------------- | ------------------------------------------------- |
|
||||
| `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` | 停用 `nix_shell` 模組。 |
|
||||
|
||||
### 範例
|
||||
|
||||
|
@ -939,6 +964,7 @@ disabled = true
|
|||
use_name = true
|
||||
impure_msg = "impure shell"
|
||||
pure_msg = "pure shell"
|
||||
symbol = "☃️ "
|
||||
```
|
||||
|
||||
## NodeJS
|
||||
|
@ -969,7 +995,7 @@ symbol = "🤖 "
|
|||
|
||||
## 套件版本
|
||||
|
||||
The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, and `gradle` packages.
|
||||
The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` packages.
|
||||
|
||||
- **npm** – `npm` 套件的版本是從現在資料夾中的 `package.json` 之中擷取出來的
|
||||
- **cargo** – `cargo` 套件的版本是從現在資料夾中的 `Cargo.toml` 之中擷取出來的
|
||||
|
@ -977,16 +1003,18 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並
|
|||
- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- **gradle** – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- **julia** - The package version is extracted from the `Project.toml` present
|
||||
- **mix** - The `mix` package version is extracted from the `mix.exs` present
|
||||
|
||||
> ⚠️ 顯示出來的版本是從你的現在資料夾之中擷取出來的,並非從套件管理員取得。
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| ---------- | ------------ | ---------------- |
|
||||
| `symbol` | `"📦 "` | 顯示在套件的版本之前的符號。 |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `package` 模組。 |
|
||||
| 變數 | 預設 | 說明 |
|
||||
| ----------------- | ------------ | --------------------------------------------------------- |
|
||||
| `symbol` | `"📦 "` | 顯示在套件的版本之前的符號。 |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | 停用 `package` 模組。 |
|
||||
|
||||
### 範例
|
||||
|
||||
|
@ -1001,7 +1029,7 @@ symbol = "🎁 "
|
|||
|
||||
The `php` module shows the currently installed version of PHP. 這個模組在下列其中一個條件達成時顯示:
|
||||
|
||||
- 現在資料夾中含有一個 `composer.json` 檔案
|
||||
- 現在資料夾中包含一個 `composer.json` 檔案
|
||||
- The current directory contains a `.php-version` file
|
||||
- The current directory contains a `.php` file
|
||||
|
||||
|
@ -1035,20 +1063,23 @@ symbol = "🔹 "
|
|||
- 目前資料夾中有一個 `.python-version` 檔案
|
||||
- 目前資料夾中有一個 `requirements.txt` 檔案
|
||||
- 目前資料夾中有一個 `pyproject.toml` 檔案
|
||||
- 目前資料夾中有一個 `.py` 副檔名的檔案
|
||||
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
|
||||
- 目前資料夾中有一個 `Pipfile` 檔案
|
||||
- 目前資料夾中有一個 `tox.ini` 檔案
|
||||
- 現在資料夾中包含一個 `setup.py` 檔案
|
||||
- The current directory contains a `__init__.py` file
|
||||
- A virtual environment is currently activated
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| -------------------- | --------------- | --------------------------------------------- |
|
||||
| `symbol` | `"🐍 "` | 顯示在 Python 版本之前的符號。 |
|
||||
| `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 |
|
||||
| `pyenv_prefix` | `"pyenv "` | 顯示在 pyenv 版本之前的前綴 (預設顯示是 `pyenv MY_VERSION`)。 |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `python` 模組。 |
|
||||
| 變數 | 預設 | 說明 |
|
||||
| -------------------- | --------------- | -------------------------------------------------------------------------- |
|
||||
| `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` 模組。 |
|
||||
|
||||
### 範例
|
||||
|
||||
|
@ -1114,8 +1145,6 @@ symbol = "⚙️ "
|
|||
|
||||
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
|
||||
|
||||
:::
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
|
@ -1220,3 +1249,54 @@ utc_time_offset = "-5"
|
|||
[username]
|
||||
disabled = true
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
|
||||
These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a file whose name is in `files`
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
|
||||
::: tip
|
||||
|
||||
Multiple custom modules can be defined by using a `.`.
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
|
||||
The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
|
||||
|
||||
:::
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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` | | The path to the shell to use to execute the command. If unset, it will fallback to STARSHIP_SHELL and then to "sh". |
|
||||
| `說明` | `"<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"` | 這個模組的風格。 |
|
||||
| `prefix` | `""` | Prefix to display immediately before the command output. |
|
||||
| `suffix` | `""` | Suffix to display immediately after the command output. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
|
||||
### 範例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
|
|
@ -43,3 +43,11 @@ starship prompt --help
|
|||
```
|
||||
|
||||
The prompt will use as much context as is provided, but no flags are "required".
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
|
||||
If you get an error like "*version 'GLIBC_2.18' not found (required by starship)*" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/zh-TW/">網站</a>
|
||||
<a href="https://starship.rs">Website</a>
|
||||
·
|
||||
<a href="#-安裝">安裝</a>
|
||||
<a href="#🚀-installation">Installation</a>
|
||||
·
|
||||
<a href="https://starship.rs/zh-TW/config/">設定</a>
|
||||
<a href="https://starship.rs/config/">Configuration</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
|
@ -115,6 +115,8 @@
|
|||
<a href="https://starship.rs/"><strong>Explore the Starship docs ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 安裝
|
||||
|
||||
### 先決要求
|
||||
|
@ -250,7 +252,7 @@ Support this project with your organization. Your logo will show up here with a
|
|||
|
||||
## 💭 發想來自
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
請看之前這些幫助我們創造 Starship 的前任作品。 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 給太空人的 ZSH 提示。
|
||||
|
||||
|
@ -265,4 +267,4 @@ Please check out these previous works that helped inspire the creation of starsh
|
|||
|
||||
## 📝 許可
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> 這個專案使用 [ISC](https://github.com/starship/starship/blob/master/LICENSE) 許可。
|
||||
|
|
|
@ -26,21 +26,39 @@ discharging_symbol = ""
|
|||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[docker]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
|
|
Loading…
Reference in New Issue