mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-25 03:16:01 +00:00
docs(i18n): new Crowdin translations (#1238)
This commit is contained in:
parent
63799b97d1
commit
accba5027d
@ -32,6 +32,11 @@ Sie können den Pfad zur `starship.toml` mit der `STARSHIP_CONFIG` Umgebungsvari
|
||||
export STARSHIP_CONFIG=~/.starship
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
```ps1
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
|
||||
```
|
||||
|
||||
### Terminologie
|
||||
|
||||
**Module**: Eine Komponente in der Konsole, die auf kontextualisierte Informationen des OS basiert. Zum Beispiel zeigt das Modul "nodejs" die Version von NodeJS, die derzeit auf Ihrem Computer installiert ist, wenn Ihr aktuelles Verzeichnis ein NodeJS-Projekt ist.
|
||||
@ -109,11 +114,14 @@ prompt_order = [
|
||||
"java",
|
||||
"julia",
|
||||
"nodejs",
|
||||
"ocaml",
|
||||
"php",
|
||||
"purescript",
|
||||
"python",
|
||||
"ruby",
|
||||
"rust",
|
||||
"terraform",
|
||||
"zig",
|
||||
"nix_shell",
|
||||
"conda",
|
||||
"memory_usage",
|
||||
@ -296,7 +304,7 @@ prefix = "underwent "
|
||||
|
||||
Das `conda`-Modul zeigt dessen aktuelle Umgebung an, sofern `$CONDA_DEFAULT_ENV` gesetzt ist.
|
||||
|
||||
::: tip
|
||||
::: Tipp
|
||||
|
||||
Hinweis: Dies unterdrückt nicht conda's eigenen Prompt-Modifikator, sie können jedoch conda mit `conda config --set changeps1 False` konfigurieren, um die Ausgabe von conda selbst auszuschalten.
|
||||
|
||||
@ -322,7 +330,7 @@ style = "dimmed green"
|
||||
|
||||
## Crystal
|
||||
|
||||
The `crystal` module shows the currently installed version of Crystal. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
The `crystal` module shows the currently installed version of Crystal. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `shard.yml`-Datei
|
||||
- The current directory contains a `.cr` file
|
||||
@ -459,7 +467,7 @@ symbol = "🔮 "
|
||||
|
||||
## Elm
|
||||
|
||||
The `elm` module shows the currently installed version of Elm. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
The `elm` module shows the currently installed version of Elm. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `elm.json`-Datei
|
||||
- Das aktuelle Verzeichnis enthält eine `elm-package.json`-Datei
|
||||
@ -677,7 +685,7 @@ deleted = "🗑"
|
||||
|
||||
## Golang
|
||||
|
||||
Das `golang`-Modul zeigt die aktuell installierte Version von Golang. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
Das `golang`-Modul zeigt die aktuell installierte Version von Golang. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `go.mod`-Datei
|
||||
- Das aktuelle Verzeichnis enthält eine `go.sum`-Datei
|
||||
@ -1028,6 +1036,34 @@ Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository
|
||||
symbol = "🎁 "
|
||||
```
|
||||
|
||||
## OCaml
|
||||
|
||||
The `ocaml` module shows the currently installed version of OCaml. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- The current directory contains a file with `.opam` extension or `_opam` directory
|
||||
- The current directory contains a `esy.lock` directory
|
||||
- The current directory contains a `dune` or `dune-project` file
|
||||
- The current directory contains a `jbuild` or `jbuild-ignore` file
|
||||
- The current directory contains a `.merlin` file
|
||||
- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension
|
||||
|
||||
### Optionen
|
||||
|
||||
| Variable | Standardwert | Beschreibung |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
|
||||
| `style` | `"bold yellow"` | Stil für dieses Modul. |
|
||||
| `disabled` | `false` | Disables the `ocaml` module. |
|
||||
|
||||
### Beispiel
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[ocaml]
|
||||
symbol = "🐪 "
|
||||
```
|
||||
|
||||
## PHP
|
||||
|
||||
Das `php`-Modul zeigt die aktuell installierte Version von PHP. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
@ -1120,7 +1156,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
|
||||
@ -1203,7 +1239,7 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
|
||||
|
||||
### Optionen
|
||||
|
||||
| Variable | Standardwert | Beschreibung |
|
||||
| Variable | Standartwert | Beschreibung |
|
||||
| ----------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `use_12hr` | `false` | Aktiviert 12-Stunden-Format |
|
||||
| `format` | siehe unten | Das Format zum Anzeigen der Uhrzeit in [chrono-Formatierung](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html). |
|
||||
@ -1251,6 +1287,30 @@ Das `username` Modul zeigt den Namen des aktiven Benutzers. Das Modul wird gezei
|
||||
disabled = true
|
||||
```
|
||||
|
||||
|
||||
## Zig
|
||||
|
||||
The `zig` module shows the currently installed version of Zig. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
### Optionen
|
||||
|
||||
| Variable | Standartwert | Beschreibung |
|
||||
| ---------- | --------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
|
||||
| `style` | `"bold yellow"` | Stil für dieses Modul. |
|
||||
| `disabled` | `false` | Disables the `zig` module. |
|
||||
|
||||
### Beispiel
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[zig]
|
||||
symbol = "⚡️ "
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
@ -1301,3 +1361,27 @@ files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of PureScript version. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
|
||||
- The current directory contains a `spago.dhall` file
|
||||
- The current directory contains a \*.purs files
|
||||
|
||||
### Optionen
|
||||
|
||||
| Variable | Standartwert | Beschreibung |
|
||||
| ---------- | -------------- | ------------------------------------------------------------ |
|
||||
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
|
||||
| `style` | `"bold white"` | Stil für dieses Modul. |
|
||||
| `disabled` | `false` | Disables the `purescript` module. |
|
||||
|
||||
### Beispiel
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[purescript]
|
||||
symbol = "<=> "
|
||||
```
|
||||
|
@ -30,8 +30,8 @@ STATUS=$?
|
||||
# Gibt die Anzahl der laufenden Jobs an.
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Formatiere den prompt mit der Ausgabe von `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
Die [Bash Implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) ist etwas komplexer, um erweiterte Funktionen wie das [Befehlsdauer-Modul](https://starship.rs/config/#Command-Duration) zu ermöglichen und um sicherzustellen, dass Starship mit vorinstallierten Bash Konfigurationen kompatibel ist.
|
||||
|
@ -32,7 +32,12 @@ Puedes modificar la ubicación por defecto del fichero `starship.toml` con la va
|
||||
export STARSHIP_CONFIG=~/.starship
|
||||
```
|
||||
|
||||
### Terminology
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
```ps1
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
|
||||
```
|
||||
|
||||
### Terminología
|
||||
|
||||
**Módulo**: un componente en el símbolo de sistema que provee de información basada en información contextual de tu sistema operativo. Por ejemplo, el módulo "nodejs" muestra la versión de NodeJS que tienes actualmente instalada en tu ordenador, si el directorio actual es un proyecto NodeJS.
|
||||
|
||||
@ -109,11 +114,14 @@ prompt_order = [
|
||||
"java",
|
||||
"julia",
|
||||
"nodejs",
|
||||
"ocaml",
|
||||
"php",
|
||||
"purescript",
|
||||
"python",
|
||||
"ruby",
|
||||
"rust",
|
||||
"terraform",
|
||||
"zig",
|
||||
"nix_shell",
|
||||
"conda",
|
||||
"memory_usage",
|
||||
@ -199,7 +207,7 @@ discharging_symbol = "💀"
|
||||
|
||||
### Indicador de batería
|
||||
|
||||
La configuración de la opción `display` es usada para definir cuándo se debe mostrar el indicador de batería y cómo debe mostrarse. Si no se provee ningún valor para `display` el valor por defecto es el siguiente:
|
||||
La configuración de la opción `display` es usada para definir cuándo se debe mostrar el indicador de batería y cómo debe mostrarse. Si no se provee ningún valor para `display` El valor por defecto es el siguiente:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
@ -416,12 +424,12 @@ Internally, this module uses its own mechanism for version detection. Typically
|
||||
|
||||
### Opciones
|
||||
|
||||
| Variable | Por defecto | Descripción |
|
||||
| ----------- | ------------- | -------------------------------------------------------- |
|
||||
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `style` | `"bold blue"` | El estilo del módulo. |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
| Variable | Por defecto | Descripción |
|
||||
| ----------- | ------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `"•NET "` | Símbolo usado antes de mostrar la versión de .NET |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `style` | `"bold blue"` | El estilo del módulo. |
|
||||
| `disabled` | `false` | Deshabilita el módulo `dotnet`. |
|
||||
|
||||
### Ejemplo
|
||||
|
||||
@ -1028,6 +1036,34 @@ The `package` module is shown when the current directory is the repository for a
|
||||
symbol = "🎁 "
|
||||
```
|
||||
|
||||
## OCaml
|
||||
|
||||
The `ocaml` module shows the currently installed version of OCaml. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
|
||||
- The current directory contains a file with `.opam` extension or `_opam` directory
|
||||
- The current directory contains a `esy.lock` directory
|
||||
- The current directory contains a `dune` or `dune-project` file
|
||||
- The current directory contains a `jbuild` or `jbuild-ignore` file
|
||||
- The current directory contains a `.merlin` file
|
||||
- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension
|
||||
|
||||
### Opciones
|
||||
|
||||
| Variable | Por defecto | Descripción |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
|
||||
| `style` | `"bold yellow"` | El estilo del módulo. |
|
||||
| `disabled` | `false` | Disables the `ocaml` module. |
|
||||
|
||||
### Ejemplo
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[ocaml]
|
||||
symbol = "🐪 "
|
||||
```
|
||||
|
||||
## PHP
|
||||
|
||||
The `php` module shows the currently installed version of PHP. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
@ -1251,6 +1287,30 @@ The `username` module shows active user's username. El módulo se muestra si alg
|
||||
disabled = true
|
||||
```
|
||||
|
||||
|
||||
## Zig
|
||||
|
||||
The `zig` module shows the currently installed version of Zig. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
### Opciones
|
||||
|
||||
| Variable | Por defecto | Descripción |
|
||||
| ---------- | --------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
|
||||
| `style` | `"bold yellow"` | El estilo del módulo. |
|
||||
| `disabled` | `false` | Disables the `zig` module. |
|
||||
|
||||
### Ejemplo
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[zig]
|
||||
symbol = "⚡️ "
|
||||
```
|
||||
|
||||
## Comandos personalizados
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
@ -1301,3 +1361,27 @@ files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of PureScript version. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
|
||||
- The current directory contains a `spago.dhall` file
|
||||
- The current directory contains a \*.purs files
|
||||
|
||||
### Opciones
|
||||
|
||||
| Variable | Por defecto | Descripción |
|
||||
| ---------- | -------------- | ------------------------------------------------------------ |
|
||||
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
|
||||
| `style` | `"bold white"` | El estilo del módulo. |
|
||||
| `disabled` | `false` | Disables the `purescript` module. |
|
||||
|
||||
### Ejemplo
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[purescript]
|
||||
symbol = "<=> "
|
||||
```
|
||||
|
@ -30,8 +30,8 @@ STATUS=$?
|
||||
# Calcula el número de tareas ejecutándose.
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Actualiza el símbolo del sistema para mostrar la salida de `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
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.
|
||||
|
@ -32,6 +32,11 @@ Vous pouvez changer l'emplacement du fichier de configuration `starship.toml` gr
|
||||
export STARSHIP_CONFIG=~/.starship
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
```ps1
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
|
||||
```
|
||||
|
||||
### Terminologie
|
||||
|
||||
**Module**: Un composant dans l'invite donnant des informations basées sur des informations contextuelles à propos de votre Système d'Exploitation. Par exemple, le module "nodejs" montre la version de NodeJS qui est actuellement installée sur votre ordinateur, si votre répertoire actuel est un projet NodeJS.
|
||||
@ -109,11 +114,14 @@ prompt_order = [
|
||||
"java",
|
||||
"julia",
|
||||
"nodejs",
|
||||
"ocaml",
|
||||
"php",
|
||||
"purescript",
|
||||
"python",
|
||||
"ruby",
|
||||
"rust",
|
||||
"terraform",
|
||||
"zig",
|
||||
"nix_shell",
|
||||
"conda",
|
||||
"memory_usage",
|
||||
@ -1028,6 +1036,34 @@ The `package` module is shown when the current directory is the repository for a
|
||||
symbol = "🎁 "
|
||||
```
|
||||
|
||||
## OCaml
|
||||
|
||||
The `ocaml` module shows the currently installed version of OCaml. Le module est affiché si l'une des ces conditions est remplie :
|
||||
|
||||
- The current directory contains a file with `.opam` extension or `_opam` directory
|
||||
- The current directory contains a `esy.lock` directory
|
||||
- The current directory contains a `dune` or `dune-project` file
|
||||
- The current directory contains a `jbuild` or `jbuild-ignore` file
|
||||
- The current directory contains a `.merlin` file
|
||||
- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ocaml` module. |
|
||||
|
||||
### Exemple
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[ocaml]
|
||||
symbol = "🐪 "
|
||||
```
|
||||
|
||||
## PHP
|
||||
|
||||
The `php` module shows the currently installed version of PHP. Le module est affiché si l'une des ces conditions est remplie :
|
||||
@ -1103,7 +1139,7 @@ The `ruby` module shows the currently installed version of Ruby. Le module est a
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| Variable | Défault | Description |
|
||||
| ---------- | -------------- | ------------------------------------------------------ |
|
||||
| `symbol` | `"💎 "` | The symbol used before displaying the version of Ruby. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
@ -1127,7 +1163,7 @@ The `rust` module shows the currently installed version of Rust. Le module est a
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Défault | Description |
|
||||
| Variable | Défaut | Description |
|
||||
| ---------- | -------------- | ------------------------------------------------------ |
|
||||
| `symbol` | `"🦀 "` | The symbol used before displaying the version of Rust. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
@ -1148,7 +1184,7 @@ The `singularity` module shows the current singularity image, if inside a contai
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Défaut | Description |
|
||||
| Variable | Default | Description |
|
||||
| ---------- | -------------------- | ------------------------------------------------ |
|
||||
| `label` | `""` | Prefix before the image name display. |
|
||||
| `prefix` | `"["` | Prefix to display immediately before image name. |
|
||||
@ -1251,6 +1287,30 @@ Le module `username` affiche le nom d'utilisateur de l'utilisateur actif. Le mod
|
||||
disabled = true
|
||||
```
|
||||
|
||||
|
||||
## Zig
|
||||
|
||||
The `zig` module shows the currently installed version of Zig. Le module est affiché si l'une des ces conditions est remplie :
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `zig` module. |
|
||||
|
||||
### Exemple
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[zig]
|
||||
symbol = "⚡️ "
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
@ -1301,3 +1361,27 @@ files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of PureScript version. Le module est affiché si l'une des ces conditions est remplie :
|
||||
|
||||
- The current directory contains a `spago.dhall` file
|
||||
- The current directory contains a \*.purs files
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | -------------- | ------------------------------------------------------------ |
|
||||
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
|
||||
| `style` | `"bold white"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `purescript` module. |
|
||||
|
||||
### Exemple
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[purescript]
|
||||
symbol = "<=> "
|
||||
```
|
||||
|
@ -30,8 +30,8 @@ STATUS=$?
|
||||
# Récupère le nombre de tâches en cours d'exécution.
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Définit l'invite de commande `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
[L'implémentation Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash) intégrée dans Starship est légèrement plus complexe pour permettre des fonctionnalités avancées comme le [module Durée de commande](https://starship.rs/config/#Command-Duration) et pour s'assurer que Starship est compatible avec les configurations Bash préinstallées.
|
||||
|
@ -32,6 +32,11 @@ disabled = true
|
||||
export STARSHIP_CONFIG=~/.starship
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
```ps1
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
|
||||
```
|
||||
|
||||
### 用語
|
||||
|
||||
**モジュール**: OSのコンテキスト情報に基づいて情報を提供するプロンプト内のコンポーネントです。 たとえば、現在のディレクトリがNodeJSプロジェクトである場合、「nodejs」モジュールは、現在コンピューターにインストールされているNodeJSのバージョンを表示します。
|
||||
@ -109,11 +114,14 @@ prompt_order = [
|
||||
"java",
|
||||
"julia",
|
||||
"nodejs",
|
||||
"ocaml",
|
||||
"php",
|
||||
"purescript",
|
||||
"python",
|
||||
"ruby",
|
||||
"rust",
|
||||
"terraform",
|
||||
"zig",
|
||||
"nix_shell",
|
||||
"conda",
|
||||
"memory_usage",
|
||||
@ -1029,6 +1037,34 @@ symbol = "🤖 "
|
||||
symbol = "🎁 "
|
||||
```
|
||||
|
||||
## OCaml
|
||||
|
||||
The `ocaml` module shows the currently installed version of OCaml. 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
|
||||
- The current directory contains a file with `.opam` extension or `_opam` directory
|
||||
- The current directory contains a `esy.lock` directory
|
||||
- The current directory contains a `dune` or `dune-project` file
|
||||
- The current directory contains a `jbuild` or `jbuild-ignore` file
|
||||
- The current directory contains a `.merlin` file
|
||||
- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension
|
||||
|
||||
### オプション
|
||||
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
|
||||
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | Disables the `ocaml` module. |
|
||||
|
||||
### 設定例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[ocaml]
|
||||
symbol = "🐪 "
|
||||
```
|
||||
|
||||
## PHP
|
||||
|
||||
`php`モジュールは、現在インストールされているPHPのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
@ -1252,6 +1288,30 @@ utc_time_offset = "-5"
|
||||
disabled = true
|
||||
```
|
||||
|
||||
|
||||
## Zig
|
||||
|
||||
The `zig` module shows the currently installed version of Zig. 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
### オプション
|
||||
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| ---------- | --------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
|
||||
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | Disables the `zig` module. |
|
||||
|
||||
### 設定例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[zig]
|
||||
symbol = "⚡️ "
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
@ -1302,3 +1362,27 @@ files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of PureScript version. 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
|
||||
- The current directory contains a `spago.dhall` file
|
||||
- The current directory contains a \*.purs files
|
||||
|
||||
### オプション
|
||||
|
||||
| 変数 | デフォルト | 説明 |
|
||||
| ---------- | -------------- | ------------------------------------------------------------ |
|
||||
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
|
||||
| `style` | `"bold white"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | Disables the `purescript` module. |
|
||||
|
||||
### 設定例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[purescript]
|
||||
symbol = "<=> "
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ STATUS=$?
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
Starshipに組み込まれた[Bashの実装](https://github.com/starship/starship/blob/master/src/init/starship.bash)は、[ Command Durationモジュール](https://starship.rs/config/#Command-Duration)などの高度な機能を可能にし、Starshipが事前にインストールされたBash構成と互換性があるようにするため、少し複雑です。
|
||||
|
@ -30,11 +30,11 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs">Website</a>
|
||||
<a href="https://starship.rs">ウェブサイト</a>
|
||||
·
|
||||
<a href="#🚀-installation">Installation</a>
|
||||
<a href="#🚀-installation">インストール</a>
|
||||
·
|
||||
<a href="https://starship.rs/config/">Configuration</a>
|
||||
<a href="https://starship.rs/config/">設定</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Advanced Configuration
|
||||
# Configuração avançada
|
||||
|
||||
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.
|
||||
|
||||
|
@ -32,6 +32,11 @@ Você pode alterar o caminho padrão do arquivo `starship.toml` com a variável
|
||||
export STARSHIP_CONFIG=~/.starship
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
```ps1
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
|
||||
```
|
||||
|
||||
### Terminologia
|
||||
|
||||
**Módulo**: Um componente no prompt que fornece informações baseado no contexto do seu SO. Por exemplo, o módulo "nodejs" mostra a versão do NodeJS instalado no seu computador, se o diretório atual for um projeto NodeJS.
|
||||
@ -109,11 +114,14 @@ prompt_order = [
|
||||
"java",
|
||||
"julia",
|
||||
"nodejs",
|
||||
"ocaml",
|
||||
"php",
|
||||
"purescript",
|
||||
"python",
|
||||
"ruby",
|
||||
"rust",
|
||||
"terraform",
|
||||
"zig",
|
||||
"nix_shell",
|
||||
"conda",
|
||||
"memory_usage",
|
||||
@ -1028,6 +1036,34 @@ The `package` module is shown when the current directory is the repository for a
|
||||
symbol = "🎁 "
|
||||
```
|
||||
|
||||
## OCaml
|
||||
|
||||
The `ocaml` module shows the currently installed version of OCaml. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.opam` extension or `_opam` directory
|
||||
- The current directory contains a `esy.lock` directory
|
||||
- The current directory contains a `dune` or `dune-project` file
|
||||
- The current directory contains a `jbuild` or `jbuild-ignore` file
|
||||
- The current directory contains a `.merlin` file
|
||||
- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ocaml` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[ocaml]
|
||||
symbol = "🐪 "
|
||||
```
|
||||
|
||||
## PHP
|
||||
|
||||
The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met:
|
||||
@ -1251,6 +1287,30 @@ The `username` module shows active user's username. The module will be shown if
|
||||
disabled = true
|
||||
```
|
||||
|
||||
|
||||
## Zig
|
||||
|
||||
The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `zig` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[zig]
|
||||
symbol = "⚡️ "
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
@ -1301,3 +1361,27 @@ files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `spago.dhall` file
|
||||
- The current directory contains a \*.purs files
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | -------------- | ------------------------------------------------------------ |
|
||||
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
|
||||
| `style` | `"bold white"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `purescript` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[purescript]
|
||||
symbol = "<=> "
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ STATUS=$?
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
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.
|
||||
|
@ -32,6 +32,11 @@ You can change default `starship.toml` file location with `STARSHIP_CONFIG` envi
|
||||
export STARSHIP_CONFIG=~/.starship
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
```ps1
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
|
||||
```
|
||||
|
||||
### Terminology
|
||||
|
||||
**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project.
|
||||
@ -109,11 +114,14 @@ prompt_order = [
|
||||
"java",
|
||||
"julia",
|
||||
"nodejs",
|
||||
"ocaml",
|
||||
"php",
|
||||
"purescript",
|
||||
"python",
|
||||
"ruby",
|
||||
"rust",
|
||||
"terraform",
|
||||
"zig",
|
||||
"nix_shell",
|
||||
"conda",
|
||||
"memory_usage",
|
||||
@ -1028,6 +1036,34 @@ The `package` module is shown when the current directory is the repository for a
|
||||
symbol = "🎁 "
|
||||
```
|
||||
|
||||
## OCaml
|
||||
|
||||
The `ocaml` module shows the currently installed version of OCaml. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.opam` extension or `_opam` directory
|
||||
- The current directory contains a `esy.lock` directory
|
||||
- The current directory contains a `dune` or `dune-project` file
|
||||
- The current directory contains a `jbuild` or `jbuild-ignore` file
|
||||
- The current directory contains a `.merlin` file
|
||||
- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ocaml` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[ocaml]
|
||||
symbol = "🐪 "
|
||||
```
|
||||
|
||||
## PHP
|
||||
|
||||
The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met:
|
||||
@ -1251,6 +1287,30 @@ The `username` module shows active user's username. The module will be shown if
|
||||
disabled = true
|
||||
```
|
||||
|
||||
|
||||
## Zig
|
||||
|
||||
The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `zig` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[zig]
|
||||
symbol = "⚡️ "
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
@ -1301,3 +1361,27 @@ files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `spago.dhall` file
|
||||
- The current directory contains a \*.purs files
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | -------------- | ------------------------------------------------------------ |
|
||||
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
|
||||
| `style` | `"bold white"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `purescript` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[purescript]
|
||||
symbol = "<=> "
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ STATUS=$?
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
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.
|
||||
|
@ -32,6 +32,11 @@ disabled = true
|
||||
export STARSHIP_CONFIG=~/.starship
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
```ps1
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
|
||||
```
|
||||
|
||||
### Терминология
|
||||
|
||||
**Модуль**: Компонент строки, дающий информацию на основе контекстной информации вашей ОС. Например, модуль "nodejs" показывает установленную версию NodeJS на вашем компьютере, если вы находитесь в директории проекта NodeJS.
|
||||
@ -109,11 +114,14 @@ prompt_order = [
|
||||
"java",
|
||||
"julia",
|
||||
"nodejs",
|
||||
"ocaml",
|
||||
"php",
|
||||
"purescript",
|
||||
"python",
|
||||
"ruby",
|
||||
"rust",
|
||||
"terraform",
|
||||
"zig",
|
||||
"nix_shell",
|
||||
"conda",
|
||||
"memory_usage",
|
||||
@ -296,7 +304,7 @@ prefix = "underwent "
|
||||
|
||||
Модуль `conda` показывает текущее окружение conda, если `$CONDA_DEFAULT_ENV` присвоено значение.
|
||||
|
||||
::: tip Подсказка
|
||||
::: tip
|
||||
|
||||
Это не подавляет модификатор командной строки самой conda. Возможно, вы захотите запустить `conda config --set changeps1 False`.
|
||||
|
||||
@ -730,7 +738,7 @@ symbol = " "
|
||||
|
||||
## Имя хоста
|
||||
|
||||
Модуль `hostname` отображает имя системного хоста.
|
||||
Модуль `hostname` отображает имя системы (хоста).
|
||||
|
||||
### Опции
|
||||
|
||||
@ -829,7 +837,7 @@ symbol = "∴ "
|
||||
```
|
||||
## Kubernetes
|
||||
|
||||
Отображает текущее контекстное имя Kubernetes и, если применено, пространство имён из файла kubeconfig. Пространство имен дожно быть задано в файле kubeconfig, это делается через `kubectl config set-context starship-cluster --namespace astronaut`. Если переменная окружения `$KUBECONFIG` установлена, модуль будет использовать это, в противном случае будет использовать `~/.kube/config`.
|
||||
Отображает текущее контекстное имя Kubernetes и, если применено, пространство имён из файла kubeconfig. Пространство имен дожно быть задано в файле kubeconfig, это делается через `kubectl config set-context starship-cluster --namespace astronaut`. Если переменная окружения `$KUBECONFIG` задана, модуль будет использовать его значение, в противном случае будет использовать `~/.kube/config`.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -1028,6 +1036,34 @@ symbol = "🤖 "
|
||||
symbol = "🎁 "
|
||||
```
|
||||
|
||||
## OCaml
|
||||
|
||||
The `ocaml` module shows the currently installed version of OCaml. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
|
||||
- The current directory contains a file with `.opam` extension or `_opam` directory
|
||||
- The current directory contains a `esy.lock` directory
|
||||
- The current directory contains a `dune` or `dune-project` file
|
||||
- The current directory contains a `jbuild` or `jbuild-ignore` file
|
||||
- The current directory contains a `.merlin` file
|
||||
- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension
|
||||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
|
||||
| `style` | `"bold yellow"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Disables the `ocaml` module. |
|
||||
|
||||
### Пример
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[ocaml]
|
||||
symbol = "🐪 "
|
||||
```
|
||||
|
||||
## PHP
|
||||
|
||||
Модуль `php` показывает установленную версию PHP. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
@ -1251,6 +1287,30 @@ utc_time_offset = "-5"
|
||||
disabled = true
|
||||
```
|
||||
|
||||
|
||||
## Zig
|
||||
|
||||
The `zig` module shows the currently installed version of Zig. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | --------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
|
||||
| `style` | `"bold yellow"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Disables the `zig` module. |
|
||||
|
||||
### Пример
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[zig]
|
||||
symbol = "⚡️ "
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
@ -1301,3 +1361,27 @@ files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of PureScript version. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
|
||||
- The current directory contains a `spago.dhall` file
|
||||
- The current directory contains a \*.purs files
|
||||
|
||||
### Опции
|
||||
|
||||
| Переменная | По умолчанию | Описание |
|
||||
| ---------- | -------------- | ------------------------------------------------------------ |
|
||||
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
|
||||
| `style` | `"bold white"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Disables the `purescript` module. |
|
||||
|
||||
### Пример
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[purescript]
|
||||
symbol = "<=> "
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ STATUS=$?
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
[Реализация для Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash), встроенная в Starship, несколько сложнее, чтобы предоставить дополнительные возможности, такие как [модуль длительности команды](https://starship.rs/config/#Command-Duration) и обеспечить совместимость Starship с заранее установленными конфигурациями Bash.
|
||||
|
@ -32,6 +32,11 @@ disabled = true
|
||||
export STARSHIP_CONFIG=~/.starship
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
```ps1
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
|
||||
```
|
||||
|
||||
### 术语
|
||||
|
||||
**组件(Module)**:提示符的组成部分,通过来自系统的上下文信息向用户显示各种信息。 比如“nodejs”组件会在当前目录是一个 NodeJS 项目时显示您当前安装的 NodeJS 版本。
|
||||
@ -109,11 +114,14 @@ prompt_order = [
|
||||
"java",
|
||||
"julia",
|
||||
"nodejs",
|
||||
"ocaml",
|
||||
"php",
|
||||
"purescript",
|
||||
"python",
|
||||
"ruby",
|
||||
"rust",
|
||||
"terraform",
|
||||
"zig",
|
||||
"nix_shell",
|
||||
"conda",
|
||||
"memory_usage",
|
||||
@ -322,7 +330,7 @@ style = "dimmed green"
|
||||
|
||||
## Crystal
|
||||
|
||||
The `crystal` module shows the currently installed version of Crystal. 此组件将在符合以下任意条件时显示:
|
||||
The `crystal` module shows the currently installed version of Crystal. 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含一个 `shard.yml` 文件
|
||||
- The current directory contains a `.cr` file
|
||||
@ -436,7 +444,7 @@ heuristic = false
|
||||
|
||||
## Elixir
|
||||
|
||||
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 此组件只有满足以下条件之一时才会被显示:
|
||||
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 此组件将在符合以下任意条件时显示:
|
||||
|
||||
- 当前目录包含一个 `mix.exs` 文件.
|
||||
|
||||
@ -459,7 +467,7 @@ symbol = "🔮 "
|
||||
|
||||
## Elm
|
||||
|
||||
The `elm` module shows the currently installed version of Elm. 此组件将在符合以下任意条件时显示:
|
||||
The `elm` module shows the currently installed version of Elm. 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含一个 `elm.json` 文件
|
||||
- 当前目录包含 `elm-package.json` 文件
|
||||
@ -1028,9 +1036,37 @@ symbol = "🤖 "
|
||||
symbol = "🎁 "
|
||||
```
|
||||
|
||||
## OCaml
|
||||
|
||||
The `ocaml` module shows the currently installed version of OCaml. 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- The current directory contains a file with `.opam` extension or `_opam` directory
|
||||
- The current directory contains a `esy.lock` directory
|
||||
- The current directory contains a `dune` or `dune-project` file
|
||||
- The current directory contains a `jbuild` or `jbuild-ignore` file
|
||||
- The current directory contains a `.merlin` file
|
||||
- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
|
||||
| `style` | `"bold yellow"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `ocaml` module. |
|
||||
|
||||
### 示例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[ocaml]
|
||||
symbol = "🐪 "
|
||||
```
|
||||
|
||||
## PHP
|
||||
|
||||
`php` 组件显示当前安装的 PHP 版本。 此组件将在符合以下任意条件之一时显示:
|
||||
`php` 组件显示当前安装的 PHP 版本。 此组件将在符合以下任意条件时显示:
|
||||
|
||||
- 当前目录包含一个 `composer.json` 文件
|
||||
- The current directory contains a `.php-version` file
|
||||
@ -1251,6 +1287,30 @@ utc_time_offset = "-5"
|
||||
disabled = true
|
||||
```
|
||||
|
||||
|
||||
## Zig
|
||||
|
||||
The `zig` module shows the currently installed version of Zig. 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ---------- | --------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
|
||||
| `style` | `"bold yellow"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `zig` module. |
|
||||
|
||||
### 示例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[zig]
|
||||
symbol = "⚡️ "
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
@ -1301,3 +1361,27 @@ files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of PureScript version. 此组件只有满足以下条件之一时才会被显示:
|
||||
|
||||
- The current directory contains a `spago.dhall` file
|
||||
- The current directory contains a \*.purs files
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ---------- | -------------- | ------------------------------------------------------------ |
|
||||
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
|
||||
| `style` | `"bold white"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `purescript` module. |
|
||||
|
||||
### 示例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[purescript]
|
||||
symbol = "<=> "
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ STATUS=$?
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
内置于 Starship 的 [Bash 适配](https://github.com/starship/starship/blob/master/src/init/starship.bash) 稍微复杂一些,实现了像 [命令用时统计组件](https://starship.rs/config/#Command-Duration) 这样的功能,还确保 Starship 能与之前设置的 Bash 配置相兼容。
|
||||
|
@ -32,6 +32,11 @@ disabled = true
|
||||
export STARSHIP_CONFIG=~/.starship
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
```ps1
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
|
||||
```
|
||||
|
||||
### 術語
|
||||
|
||||
**模組 (Module)**: 提示字元中的一個元件,基於你的作業系統提供的背景資訊來提供訊息。 舉例來說,如果你現在的資料夾是一個 NodeJS 專案,"nodejs" 模組會顯示出現在安裝在你的電腦上的 NodeJS 版本。
|
||||
@ -109,11 +114,14 @@ prompt_order = [
|
||||
"java",
|
||||
"julia",
|
||||
"nodejs",
|
||||
"ocaml",
|
||||
"php",
|
||||
"purescript",
|
||||
"python",
|
||||
"ruby",
|
||||
"rust",
|
||||
"terraform",
|
||||
"zig",
|
||||
"nix_shell",
|
||||
"conda",
|
||||
"memory_usage",
|
||||
@ -322,7 +330,7 @@ style = "dimmed green"
|
||||
|
||||
## Crystal
|
||||
|
||||
`crystal` 模組顯示現在所安裝的Crystal版本 這個模組將在下列其中一個條件滿足時顯示:
|
||||
`crystal` 模組顯示現在所安裝的Crystal版本 這個模組在下列其中一個條件達成時顯示:
|
||||
|
||||
- 現在資料夾中含有一個 `shard.yml` 檔案
|
||||
- 現在資料夾中含有一個`.cr`檔案
|
||||
@ -1028,6 +1036,34 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並
|
||||
symbol = "🎁 "
|
||||
```
|
||||
|
||||
## OCaml
|
||||
|
||||
The `ocaml` module shows the currently installed version of OCaml. 這個模組在下列其中一個條件達成時顯示:
|
||||
|
||||
- The current directory contains a file with `.opam` extension or `_opam` directory
|
||||
- The current directory contains a `esy.lock` directory
|
||||
- The current directory contains a `dune` or `dune-project` file
|
||||
- The current directory contains a `jbuild` or `jbuild-ignore` file
|
||||
- The current directory contains a `.merlin` file
|
||||
- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `ocaml` module. |
|
||||
|
||||
### 範例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[ocaml]
|
||||
symbol = "🐪 "
|
||||
```
|
||||
|
||||
## PHP
|
||||
|
||||
The `php` module shows the currently installed version of PHP. 這個模組在下列其中一個條件達成時顯示:
|
||||
@ -1251,6 +1287,30 @@ utc_time_offset = "-5"
|
||||
disabled = true
|
||||
```
|
||||
|
||||
|
||||
## Zig
|
||||
|
||||
The `zig` module shows the currently installed version of Zig. 這個模組在下列其中一個條件達成時顯示:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| ---------- | --------------- | ----------------------------------------------------- |
|
||||
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `zig` module. |
|
||||
|
||||
### 範例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[zig]
|
||||
symbol = "⚡️ "
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
@ -1301,3 +1361,27 @@ files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of PureScript version. 這個模組在下列其中一個條件達成時顯示:
|
||||
|
||||
- The current directory contains a `spago.dhall` file
|
||||
- The current directory contains a \*.purs files
|
||||
|
||||
### 選項
|
||||
|
||||
| 變數 | 預設 | 說明 |
|
||||
| ---------- | -------------- | ------------------------------------------------------------ |
|
||||
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
|
||||
| `style` | `"bold white"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | Disables the `purescript` module. |
|
||||
|
||||
### 範例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[purescript]
|
||||
symbol = "<=> "
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ STATUS=$?
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=NUM_JOBS)"
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user