docs(i18n): Update translations (#735)

This commit is contained in:
Matan Kushner 2019-12-24 16:54:29 -05:00 committed by GitHub
parent ecc8754335
commit 75b103a44a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 1107 additions and 691 deletions

View File

@ -32,43 +32,28 @@ footer: ICS lizenziert | Copyright © 2019-heute Starship-Mitwirkende
1. Installiere die Binärversion von **starship**:
**[Lade die vorkompilierte Binärversion herunter](https://github.com/starship/starship/releases)**, wenn du keine der unten gelisteten Plattformen verwendest.
#### Install Latest Version
#### Homebrew
With Shell:
```sh
$ brew install starship
curl -fsSL https://starship.rs/install.sh | bash
```
#### Rust (v1.38 oder neuer)
#### Install via Package Manager
With [Homebrew](https://brew.sh/):
```sh
$ cargo install starship
brew install starship
```
With [Scoop](https://scoop.sh):
#### Arch Linux (AUR)
Starship ist via AUR unter dem Namen `starship` verfügbar. Installiere es mittels `yay` oder einem AUR-Helfer deiner Wahl.
```sh
$ yay -S starship
```
#### Nix (instabil)
```sh
$ nix-env --install starship
```
#### Termux
```sh
$ pkg install starship
```powershell
scoop install starship
```
1. Füge das init-Skript zur Konfigurationsdatei deiner Shell hinzu:
@ -113,7 +98,19 @@ footer: ICS lizenziert | Copyright © 2019-heute Starship-Mitwirkende
```sh
# notepad $PROFILE
# ~\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)
```

View File

@ -126,9 +126,10 @@ Das `aws`-Modul zeigt das aktuelle AWS-Profil an. Dies basiert auf den Umgebungs
| Variable | Standardwert | Beschreibung |
| ----------------- | --------------- | ------------------------------------------------------------------------------------- |
| `symbol` | `"☁️ "` | Symbol das vor dem aktuellen AWS-Profil angezeigt wird. |
| `displayed_items` | `all` | Welche Objekte angezeigt werden sollen. Possible values: [`all`, `profile`, `region`] |
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
| `style` | `"bold yellow"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `aws`-Modul. |
| `displayed_items` | `all` | Welche Objekte angezeigt werden sollen. Possible values: [`all`, `profile`, `region`] |
### Beispiel
@ -139,6 +140,9 @@ Das `aws`-Modul zeigt das aktuelle AWS-Profil an. Dies basiert auf den Umgebungs
style = "bold blue"
symbol = "🅰 "
displayed_items = "region"
[aws.region_aliases]
ap-southeast-2 = "au"
us-east-1 = "va"
```
## Akkustand
@ -255,12 +259,13 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Optionen
| Variable | Standardwert | Beschreibung |
| ---------- | --------------- | ------------------------------------------------------------------------- |
| `min_time` | `2` | Kürzestes Wert für den die Ausführungsdauer angezeigt wird (in Sekunden). |
| `prefix` | `took` | Prefix der unmittelbar vor der Ausführungszeit angezeigt wird. |
| `style` | `"bold yellow"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `cmd_duration`-Modul. |
| Variable | Standardwert | Beschreibung |
| ------------------- | --------------- | -------------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `prefix` | `took` | Prefix der unmittelbar vor der Ausführungszeit angezeigt wird. |
| `style` | `"bold yellow"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `cmd_duration`-Modul. |
### Beispiel
@ -268,13 +273,13 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
# ~/.config/starship.toml
[cmd_duration]
min_time = 4
min_time = 500
prefix = "underwent "
```
## Conda
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
Das `conda`-Modul zeigt dessen aktuelle Umgebung an, sofern `$CONDA_DEFAULT_ENV` gesetzt ist.
::: tip
@ -287,9 +292,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| Variable | Standardwert | Beschreibung |
| ------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. |
| `symbol` | `"C "` | The symbol used before the environment name. |
| `style` | `"bold green"` | The style for the module. |
| `disabled` | `false` | Disables the `conda` module. |
| `symbol` | `"C "` | Symbol das vor dem Umgebungsnamen angezeigt wird. |
| `style` | `"bold green"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `conda`-Modul. |
### Beispiel
@ -315,11 +320,11 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `truncation_length` | `3` | Die Anzahl der übergeordneten Ordner, die angezeigt werden. |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
| `prefix` | `"in "` | Prefix to display immediately before the directory. |
| `style` | `"bold cyan"` | The style for the module. |
| `disabled` | `false` | Disables the `directory` module. |
| `style` | `"bold cyan"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `directory`-Modul. |
<details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
<summary>Dieses Modul hat einige erweiterte Konfigurationsoptionen, welche die Darstellung von Verzeichnissen steuern.</summary>
| Variable | Standardwert | Beschreibung |
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
@ -396,7 +401,7 @@ default = "unknown shell"
## Git-Branch
The `git_branch` module shows the active branch of the repo in your current directory.
Das `git_branch`-Modul zeigt den aktiven Git-Branch des Repositories im aktuellen Verzeichnis an.
### Optionen
@ -421,11 +426,11 @@ truncation_symbol = ""
## Git Commit
The `git_commit` module shows the active branch of the repo in your current directory.
The `git_commit` module shows the current commit hash of the repo in your current directory.
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
:::
@ -538,7 +543,7 @@ deleted = "🗑"
## Golang
The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met:
Das `golang`-Modul zeigt die aktuell installierte Version von Golang. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- Das aktuelle Verzeichnis enthält eine `go.mod`-Datei
- Das aktuelle Verzeichnis enthält eine `go.sum`-Datei
@ -592,7 +597,7 @@ truncation_symbol = ""
## Hostname
The `hostname` module shows the system hostname.
Das `hostname`-Modul zeigt den Hostnamen des Systems an.
### Optionen
@ -647,7 +652,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
:::
@ -698,8 +703,8 @@ Das `nix_shell`-Modul zeigt die nix-shell Umgebung an. Das Modul wird angezeigt,
| 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. |
| `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. |
@ -715,13 +720,37 @@ impure_msg = "impure shell"
pure_msg = "pure shell"
```
## Java
Das `java` Modul zeigt die derzeit installierte Version von Java an. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- The current directory contains a `pom.xml`, `build.gradle`, `build.gradle.kts` or `build.sbt` file
- Das aktuelle Verzeichnis enthält eine Datei mit der `.java`, `.class` oder `.jar` Erweiterung
### Optionen
| Variable | Standardwert | Beschreibung |
| ---------- | -------------- | ----------------------------------------------- |
| `symbol` | `"☕ "` | Symbol das vor der Java-Version angezeigt wird. |
| `style` | `"dimmed red"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `Java`-Modul. |
### Beispiel
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## Speicherauslastung
Das `memory_usage` Modul zeigt den aktuellen Systemspeicher und die swap-Nutzung an.
Standardmäßig wird die swap-Nutzung angezeigt, wenn der gesamte System-swap nicht Null ist.
::: Tipp
::: tip
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
@ -752,30 +781,6 @@ icon = " "
style = "bold dimmed green"
```
## 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 aktuelle Verzeichnis enthält `pom.xml`, `build.gradle` oder `build.sbt`
- Das aktuelle Verzeichnis enthält eine Datei mit der `.java`, `.class` oder `.jar` Erweiterung
### Optionen
| Variable | Standardwert | Beschreibung |
| ---------- | -------------- | ----------------------------------------------- |
| `symbol` | `"☕ "` | Symbol das vor der Java-Version angezeigt wird. |
| `style` | `"dimmed red"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `Java`-Modul. |
### Beispiel
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## NodeJS
Das `nodejs`-Modul zeigt die aktuell installierte Version von NodeJS. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
@ -953,7 +958,7 @@ Das `Terraform` Modul zeigt den aktuell ausgewählten terraform Arbeitsbereich u
| -------------- | ------------ | ----------------------------------------------------------- |
| `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. |
| `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. |
| `style` | `"bold 105"` | The style for the module. |
| `style` | `"bold 105"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `terraform` module. |
### Beispiel
@ -977,13 +982,13 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
### Optionen
| 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 |
| `disabled` | `true` | Deaktiviert das `time`-Modul. |
| `utc_time_offset` | `local` | Verwendetes Zeitzonen-Offset. Liegt zwischen -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| 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` | `lokal` | 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. |
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`.

View File

@ -7,7 +7,7 @@
<p align="center">
<a href="https://github.com/starship/starship/actions"
><img
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg"
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg?branch=master&event=push"
alt="Workflow-Status der GitHub Actions" /></a>
<a href="https://crates.io/crates/starship"
><img src="https://img.shields.io/crates/v/starship" alt="Crates.io-Version" /></a>
@ -21,7 +21,7 @@
src="https://img.shields.io/discord/567163873606500352?logo=discord"
alt="Auf Discord chatten" /></a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-58-orange" alt="Alle Mitwirkenden"></a>
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-63-orange" alt="Alle Mitwirkenden"></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
</p>
@ -181,12 +181,15 @@
```
#### Powershell
#### PowerShell
Trage folgendes am Ende der `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (oder `~/.config/powershell/Microsoft.PowerShell_profile.ps1` auf -Nix) ein:
```sh
# ~\Documents\PowerShell\Profile.ps1
# notepad $PROFILE
# ~\Documents\PowerShell\Profile.ps1
Invoke-Expression (&starship init powershell)
```
@ -303,6 +306,11 @@ Danke an diese wunderbaren Leute ([emoji-Schlüssel](https://allcontributors.org
<tr>
<td align="center"><a href="https://github.com/BuggStream"><img src="https://avatars1.githubusercontent.com/u/51194915?v=4" width="100px;" alt="" /><br /><sub><b>BuggStream</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=BuggStream" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=BuggStream" title="Documentation">📖</a></td>
<td align="center"><a href="http://jonstodle.com"><img src="https://avatars1.githubusercontent.com/u/1719761?v=4" width="100px;" alt="" /><br /><sub><b>Jon Grythe Stødle</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=jonstodle" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=jonstodle" title="Tests">⚠️</a></td>
<td align="center"><a href="https://jasonet.co"><img src="https://avatars1.githubusercontent.com/u/10660468?v=4" width="100px;" alt="" /><br /><sub><b>Jason Etcovitch</b></sub></a><br /><a href="https://github.com/starship/starship/issues?q=author%3AJasonEtco" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/etiennemabille"><img src="https://avatars3.githubusercontent.com/u/11175343?v=4" width="100px;" alt="" /><br /><sub><b>Etienne Mabille</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=etiennemabille" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Scotsguy"><img src="https://avatars3.githubusercontent.com/u/20385973?v=4" width="100px;" alt="" /><br /><sub><b>AppleTheGolden</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Documentation">📖</a></td>
<td align="center"><a href="http://sda.io"><img src="https://avatars1.githubusercontent.com/u/481987?v=4" width="100px;" alt="" /><br /><sub><b>Mike Sampson</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=mfs" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Documentation">📖</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Tests">⚠️</a></td>
<td align="center"><a href="https://sternentstehung.de"><img src="https://avatars3.githubusercontent.com/u/36575275?v=4" width="100px;" alt="" /><br /><sub><b>Dominik Braun</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=dominikbraun" title="Code">💻</a></td>
</tr>
</table>

View File

@ -0,0 +1,61 @@
# 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)
### Voraussetzungen
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
### Konfiguration
```toml
[aws]
symbol = " "
[battery]
full_symbol = ""
charging_symbol = ""
discharging_symbol = ""
[conda]
symbol = " "
[git_branch]
symbol = " "
[golang]
symbol = " "
[hg_branch]
symbol = " "
[java]
symbol = " "
[memory_usage]
symbol = " "
[nodejs]
symbol = " "
[package]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
[ruby]
symbol = " "
[rust]
symbol = " "
```

View File

@ -32,51 +32,36 @@ footer: ISC licencié | Copyright © 2019-present Starship Contributors
1. Installer le binaire **starship** :
**[Télécharger les archives des binaires précompilés](https://github.com/starship/starship/releases)** si vous n'utilisez pas une des plateformes citées ci-dessous.
#### Installer la dernière version
#### Homebrew
Avec Shell:
```sh
$ brew install starship
curl -fsSL https://starship.rs/install.sh | bash
```
#### Rust (v1.38 ou plus)
#### Installer via le gestionnaire de paquets
Avec [Homebrew](https://brew.sh/):
```sh
$ cargo install starship
brew install starship
```
Avec [Scoop](https://scoop.sh):
#### Arch Linux (AUR)
Starship is disponible sur AUR sous le nom `starship`. Installer le avec `yay` ou votre client AUR favori.
```sh
$ yay -S starship
```powershell
scoop install starship
```
#### Nix (non stable)
```sh
$ nix-env --install starship
```
#### Termux
```sh
$ pkg install starship
```
1. Add the init script to your shell's config file:
1. Ajouter le script d'initialization à la fiche config de votre shell:
#### Bash
Add the following to the end of `~/.bashrc`:
Ajouter ce qui suit à la fin de `~/.bashrc`:
```sh
# ~/.bashrc
@ -87,7 +72,7 @@ footer: ISC licencié | Copyright © 2019-present Starship Contributors
#### Fish
Add the following to the end of `~/.config/fish/config.fish`:
Ajoute ce qui suit à la fin de `~/.config/fish/config.fish`:
```sh
# ~/.config/fish/config.fish
@ -98,7 +83,7 @@ footer: ISC licencié | Copyright © 2019-present Starship Contributors
#### Zsh
Add the following to the end of `~/.zshrc`:
Ajouter ce qui suit à la fin de `~/.zshrc`:
```sh
# ~/.zshrc
@ -109,9 +94,21 @@ footer: ISC licencié | Copyright © 2019-present Starship Contributors
#### Powershell
Add the following to the end of `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix):
Ajouter ce qui suit à la fin de `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (ou `~/.config/powershell/Microsoft.PowerShell_profile.ps1` sur -Nix):
```sh
# ~\Documents\PowerShell\Profile.ps1
Invoke-Expression (&starship init powershell)
```
#### Ion
Ajouter ce qui suit à la fin de `~/.config/ion/initrc`:
```sh
# ~/.config/ion/initrc
eval $(starship init ion)
```

View File

@ -126,9 +126,10 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
| Variable | Default | Description |
| ----------------- | --------------- | --------------------------------------------------------------------------- |
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
| `displayed_items` | `all` | Choose which item to display. Possible values: [`all`, `profile`, `region`] |
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `AWS` module. |
| `displayed_items` | `all` | Choose which item to display. Possible values: [`all`, `profile`, `region`] |
### Example
@ -139,6 +140,9 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
style = "bold blue"
symbol = "🅰 "
displayed_items = "region"
[aws.region_aliases]
ap-southeast-2 = "au"
us-east-1 = "va"
```
## Battery
@ -255,12 +259,13 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options
| Variable | Default | Description |
| ---------- | --------------- | ---------------------------------------------------------- |
| `min_time` | `2` | Shortest duration to show time for. |
| `prefix` | `took` | Prefix to display immediately before the command duration. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| Variable | Default | Description |
| ------------------- | --------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `prefix` | `took` | Prefix to display immediately before the command duration. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
### Example
@ -268,7 +273,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
# ~/.config/starship.toml
[cmd_duration]
min_time = 4
min_time = 500
prefix = "underwent "
```
@ -276,7 +281,7 @@ prefix = "underwent "
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
::: tip
::: remarque
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
@ -421,9 +426,9 @@ truncation_symbol = ""
## Git Commit
The `git_commit` module shows the active branch of the repo in your current directory.
The `git_commit` module shows the current commit hash of the repo in your current directory.
::: tip
::: remarque
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
@ -645,7 +650,7 @@ threshold = 4
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
::: remarque
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
@ -698,8 +703,8 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
| 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. |
| `impure_msg` | `"impure"` | Customize the "impure" msg. |
| `pure_msg` | `"pure"` | Customize the "pure" msg. |
| `style` | `"bold red"` | The style for the module. |
| `disabled` | `false` | Disables the `nix_shell` module. |
@ -715,13 +720,37 @@ impure_msg = "impure shell"
pure_msg = "pure shell"
```
## Java
The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle`, `build.gradle.kts` or `build.sbt` file
- The current directory contains a file with the `.java`, `.class` or `.jar` extension
### Options
| Variable | Default | Description |
| ---------- | -------------- | ------------------------------------------------------ |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. |
| `style` | `"dimmed red"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Example
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## Memory Usage
The `memory_usage` module shows current system memory and swap usage.
By default the swap usage is displayed if the total system swap is non-zero.
::: tip
::: remarque
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
@ -753,30 +782,6 @@ separator = "/"
style = "bold dimmed green"
```
## Java
The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle` or `build.sbt` file
- The current directory contains a file with the `.java`, `.class` or `.jar` extension
### Options
| Variable | Default | Description |
| ---------- | -------------- | ------------------------------------------------------ |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. |
| `style` | `"dimmed red"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Example
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met:
@ -970,7 +975,7 @@ symbol = "🏎💨 "
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
::: tip
::: remarque
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
@ -983,8 +988,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `use_12hr` | `false` | Enables 12 hour formatting |
| `format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `bold yellow` | The style for the module time |
| `disabled` | `true` | Disables the `time` module. |
| `utc_time_offset` | `local` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.

View File

@ -1,45 +1,45 @@
# FAQ
# Foire aux questions
## What is the configuration used in the demo GIF?
## Quelle est la configuration utilisée dans le GIF de démonstration ?
- **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/)
- **Émulateur de terminal**: [iTerm2](https://iterm2.com/)
- **Thème** : Minimal
- **Palette de couleurs**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
- **Police d'écriture**: [Fira Code](https://github.com/tonsky/FiraCode)
- **Shell** : [Fish Shell](https://fishshell.com/)
- **Configuration**: [Dotfiles de matchai](https://github.com/matchai/dotfiles/blob/master/.config/fish/config.fish)
- **Invite de commande**: [Starship](https://starship.rs/)
## Do `prompt_order` and `<module>.disabled` do the same thing?
## Est-ce que `prompt_order` et `<module>.disabled` font la même chose ?
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:
Oui, ils peuvent tous deux être utilisés pour désactiver les modules dans l'invite de commande. Si tout ce que vous prévoyez de faire est de désactiver les modules, `<module>.disabled` est le meilleur moyen de le faire pour ces raisons :
- 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
- Désactiver les modules est plus explicite que de les omettre dans le prompt_order
- Les modules nouvellement créés seront ajoutés à l'invite de commande au fur et à mesure que Starship sera mis à jour
## The docs say Starship is cross-shell, but it doesn't support X shell. Why?
## La doc dit que Starship est cross-shell, mais il ne supporte pas X shell. Pourquoi ?
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.
Étant donné la façon dont Starship est construit, il devrait être possible d'ajouter le support pour pratiquement n'importe quel shell. Le binaire de Starship est sans état et agnostique, donc tant que votre shell supporte la personnalisation rapide et l'expansion du shell, Starship peut être utilisé.
Here's a small example getting Starship working with bash:
Voici un petit exemple pour que Starship fonctionne avec bash :
```sh
# Get the status code from the last command executed
# Récupère le code d'état de la dernière commande exécutée
STATUS=$?
# Get the number of jobs running.
# Récupère le nombre de tâches en cours d'exécution.
NUM_JOBS=$(jobs -p | wc -l)
# Set the prompt to the output of `starship prompt`
# Définit l'invite de commande `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.
[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.
For a list of all flags accepted by `starship prompt`, use the following command:
Pour une liste de tous les flags acceptés par `starship prompt`, utilisez la commande suivante :
```sh
starship prompt --help
```
The prompt will use as much context as is provided, but no flags are "required".
L'invite de commande utilisera toutes les données contextuelles fournies, mais aucun indicateur n'est "requis".

View File

@ -7,7 +7,7 @@
<p align="center">
<a href="https://github.com/starship/starship/actions"
><img
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg"
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg?branch=master&event=push"
alt="GitHub Actions état du workflow" /></a>
<a href="https://crates.io/crates/starship"
><img src="https://img.shields.io/crates/v/starship" alt="Version Crates.io" /></a>
@ -21,7 +21,7 @@
src="https://img.shields.io/discord/567163873606500352?logo=discord"
alt="Discuter sur Discord" /></a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-58-orange" alt="Tous les contributeurs"></a>
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-63-orange" alt="Tous les contributeurs"></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
</p>
@ -58,7 +58,7 @@
<h1></h1>
<p align="center"> Starship est un environnement minimal, extrêmement rapide et extrêmement personnalisable pour n'importe quelle terminale shell!<br /> Le prompt affiche les informations dont vous avez besoin pendant que vous travaillez, tout en restant élégant et hors du chemin. <p>
<p align="center"> Starship est l'invite de commande minimale, ultra rapide et extrêmement personnalisable pour n'importe quel shell !<br /> Il vous indique les informations dont vous avez besoin pendant que vous travaillez, tout en restant élégant et discret. <p>
<p align="center">
<br>
@ -69,7 +69,7 @@
## 🍬 Fonctionnalités
- Le symbole de prompt devient rouge si la dernière commande a retournée un code différent de zéro
- Le symbole de prompt devient rouge si la dernière commande a retourné un code différent de zéro
- Version actuelle de Go (`🐹`)
- Version actuelle de Java (`☕`)
- Version actuelle de Node.js (`⬢`)
@ -82,7 +82,7 @@
- npm (Node.js)
- cargo (Rust)
- poetry (Python)
- compositeur (PHP)
- composer (PHP)
- Branche Git actuelle et affichage "riche" du statut du dépôt:
- `=` — Conflits dans les changements
- `⇡` — En avance sur la branche distante
@ -181,12 +181,13 @@
```
#### Powershell
#### PowerShell
Ajouter ce qui suit à la fin de `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (ou `~/.config/powershell/Microsoft.PowerShell_profile.ps1` sur -Nix):
```sh
# ~\Documents\PowerShell\Profile.ps1
Invoke-Expression (&starship init powershell)
```
@ -303,6 +304,11 @@ Merci à ces personnes merveilleuses ([clé emojis](https://allcontributors.org/
<tr>
<td align="center"><a href="https://github.com/BuggStream"><img src="https://avatars1.githubusercontent.com/u/51194915?v=4" width="100px;" alt="" /><br /><sub><b>BuggStream</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=BuggStream" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=BuggStream" title="Documentation">📖</a></td>
<td align="center"><a href="http://jonstodle.com"><img src="https://avatars1.githubusercontent.com/u/1719761?v=4" width="100px;" alt="" /><br /><sub><b>Jon Grythe Stødle</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=jonstodle" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=jonstodle" title="Tests">⚠️</a></td>
<td align="center"><a href="https://jasonet.co"><img src="https://avatars1.githubusercontent.com/u/10660468?v=4" width="100px;" alt="" /><br /><sub><b>Jason Etcovitch</b></sub></a><br /><a href="https://github.com/starship/starship/issues?q=author%3AJasonEtco" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/etiennemabille"><img src="https://avatars3.githubusercontent.com/u/11175343?v=4" width="100px;" alt="" /><br /><sub><b>Etienne Mabille</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=etiennemabille" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Scotsguy"><img src="https://avatars3.githubusercontent.com/u/20385973?v=4" width="100px;" alt="" /><br /><sub><b>AppleTheGolden</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Documentation">📖</a></td>
<td align="center"><a href="http://sda.io"><img src="https://avatars1.githubusercontent.com/u/481987?v=4" width="100px;" alt="" /><br /><sub><b>Mike Sampson</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=mfs" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Documentation">📖</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Tests">⚠️</a></td>
<td align="center"><a href="https://sternentstehung.de"><img src="https://avatars3.githubusercontent.com/u/36575275?v=4" width="100px;" alt="" /><br /><sub><b>Dominik Braun</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=dominikbraun" title="Code">💻</a></td>
</tr>
</table>

View File

@ -0,0 +1,61 @@
# 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)
### Pré-requis
- 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 = " "
[git_branch]
symbol = " "
[golang]
symbol = " "
[hg_branch]
symbol = " "
[java]
symbol = " "
[memory_usage]
symbol = " "
[nodejs]
symbol = " "
[package]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
[ruby]
symbol = " "
[rust]
symbol = " "
```

View File

@ -32,43 +32,28 @@ footer: ISC Licensed | Copyright © 2019-present Starship Contributors
1. **Starship** のバイナリをインストール
もし以下のプラットフォームを使用していない場合は **[コンパイル済みのバイナリファイルをダウンロード](https://github.com/starship/starship/releases)** してください。
#### Install Latest Version
#### Homebrew
With Shell:
```sh
$ brew install starship
curl -fsSL https://starship.rs/install.sh | bash
```
#### Rust (v1.38 もしくはそれ以上)
#### Install via Package Manager
With [Homebrew](https://brew.sh/):
```sh
$ cargo install starship
brew install starship
```
With [Scoop](https://scoop.sh):
#### Arch Linux (AUR)
Starship は AUR 上の `starship` というパッケージ名で利用可能です。 `yay` またはお好きな AUR ヘルパーでインストールしてください。
```sh
$ yay -S starship
```
#### Nix (unstable)
```sh
$ nix-env --install starship
```
#### Termux
```sh
$ pkg install starship
```powershell
scoop install starship
```
1. 初期化のためのスクリプトをシェルの設定ファイルに追加
@ -113,5 +98,17 @@ footer: ISC Licensed | Copyright © 2019-present Starship Contributors
```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)
```

View File

@ -123,12 +123,13 @@ prompt_order = [
### オプション
| 変数 | デフォルト | 説明 |
| ----------------- | --------------- | -------------------------------------------------------- |
| `symbol` | `"☁️ "` | 現在のAWSプロファイルを表示する前に表示される記号です。 |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | `aws`モジュールを無効にします。 |
| `displayed_items` | `all` | 表示するアイテムを選択します。 指定可能な値は以下です。[`all`, `profile`, `region`] |
| 変数 | デフォルト | 説明 |
| ----------------- | --------------- | --------------------------------------------------------------- |
| `symbol` | `"☁️ "` | 現在のAWSプロファイルを表示する前に表示される記号です。 |
| `displayed_items` | `all` | 表示するアイテムを選択します。 指定可能な値は以下です。[`all`, `profile`, `region`] |
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | `aws`モジュールを無効にします。 |
### 設定例
@ -139,6 +140,9 @@ prompt_order = [
style = "bold blue"
symbol = "🅰 "
displayed_items = "region"
[aws.region_aliases]
ap-southeast-2 = "au"
us-east-1 = "va"
```
## バッテリー
@ -256,12 +260,13 @@ preexecのような機能を必要とするBashユーザーは、 [rcalorasのba
### オプション
| 変数 | デフォルト | 説明 |
| ---------- | --------------- | --------------------------- |
| `min_time` | `2` | 時間を表示する最短期間です。 |
| `prefix` | `took` | コマンド実行時間の直前に表示する文字列です。 |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | `cmd_duration`モジュールを無効にします。 |
| 変数 | デフォルト | 説明 |
| ------------------- | --------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `prefix` | `took` | コマンド実行時間の直前に表示する文字列です。 |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | `cmd_duration`モジュールを無効にします。 |
### 設定例
@ -269,13 +274,13 @@ preexecのような機能を必要とするBashユーザーは、 [rcalorasのba
# ~/.config/starship.toml
[cmd_duration]
min_time = 4
min_time = 500
prefix = "underwent "
```
## Conda
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
`$CONDA_DEFAULT_ENV`が設定されている場合、`conda`モジュールは現在のcondaの環境を表示します。
::: tip
@ -288,9 +293,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| 変数 | デフォルト | 説明 |
| ------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. |
| `symbol` | `"C "` | The symbol used before the environment name. |
| `style` | `"bold green"` | The style for the module. |
| `disabled` | `false` | Disables the `conda` module. |
| `symbol` | `"C "` | 環境名の直前に使用されるシンボルです。 |
| `style` | `"bold green"` | モジュールのスタイルです。 |
| `disabled` | `false` | `conda`モジュールを無効にします。 |
### 設定例
@ -305,9 +310,9 @@ style = "dimmed green"
`directory`モジュールには、現在のディレクトリへのパスが表示され、3つの親フォルダは切り捨てられます。 ディレクトリは、現在のgitリポジトリであるとルートとなります。
When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
fishスタイルのpwdオプションを使用すると、切り捨てられたパスを非表示にする代わりに、オプションで有効にした番号に基づいて各ディレクトリの短縮名が表示されます。
For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
例として、`~/Dev/Nix/nixpkgs/pkgs`で、`nixpkgs`がリポジトリルートであり、オプションが`1`に設定されている場合を挙げます。 以前は`nixpkgs/pkgs`でしたが、`~/D/N/nixpkgs/pkgs`が表示されます。
### オプション
@ -316,11 +321,11 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `truncation_length` | `3` | 現在のディレクトリを切り捨てる親フォルダーの数です。 |
| `truncate_to_repo` | `true` | 現在いるgitリポジトリのルートに切り捨てるかどうかです。 |
| `prefix` | `"in "` | Prefix to display immediately before the directory. |
| `style` | `"bold cyan"` | The style for the module. |
| `disabled` | `false` | Disables the `directory` module. |
| `style` | `"bold cyan"` | モジュールのスタイルです。 |
| `disabled` | `false` | `directory`モジュールを無効にします。 |
<details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
<summary>このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。</summary>
| 変数 | デフォルト | 説明 |
| --------------------------- | ------ | -------------------------------------------- |
@ -340,11 +345,11 @@ truncation_length = 8
## Dotnet
The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
`dotnet` モジュールはカレントディレクトリに関係する.NET Core SDKのバージョンを表示します。 もし SDKは現在のディレクトリに固定されているのであれば、その固定されたバージョンが表示されます。 それ以外の場合、モジュール SDKの最新のインストールバージョンを示します。
This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly.
このモジュールは、カレントディレクトリに次のファイルのいずれかが存在する場合にのみプロンプトに表示されます。: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj` 正しく使用するには、.NET Coreコマンドラインツールもインストールする必要があります。
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
内部的に、このモジュールは自身のバージョン検知のメカニズムを利用します。 `dotnet --version` を実行するより2倍速く実行できますが、.NET project一般的でないディレクトリlayoutの場合は間違ったバージョンが示されてしまうことがあります。 速度よりも精度が重要な場合は、次の方法でメカニズムを無効にできます。 モジュールオプションで`heuristic = false `を設定します。
### オプション
@ -422,11 +427,11 @@ truncation_symbol = ""
## Git コミット
The `git_commit` module shows the active branch of the repo in your current directory.
The `git_commit` module shows the current commit hash of the repo in your current directory.
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
:::
@ -452,7 +457,7 @@ commit_hash_length = 4
## Git の進行状態
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
`git_state`モジュールはgitディレクトリの進行状態を表します。 (例: _REBASING_, _BISECTING_, その他) 進捗情報がある場合(例: REBASING 3/10)はその情報も表示されます。
### オプション
@ -699,8 +704,8 @@ disabled = true
| 変数 | デフォルト | 説明 |
| ------------ | ------------ | ------------------------ |
| `use_name` | `false` | nix-shellの名前を表示します。 |
| `impure_msg` | `impure` | impureメッセージをカスタマイズします。 |
| `pure_msg` | `pure` | pureメッセージをカスタマイズします。 |
| `impure_msg` | `"impure"` | impureメッセージをカスタマイズします。 |
| `pure_msg` | `"pure"` | pureメッセージをカスタマイズします。 |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | `nix_shell`モジュールを無効にします。 |
@ -716,6 +721,30 @@ impure_msg = "impure shell"
pure_msg = "pure shell"
```
## Java
`java`モジュールは、現在インストールされているJavaのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `pom.xml`, `build.gradle`, `build.gradle.kts` or `build.sbt` file
- カレントディレクトリに拡張子が`.java`, `.class`, もしくは`.jar`のファイルが含まれている
### オプション
| 変数 | デフォルト | 説明 |
| ---------- | -------------- | --------------------------- |
| `symbol` | `"☕ "` | Javaのバージョンを表示する前に使用される記号です。 |
| `style` | `"dimmed red"` | モジュールのスタイルです。 |
| `disabled` | `false` | `Java`モジュールを無効にします。 |
### 設定例
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## メモリ使用量
`memory_usage</ 0>モジュールは、現在のシステムメモリとスワップ使用量を示します。</p>
@ -755,30 +784,6 @@ separator = "/"
style = "bold dimmed green"
```
## Java
`java`モジュールは、現在インストールされているJavaのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`pom.xml`, `build.gradle`,もしくは`build.sbt`が含まれている
- カレントディレクトリに拡張子が`.java`, `.class`, もしくは`.jar`のファイルが含まれている
### オプション
| 変数 | デフォルト | 説明 |
| ---------- | -------------- | --------------------------- |
| `symbol` | `"☕ "` | Javaのバージョンを表示する前に使用される記号です。 |
| `style` | `"dimmed red"` | モジュールのスタイルです。 |
| `disabled` | `false` | `Java`モジュールを無効にします。 |
### 設定例
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## NodeJS
`nodejs`モジュールは、現在インストールされているNodeJSのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
@ -858,13 +863,13 @@ symbol = "🔹 "
## Python
The `python` module shows the currently installed version of Python.
`python`モジュールは、現在インストールされているPythonのバージョンを示します。
If `pyenv_version_name` is set to `true`, it will display the pyenv version name.
`pyenvversionname`が`true`に設定されている場合 、pyenvでのバージョン名が表示されます 。
Otherwise, it will display the version number from `python --version` and show the current Python virtual environment if one is activated.
それ以外の場合は、 `python --version`バージョン番号が表示され、アクティブになっている場合は現在のPython仮想環境が表示されます。
The module will be shown if any of the following conditions are met:
次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`.python-version`ファイルが含まれている
- カレントディレクトリに`requirements.txt`ファイルが含まれている
@ -968,27 +973,27 @@ symbol = "⚙️ "
symbol = "🏎💨 "
```
## Time
## 時刻
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
`time`モジュールは、現在の**現地**時間を示します。 `format`設定は、時間の表示方法を制御するために[`chrono`](https://crates.io/crates/chrono)クレートによって使用されます。 使用可能なオプションを確認するには、[chrono strftimeのドキュメント](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)をご覧ください。
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
:::
### オプション
| 変数 | デフォルト | 説明 |
| ----------------- | ------------- | ------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Enables 12 hour formatting |
| `format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `bold yellow` | The style for the module time |
| `disabled` | `true` | Disables the `time` module. |
| `utc_time_offset` | `local` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| 変数 | デフォルト | 説明 |
| ----------------- | -------------- | ------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | 12時間のフォーマットを有効にします。 |
| `format` | この表の下を参照してください | 時刻のフォーマットに使用される[クロノフォーマット文字列](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) です。 |
| `style` | `bold yellow` | モジュールのスタイルです。 |
| `utc_time_offset` | `local` | 使用するUTCオフセットを設定します。 -24から24までの間で設定可能です。 フロートが30/45分のタイムゾーンオフセットに対応できるようにします。 |
| `disabled` | `true` | `time`モジュールを無効にします。 |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.
`use_12hr``true` の場合、`format` のデフォルトは `"%r"` です。 それ以外の場合、デフォルトは`"%T"`です。 `format`を手動で設定すると、`use_12hr`の設定が上書きされます。
### 設定例
@ -1001,25 +1006,25 @@ format = "🕙[ %T ]"
utc_time_offset = -5
```
## Username
## ユーザー名
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
`username`モジュールには、アクティブなユーザーのユーザー名が表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current user is root
- The current user isn't the same as the one that is logged in
- The user is currently connected as an SSH session
- The variable `show_always` is set to true
- カレントユーザーがroot
- カレントユーザーが、ログインしているユーザーとは異なる
- ユーザーがSSHセッションとして接続されている
- `show_always`変数がtrueに設定されている
### Options
### オプション
| Variable | Default | Description |
| ------------- | --------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| 変数 | デフォルト | 説明 |
| ------------- | --------------- | ------------------------- |
| `style_root` | `"bold red"` | ユーザーがrootのときに使用されるスタイルです。 |
| `style_user` | `"bold yellow"` | 非rootユーザーに使用されるスタイルです。 |
| `show_always` | `false` | `username`モジュールを常に表示します。 |
| `disabled` | `false` | `username`モジュールを無効にします。 |
### Example
### 設定例
```toml
# ~/.config/starship.toml

View File

@ -7,7 +7,7 @@
<p align="center">
<a href="https://github.com/starship/starship/actions"
><img
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg"
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg?branch=master&event=push"
alt="GitHub Actions workflow status" /></a>
<a href="https://crates.io/crates/starship"
><img src="https://img.shields.io/crates/v/starship" alt="Crates.io version" /></a>
@ -21,7 +21,7 @@
src="https://img.shields.io/discord/567163873606500352?logo=discord"
alt="Chat on Discord" /></a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-58-orange" alt="All Contributors"></a>
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-63-orange" alt="All Contributors"></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
</p>
@ -181,12 +181,13 @@
```
#### Powershell
#### PowerShell
`~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (それか Nix上の `~/.config/powershell/Microsoft.PowerShell_profile.ps1` )の末尾に以下を追加してください。
```sh
# ~\Documents\PowerShell\Profile.ps1
Invoke-Expression (&starship init powershell)
```
@ -303,6 +304,11 @@ Starship の設定方法の詳細に関しては、[ドキュメント](https://
<tr>
<td align="center"><a href="https://github.com/BuggStream"><img src="https://avatars1.githubusercontent.com/u/51194915?v=4" width="100px;" alt="" /><br /><sub><b>BuggStream</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=BuggStream" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=BuggStream" title="Documentation">📖</a></td>
<td align="center"><a href="http://jonstodle.com"><img src="https://avatars1.githubusercontent.com/u/1719761?v=4" width="100px;" alt="" /><br /><sub><b>Jon Grythe Stødle</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=jonstodle" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=jonstodle" title="Tests">⚠️</a></td>
<td align="center"><a href="https://jasonet.co"><img src="https://avatars1.githubusercontent.com/u/10660468?v=4" width="100px;" alt="" /><br /><sub><b>Jason Etcovitch</b></sub></a><br /><a href="https://github.com/starship/starship/issues?q=author%3AJasonEtco" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/etiennemabille"><img src="https://avatars3.githubusercontent.com/u/11175343?v=4" width="100px;" alt="" /><br /><sub><b>Etienne Mabille</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=etiennemabille" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Scotsguy"><img src="https://avatars3.githubusercontent.com/u/20385973?v=4" width="100px;" alt="" /><br /><sub><b>AppleTheGolden</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Documentation">📖</a></td>
<td align="center"><a href="http://sda.io"><img src="https://avatars1.githubusercontent.com/u/481987?v=4" width="100px;" alt="" /><br /><sub><b>Mike Sampson</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=mfs" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Documentation">📖</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Tests">⚠️</a></td>
<td align="center"><a href="https://sternentstehung.de"><img src="https://avatars3.githubusercontent.com/u/36575275?v=4" width="100px;" alt="" /><br /><sub><b>Dominik Braun</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=dominikbraun" title="Code">💻</a></td>
</tr>
</table>

View File

@ -0,0 +1,61 @@
# 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)
### 必要なもの
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
### 設定
```toml
[aws]
symbol = " "
[battery]
full_symbol = ""
charging_symbol = ""
discharging_symbol = ""
[conda]
symbol = " "
[git_branch]
symbol = " "
[golang]
symbol = " "
[hg_branch]
symbol = " "
[java]
symbol = " "
[memory_usage]
symbol = " "
[nodejs]
symbol = " "
[package]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
[ruby]
symbol = " "
[rust]
symbol = " "
```

View File

@ -1,23 +1,23 @@
---
home: true
heroImage: /logo.svg
actionText: Get Started
actionText: Начало работы
actionLink: /guide/
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
footer: Под лицензией ISC | Авторское право © 2019-настоящее Starship Contributors
---
<div class="features">
<div class="feature">
<h2>Compatibility First</h2>
<p>Works on the most common shells on the most common operating systems. Use it everywhere!</p>
<h2>Совместивость в первую очередь</h2>
<p>Работает на большинстве распространенных оболочек и наиболее распространенных операционных системах. Используйте везде!</p>
</div>
<div class="feature">
<h2>Rust-Powered</h2>
<p>Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.</p>
<h2>Основана на Rust</h2>
<p>Приносит наилучшую в своем классе скорость и безопасность Rust, чтобы сделать вашу подсказку как можно быстрее и надежнее.</p>
</div>
<div class="feature">
<h2>Customizable</h2>
<p>Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be.</p>
<h2>Настраиваемая</h2>
<p>Каждая маленькая деталь настраивается по вашему вкусу, чтобы сделать эту подсказку минимальной или функциональной, как вы захотите.</p>
</div>
</div>
@ -28,55 +28,40 @@ footer: ISC Licensed | Copyright © 2019-present Starship Contributors
</video>
</div>
### Quick Install
### Быстрая установка
1. Install the **starship** binary:
**[Download archives of precompiled binaries](https://github.com/starship/starship/releases)** if you don't use the platforms below.
1. Установите двоичный файл **starship**:
#### Homebrew
#### Установить последнюю версию
Через Bash:
```sh
$ brew install starship
curl -fsSL https://starship.rs/install.sh | bash
```
#### Rust (v1.38 or higher)
#### Установить через менеджер пакетов
С [Homebrew](https://brew.sh/):
```sh
$ cargo install starship
brew install starship
```
С [Scoop](https://scoop.sh):
#### Arch Linux (AUR)
Starship is available on the AUR under the name `starship`. Install it with `yay` or your favorite AUR helper.
```sh
$ yay -S starship
```powershell
scoop install starship
```
#### Nix (unstable)
```sh
$ nix-env --install starship
```
#### Termux
```sh
$ pkg install starship
```
1. Add the init script to your shell's config file:
1. Добавить сценарий инициализации в конфигурационный файл вашей оболочки:
#### Bash
Add the following to the end of `~/.bashrc`:
Добавьте следующее в конец `~/.bashrc`:
```sh
# ~/.bashrc
@ -87,7 +72,7 @@ footer: ISC Licensed | Copyright © 2019-present Starship Contributors
#### Fish
Add the following to the end of `~/.config/fish/config.fish`:
Добавьте следующее в конец `~/.config/fish/config.fish`:
```sh
# ~/.config/fish/config.fish
@ -98,7 +83,7 @@ footer: ISC Licensed | Copyright © 2019-present Starship Contributors
#### Zsh
Add the following to the end of `~/.zshrc`:
Добавьте следующее в конец `~/.zshrc`:
```sh
# ~/.zshrc
@ -107,11 +92,23 @@ footer: ISC Licensed | Copyright © 2019-present Starship Contributors
```
#### Powershell
#### PowerShell
Add the following to the end of `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix):
Добавьте следующее в конец `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (или `~/.config/powershell/Microsoft.PowerShell_profile.ps1` на -Nix):
```sh
# ~\Documents\PowerShell\Profile.ps1
Invoke-Expression (&starship init powershell)
```
#### Ion
Добавьте следующее в конец `~/.config/ion/initrc`:
```sh
# ~/.config/ion/initrc
eval $(starship init ion)
```

View File

@ -1,18 +1,18 @@
# 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.
Хотя Starship - это универсальная оболочка, иногда вам нужно сделать больше, чем просто редактировать `starship.toml`, для того чтобы сделать определенные вещи. Эта страница описывает некоторые из дополнительных техник конфигурации, используемых в Starship.
::: warning
The configurations in this section are subject to change in future releases of Starship.
Конфигурации в этом разделе могут быть изменены в будущих выпусках Starship.
:::
## Custom pre-prompt and pre-execution Commands in Bash
## Пользовательские команды перед подсказкой и запуском в Bash
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
Bash не имеет формальной среды preexec/precmd, как и большинство других оболочек. Из-за этого трудно предоставить полностью настраиваемые хуки в `bash`. Тем не менее, Starship дает вам ограниченную возможность вставить собственные функции в процедуру отображения подсказки:
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
- Чтобы запустить пользовательскую функцию прямо перед отображением подсказки, определите новую функцию и затем назначьте ей имя `starship_precmd_user_func`. Например, чтобы нарисовать ракету перед появлением подсказки, сделайте
```bash
function blastoff(){
@ -21,7 +21,7 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
- Чтобы запустить пользовательскую функцию перед запуском команды, вы можете использовать [механизм ловушки `DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Тем не менее, вы **должны** поймать сигнал DEBUG *перед* инициализацией Starship! Starship может сохранить значение ловушки DEBUG, но если ловушка перезаписана после запуска Starship, некоторая функциональность сломается.
```bash
function blastoff(){
@ -31,11 +31,11 @@ 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`.
Некоторые подсказки к оболочке автоматически меняют заголовок окна для вас (например, отражая ваш рабочий каталог). Fish даже делает это по умолчанию. Starship не делает этого, но достаточно легко добавить эту функциональность к `bash` или `zsh`.
First, define a window title change function (identical in bash and zsh):
Сначала задайте функцию изменения заголовка окна (идентичную в bash и zsh):
```bash
function set_win_title(){
@ -43,25 +43,25 @@ function set_win_title(){
}
```
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
Вы можете использовать переменные для настройки этого заголовка (`$USER`, `$HOSTNAME`, и `$PWD` являются популярными вариантами).
In `bash`, set this function to be the precmd starship function:
В `bash`, установите эту функцию как функцию precmd в Starship:
```bash
starship_precmd_user_func="set_win_title"
```
In `zsh`, add this to the `precmd_functions` array:
В `zsh`, добавьте это в массив `precmd_functions`:
```bash
precmd_functions+=(set_win_title)
```
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zsrhc`) to make it permanent.
Если вам нравится результат, добавьте эти строки в конфигурационный файл оболочки (`~/.bashrc` или `~/.zsrhc`), чтобы сделать его постоянным.
## Стиль строк
## Строки стиля
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
Строки стиля - это список слов, разделенных пробелами. Слова не чувствительны к регистру (то есть `bold` и `BoLd` считаются одной строкой). Каждое слово может быть одним из следующих:
- `bold`
- `underline`
@ -71,14 +71,14 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- `<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.
где `<color>` является цветовым спецификатором (обсуждается ниже). `fg:<color>` и `<color>` в настоящее время делают одно и то же, хотя это может измениться в будущем. Порядок слов в строке не имеет значения.
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.
Токен `none` переопределяет все остальные токены в строке, например `fg:red none fg:blue` все равно создаст строку без стиля. Использование `none` в сочетании с другими токенами может стать ошибкой в будущем.
A color specifier can be one of the following:
Цветовой спецификатор может быть одним из следующих:
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
- Один из стандартных цветов терминалов: `black`, `red`, `green`, `blue`, `gellow`, `purple`, `cyan`, `white`. Вы можете по желанию добавить префикс `bright-`, чтобы получить яркую версию (например, `bright-white`).
- `#`, за которой следует шестизначное шестнадцатеричное число. Это определяет [шестнадцатеричный код цвета RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Число от 0 до 255. Это определяет [8-битный код цвета ANSI](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Если для переднего плана/фона задано несколько цветов, то последняя из строк будет иметь приоритет.

View File

@ -126,9 +126,10 @@ prompt_order = [
| Переменная | По умолчанию | Описание |
| ----------------- | --------------- | ---------------------------------------------------------------- |
| `symbol` | `"☁️ "` | Символ перед отображением текущего профиля AWS. |
| `displayed_items` | `all` | Выбор элементов. Возможные значения [`all`, `profile`, `region`] |
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
| `style` | `"bold yellow"` | Стиль модуля. |
| `disabled` | `false` | Отключение модуля `AWS`. |
| `displayed_items` | `all` | Выбор элементов. Возможные значения [`all`, `profile`, `region`] |
### Пример
@ -139,6 +140,9 @@ prompt_order = [
style = "bold blue"
symbol = "🅰 "
displayed_items = "region"
[aws.region_aliases]
ap-southeast-2 = "au"
us-east-1 = "va"
```
## Батарея
@ -255,12 +259,13 @@ use_symbol_for_status = true
### Опции
| Переменная | По умолчанию | Описание |
| ---------- | --------------- | ------------------------------------------------------- |
| `min_time` | `2` | Кратчайшая длительность для показа времени. |
| `prefix` | `took` | Префикс, отображаемый перед продолжительностью команды. |
| `style` | `"bold yellow"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `cmd_duration`. |
| Переменная | По умолчанию | Описание |
| ------------------- | --------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `prefix` | `took` | Префикс, отображаемый перед продолжительностью команды. |
| `style` | `"bold yellow"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `cmd_duration`. |
### Пример
@ -268,13 +273,13 @@ use_symbol_for_status = true
# ~/.config/starship.toml
[cmd_duration]
min_time = 4
min_time = 500
prefix = "underwent "
```
## Конда
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
Модуль `conda` показывает текущее окружение conda, если `$CONDA_DEFAULT_ENV` присвоено значение.
::: tip
@ -287,9 +292,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| Переменная | По умолчанию | Описание |
| ------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. |
| `symbol` | `"C "` | The symbol used before the environment name. |
| `style` | `"bold green"` | The style for the module. |
| `disabled` | `false` | Disables the `conda` module. |
| `symbol` | `"C "` | Символ перед названием окружения. |
| `style` | `"bold green"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `conda`. |
### Пример
@ -302,11 +307,11 @@ style = "dimmed green"
## Каталог
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
Модуль `directory` показывает путь к вашей текущей директории, усеченной до трех родительских папок. Ваш каталог также будет отсечен до корня git репозитория, в котором вы находитесь.
When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
При использовании стиля оболочки fish, вместо скрытия усеченного каталога, вы увидите укороченное имя каталога, зависимое от числа символов вы установите для этой опции.
For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
Например, возьмем `~/Dev/Nix/nixpkgs/pkgs` где `nixpkgs` является корневым репозиторием, и в опции установлено `1`. Вы увидите `~/D/N/nixpkgs/pkgs`, а до этого было бы `nixpkgs/pkgs`.
### Опции
@ -314,12 +319,12 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| ------------------- | ------------- | ---------------------------------------------------------------------------- |
| `truncation_length` | `3` | Количество родительских папок, к которым должен быть усечен текущий каталог. |
| `truncate_to_repo` | `true` | Следует или нет обрезать до корня репозитория git, в котором вы находитесь. |
| `prefix` | `"in "` | Prefix to display immediately before the directory. |
| `style` | `"bold cyan"` | The style for the module. |
| `disabled` | `false` | Disables the `directory` module. |
| `prefix` | `"in "` | Префикс, отображаемый перед папкой. |
| `style` | `"bold cyan"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `directory`. |
<details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
<summary>Этот модуль имеет несколько расширенных опций конфигурации, которые контролируют отображение каталога.</summary>
| Переменная | По умолчанию | Описание |
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
@ -339,11 +344,11 @@ truncation_length = 8
## Dotnet
The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
Модуль `dotnet` показывает соответствующую версию .NET Core SDK для текущего каталога. Если SDK был закреплен в текущей директории, будет показана закрепленная версия. В противном случае модуль отображает последнюю установленную версию SDK.
This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly.
Этот модуль будет показан только, когда один из следующих файлов присутствует в текущей директории: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. Также, для правильного использования, нужны инструменты командной строки .NET Core.
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
Внутренне этот модуль использует свой собственный механизм определения версий. Обычно он в два раза быстрее, чем `dotnet --version`, но он может показывать неправильную версию, если ваш .NET проект имеет необычный формат каталога. Если точность важнее, чем скорость, вы можете отключить механизм опцией `heuristic = false` в настройках модуля.
### Опции
@ -421,11 +426,11 @@ truncation_symbol = ""
## Git Commit
The `git_commit` module shows the active branch of the repo in your current directory.
Модуль `git_commit` показывает хэш текущего коммита репозитория в вашем текущем каталоге.
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
:::
@ -647,7 +652,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
:::
@ -698,8 +703,8 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
| Переменная | По умолчанию | Описание |
| ------------ | ------------ | ---------------------------------- |
| `use_name` | `false` | Display the name of the nix-shell. |
| `impure_msg` | `impure` | Customize the "impure" msg. |
| `pure_msg` | `pure` | Customize the "pure" msg. |
| `impure_msg` | `"impure"` | Customize the "impure" msg. |
| `pure_msg` | `"pure"` | Customize the "pure" msg. |
| `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `nix_shell` module. |
@ -715,6 +720,30 @@ impure_msg = "impure shell"
pure_msg = "pure shell"
```
## Java
The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle`, `build.gradle.kts` or `build.sbt` file
- The current directory contains a file with the `.java`, `.class` or `.jar` extension
### Опции
| Переменная | По умолчанию | Описание |
| ---------- | -------------- | ------------------------------------------------------ |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. |
| `style` | `"dimmed red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `java` module. |
### Пример
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## Memory Usage
The `memory_usage` module shows current system memory and swap usage.
@ -723,7 +752,7 @@ By default the swap usage is displayed if the total system swap is non-zero.
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
:::
@ -753,30 +782,6 @@ separator = "/"
style = "bold dimmed green"
```
## Java
The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle` or `build.sbt` file
- The current directory contains a file with the `.java`, `.class` or `.jar` extension
### Опции
| Переменная | По умолчанию | Описание |
| ---------- | -------------- | ------------------------------------------------------ |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. |
| `style` | `"dimmed red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `java` module. |
### Пример
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met:
@ -954,7 +959,7 @@ The `terraform` module shows the currently selected terraform workspace and vers
| -------------- | ------------ | ----------------------------------------------------------- |
| `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. |
| `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. |
| `style` | `"bold 105"` | The style for the module. |
| `style` | `"bold 105"` | Стиль модуля. |
| `disabled` | `false` | Disables the `terraform` module. |
### Пример
@ -972,7 +977,7 @@ The `time` module shows the current **local** time. The `format` configuration v
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
:::
@ -983,8 +988,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `use_12hr` | `false` | Enables 12 hour formatting |
| `format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `bold yellow` | The style for the module time |
| `disabled` | `true` | Disables the `time` module. |
| `utc_time_offset` | `local` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.
@ -1008,16 +1013,16 @@ The `username` module shows active user's username. The module will be shown if
- The user is currently connected as an SSH session
- The variable `show_always` is set to true
### Options
### Опции
| Variable | Default | Description |
| Переменная | По умолчанию | Описание |
| ------------- | --------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
### Example
### Пример
```toml
# ~/.config/starship.toml

View File

@ -1,27 +1,27 @@
# FAQ
## What is the configuration used in the demo GIF?
## Какая конфигурация используется в демо-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/)
- **Эмулятор терминала**: [iTerm2](https://iterm2.com/)
- **Тема**: Минимальная
- **Цветовая схема**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
- **Шрифт**: [Fira Code](https://github.com/tonsky/FiraCode)
- **Оболочка**: [Fish Shell](https://fishshell.com/)
- **Конфигурация**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/master/.config/fish/config.fish)
- **Подсказка**: [Starship](https://starship.rs/)
## Do `prompt_order` and `<module>.disabled` do the same thing?
## `prompt_order` и `<module>.disabled` - это одно и то же?
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:
Да, они могут быть использованы для отключения модулей в подсказке. Если всё, что вы хотите сделать - это отключить модули, `<module>.disabled` - предпочитаемый способ сделать это по следующим причинам:
- 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
- Отключение модулей является более явным, чем удаление их из prompt_order
- Новосозданные модули будут добавлены в подсказку по мере обновления Starship
## The docs say Starship is cross-shell, but it doesn't support X shell. Why?
## В документации написано, что Starship - для многих оболочек, но он не поддерживает оболочку X. Почему?
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.
Starship устроен так, что есть возможность добавить поддержку практически любой оболочки. Бинарный файл Starship не зависит от оболочки и не имеет состояния, так что если ваша оболочка поддерживает расширение подстрок и настройку подсказки, то Starship может быть использован.
Here's a small example getting Starship working with bash:
Вот небольшой пример работы Starship с bash:
```sh
# Get the status code from the last command executed
@ -34,12 +34,12 @@ NUM_JOBS=$(jobs -p | wc -l)
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.
[Реализация для Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash), встроенная в Starship, несколько сложнее, чтобы предоставить дополнительные возможности, такие как [модуль длительности команды](https://starship.rs/config/#Command-Duration) и обеспечить совместимость Starship с заранее установленными конфигурациями Bash.
For a list of all flags accepted by `starship prompt`, use the following command:
Для списка всех флагов, принимаемых `starship prompt`, используйте следующую команду:
```sh
starship prompt --help
```
The prompt will use as much context as is provided, but no flags are "required".
Подсказка будет использовать столько контекста, сколько доступно, но ни один флаг не обязателен.

View File

@ -2,12 +2,12 @@
<br /><img
width="400"
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
alt="Starship Cross-shell prompt" />
alt="Starship - подсказка для всех оболочек" />
</p>
<p align="center">
<a href="https://github.com/starship/starship/actions"
><img
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg"
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg?branch=master&event=push"
alt="GitHub Actions workflow status" /></a>
<a href="https://crates.io/crates/starship"
><img src="https://img.shields.io/crates/v/starship" alt="Crates.io version" /></a>
@ -21,7 +21,7 @@
src="https://img.shields.io/discord/567163873606500352?logo=discord"
alt="Chat on Discord" /></a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-58-orange" alt="All Contributors"></a>
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-63-orange" alt="All Contributors"></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
</p>
@ -67,7 +67,7 @@
<br>
</p>
## свойство
## 🍬 Особенности
- Символ подсказки становится красным, если последняя команда завершается с ненулевым кодом
- Текущая версия Go (`🐹< / 0>)</li>
@ -78,79 +78,79 @@
<li>Текущая версия Ruby (<code>💎< / 0>)</li>
<li>Текущая версия Rust (<code>🦀< / 0>)</li>
<li>Текущая версия .NET (<code>•NET`)
- Current version of package in current directory (`📦`)
- Текущая версия пакета в текущем каталоге (`📦`)
- npm (Node.js)
- cargo (Rust)
- poetry (Python)
- composer (PHP)
- Current Git branch and rich repo status:
- `=`conflicting changes
- `⇡`ahead of remote branch
- `⇣`behind of remote branch
- `⇕`diverged changes
- `?`untracked changes
- `$`stashed changes
- `!`modified files
- `+`added files
- `»`renamed files
- `✘`deleted files
- Current Mercurial branch
- Current battery level and status
- `⇡` charging
- `⇣` discharging
- `•` fully charged
- Indicator for jobs in the background (`✦`)
- Current Kubernetes Cluster and Namespace (`☸`)
- Current Amazon Web Services (AWS) profile (`☁️`)
- Execution time of the last command
- Custom environment variable value
- Nix-shell environment detection
- Current username if not the same as the logged-in user
- Optional current time in 12/24hr format
- Текущая ветка Git и статус репозитория:
- `=`конфликтующие изменения
- `⇡`впереди удаленной ветки
- `⇣`позади удаленной ветки
- `⇕`неоднозначные изменения
- `?`не отслеживаемые изменения
- `$`отложенные изменения
- `!`изменённые файлы
- `+`добавленные файлы
- `»`переименнованные файлы
- `✘`удалённые файлы
- Текущая ветка Mercurial
- Текущий уровень и состояние заряда батареи
- `⇡` зарядка
- `⇣` разрядка
- `•` полная зарядка
- Индикатор задач в фоне (`✦`)
- Текущий кластер и пространство имён Kubernetes (`☸`)
- Текущий профиль Amazon Web Services (AWS) (`☁`)
- Время выполнения последней команды
- Значение переменной окружения
- Обнаружение среды Nix-shell
- Текущее имя пользователя, если оно не совпадает с именем залогиненного пользователя
- Необязательное текущее время в 12- или 24-часовом формате
## 🚀 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)).
- Установленный и включённый [шрифт Powerline](https://github.com/powerline/fonts) (например, [Fira Code](https://github.com/tonsky/FiraCode)).
### Getting Started
### Начало работы
1. Install the **starship** binary:
1. Установите двоичный файл **starship**:
#### Install Latest Version
#### Установить последнюю версию
##### With Shell:
##### Через Bash:
```sh
curl -fsSL https://starship.rs/install.sh | bash
```
#### Install via Package Manager
#### Установить через менеджер пакетов
##### With [Homebrew](https://brew.sh/):
##### С [Homebrew](https://brew.sh/):
```sh
brew install starship
```
##### With [Scoop](https://scoop.sh):
##### С [Scoop](https://scoop.sh):
```powershell
scoop install starship
```
1. Add the init script to your shell's config file:
1. Добавить сценарий инициализации в конфигурационный файл вашей оболочки:
#### Bash
Add the following to the end of `~/.bashrc`:
Добавьте следующее в конец `~/.bashrc`:
```sh
# ~/.bashrc
@ -161,7 +161,7 @@
#### Fish
Add the following to the end of `~/.config/fish/config.fish`:
Добавьте следующее в конец `~/.config/fish/config.fish`:
```sh
# ~/.config/fish/config.fish
@ -172,7 +172,7 @@
#### Zsh
Add the following to the end of `~/.zshrc`:
Добавьте следующее в конец `~/.zshrc`:
```sh
# ~/.zshrc
@ -181,19 +181,20 @@
```
#### Powershell
#### PowerShell
Add the following to the end of `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix):
Добавьте следующее в конец `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (или `~/.config/powershell/Microsoft.PowerShell_profile.ps1` на -Nix):
```sh
# ~\Documents\PowerShell\Profile.ps1
Invoke-Expression (&starship init powershell)
```
#### Ion
Add the following to the end of `~/.config/ion/initrc`:
Добавьте следующее в конец `~/.config/ion/initrc`:
```sh
# ~/.config/ion/initrc
@ -203,26 +204,26 @@
## 🔧 Конфигурация
For details on how to configure Starship, check out our [documentation](https://starship.rs/config/).
Для получения подробной информации о том, как настроить Starship, ознакомьтесь с [документацией](https://starship.rs/config/).
## 🤝 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).
Мы всегда ищем помощников **всех уровней навыков**! Если вы хотите облегчить свой путь к проекту, попробуйте [хорошие первые задачи](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
### High Priority Needs
### Нужды с высоким приоритетом
- 👩‍💼 **Product Manager**
- We have a GitHub Project and many unorganized/unprioritized features, as well as ideas that haven't yet been made into issues. Starship needs someone to own the product direction!
- 👩‍🎨 **Designer**
- Like making eye-catching websites? Excellent! We are looking to create a beautiful landing page showing off Starship in all its glory. Helping design for Starship's brand is a great opportunity to try out new ideas!
- 👩‍💻 **Rust Developer**
- There is _a lot_ of low-hanging fruit when it comes to writing idiomatic Rust, designing effective Rust architecture, performance optimizations, cross-platform build optimizations, and more! I ([@matchai](https://github.com/matchai)) am a beginner to Rust. Come point us in the right direction!
- 👩‍💼 **Менеджер продукта**
- У нас есть проект GitHub и множество неорганизованных/неприоритизированных функций, а также идей, которые еще не были добавлены в issues. Starship нуждается в ком-то для того, чтобы владеть направлением продукта!
- 👩‍🎨 **Дизайнер**
- Нравится создавать красивые сайты? Превосходно! Мы стремимся создать красивый лендинг, показывающий Starship во всей его красе. Помощь с дизайном бренда Starship - отличная возможность попробовать новые идеи!
- 👩‍💻 **Разработчик на Rust**
- Есть _много_ "лёгкой добычи", когда речь заходит о написании идиоматического Rust, проектировании эффективной архитектуры Rust, оптимизации производительности, оптимизации кроссплатформенной сборки и многом другом! Я ([@matchai](https://github.com/matchai)) - новичок в Rust. Направьте нас в нужном направлении!
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. 👋
Если вы хотите помочь в создании Starship, пожалуйста, ознакомьтесь с нашим [Руководством по содействию](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Кроме того, заходите на наш [Discord сервер](https://discord.gg/8Jzqu3T) и поздоровайтесь. 👋
### Contributors
### Участники
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Спасибо этим замечательным людям ([ключ эмодзи](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
@ -303,6 +304,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<tr>
<td align="center"><a href="https://github.com/BuggStream"><img src="https://avatars1.githubusercontent.com/u/51194915?v=4" width="100px;" alt="" /><br /><sub><b>BuggStream</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=BuggStream" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=BuggStream" title="Documentation">📖</a></td>
<td align="center"><a href="http://jonstodle.com"><img src="https://avatars1.githubusercontent.com/u/1719761?v=4" width="100px;" alt="" /><br /><sub><b>Jon Grythe Stødle</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=jonstodle" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=jonstodle" title="Tests">⚠️</a></td>
<td align="center"><a href="https://jasonet.co"><img src="https://avatars1.githubusercontent.com/u/10660468?v=4" width="100px;" alt="" /><br /><sub><b>Jason Etcovitch</b></sub></a><br /><a href="https://github.com/starship/starship/issues?q=author%3AJasonEtco" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/etiennemabille"><img src="https://avatars3.githubusercontent.com/u/11175343?v=4" width="100px;" alt="" /><br /><sub><b>Etienne Mabille</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=etiennemabille" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Scotsguy"><img src="https://avatars3.githubusercontent.com/u/20385973?v=4" width="100px;" alt="" /><br /><sub><b>AppleTheGolden</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Documentation">📖</a></td>
<td align="center"><a href="http://sda.io"><img src="https://avatars1.githubusercontent.com/u/481987?v=4" width="100px;" alt="" /><br /><sub><b>Mike Sampson</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=mfs" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Documentation">📖</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Tests">⚠️</a></td>
<td align="center"><a href="https://sternentstehung.de"><img src="https://avatars3.githubusercontent.com/u/36575275?v=4" width="100px;" alt="" /><br /><sub><b>Dominik Braun</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=dominikbraun" title="Code">💻</a></td>
</tr>
</table>
@ -310,11 +316,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
Этот проект соответствует спецификации [all-contributors](https://github.com/all-contributors/all-contributors). Помощь любого рода приветствуется!
## 💭 Inspired By
## 💭 Вдохновение
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.
@ -327,6 +333,6 @@ Please check out these previous works that helped inspire the creation of starsh
<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.
Авторское право © 2019-настоящее, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> Этот проект лицензирован под лицензией [ISC](https://github.com/starship/starship/blob/master/LICENSE).

View File

@ -0,0 +1,61 @@
# 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)
### Требования
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
### Конфигурация
```toml
[aws]
symbol = " "
[battery]
full_symbol = ""
charging_symbol = ""
discharging_symbol = ""
[conda]
symbol = " "
[git_branch]
symbol = " "
[golang]
symbol = " "
[hg_branch]
symbol = " "
[java]
symbol = " "
[memory_usage]
symbol = " "
[nodejs]
symbol = " "
[package]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
[ruby]
symbol = " "
[rust]
symbol = " "
```

View File

@ -32,43 +32,28 @@ footer: ISC Licensed | Copyright © 2019-present Starship Contributors
1. 安装 **starship** 二进制文件:
如果您不使用下面的平台,你可以**[下载预编译的可执行文件](https://github.com/starship/starship/releases)**
#### Install Latest Version
#### Homebrew
With Shell:
```sh
$ brew install starship
curl -fsSL https://starship.rs/install.sh | bash
```
#### Rust (v1.38 or higher)
#### Install via Package Manager
With [Homebrew](https://brew.sh/):
```sh
$ cargo install starship
brew install starship
```
With [Scoop](https://scoop.sh):
#### Arch Linux (AUR)
Starship可在AUR下以 `starship`"之名使用 使用`yay`或你最偏爱的AUR helper来安装。
```sh
$ yay -S starship
```
#### Nix (unstable)
```sh
$ nix-env --install starship
```
#### Termux
```sh
$ pkg install starship
```powershell
scoop install starship
```
1. 将初始化脚本添加到您的 shell 的配置文件:
@ -113,5 +98,17 @@ footer: ISC Licensed | Copyright © 2019-present Starship Contributors
```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)
```

View File

@ -126,9 +126,10 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
| Variable | Default | Description |
| ----------------- | --------------- | --------------------------------------------------------------------------- |
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
| `displayed_items` | `all` | Choose which item to display. Possible values: [`all`, `profile`, `region`] |
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `AWS` module. |
| `displayed_items` | `all` | Choose which item to display. Possible values: [`all`, `profile`, `region`] |
### Example
@ -139,6 +140,9 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
style = "bold blue"
symbol = "🅰 "
displayed_items = "region"
[aws.region_aliases]
ap-southeast-2 = "au"
us-east-1 = "va"
```
## Battery
@ -255,12 +259,13 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Options
| Variable | Default | Description |
| ---------- | --------------- | ---------------------------------------------------------- |
| `min_time` | `2` | Shortest duration to show time for. |
| `prefix` | `took` | Prefix to display immediately before the command duration. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| Variable | Default | Description |
| ------------------- | --------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `prefix` | `took` | Prefix to display immediately before the command duration. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
### Example
@ -268,7 +273,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
# ~/.config/starship.toml
[cmd_duration]
min_time = 4
min_time = 500
prefix = "underwent "
```
@ -421,7 +426,7 @@ truncation_symbol = ""
## Git Commit
The `git_commit` module shows the active branch of the repo in your current directory.
The `git_commit` module shows the current commit hash of the repo in your current directory.
::: tip
@ -698,8 +703,8 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
| 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. |
| `impure_msg` | `"impure"` | Customize the "impure" msg. |
| `pure_msg` | `"pure"` | Customize the "pure" msg. |
| `style` | `"bold red"` | The style for the module. |
| `disabled` | `false` | Disables the `nix_shell` module. |
@ -715,6 +720,30 @@ impure_msg = "impure shell"
pure_msg = "pure shell"
```
## Java
The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle`, `build.gradle.kts` or `build.sbt` file
- The current directory contains a file with the `.java`, `.class` or `.jar` extension
### Options
| Variable | Default | Description |
| ---------- | -------------- | ------------------------------------------------------ |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. |
| `style` | `"dimmed red"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Example
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## Memory Usage
The `memory_usage` module shows current system memory and swap usage.
@ -753,30 +782,6 @@ separator = "/"
style = "bold dimmed green"
```
## Java
The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle` or `build.sbt` file
- The current directory contains a file with the `.java`, `.class` or `.jar` extension
### Options
| Variable | Default | Description |
| ---------- | -------------- | ------------------------------------------------------ |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. |
| `style` | `"dimmed red"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Example
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met:
@ -983,8 +988,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `use_12hr` | `false` | Enables 12 hour formatting |
| `format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `bold yellow` | The style for the module time |
| `disabled` | `true` | Disables the `time` module. |
| `utc_time_offset` | `local` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.

View File

@ -7,7 +7,7 @@
<p align="center">
<a href="https://github.com/starship/starship/actions"
><img
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg"
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg?branch=master&event=push"
alt="GitHub Actions workflow status" /></a>
<a href="https://crates.io/crates/starship"
><img src="https://img.shields.io/crates/v/starship" alt="Crates.io version" /></a>
@ -21,7 +21,7 @@
src="https://img.shields.io/discord/567163873606500352?logo=discord"
alt="加入 Discord" /></a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-58-orange" alt="所有贡献者"></a>
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-63-orange" alt="所有贡献者"></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
</p>
@ -181,12 +181,13 @@
```
#### Powershell
#### PowerShell
添加 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (或者`~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix)到:
```sh
# ~\Documents\PowerShell\Profile.ps1
Invoke-Expression (&starship init powershell)
```
@ -303,6 +304,11 @@
<tr>
<td align="center"><a href="https://github.com/BuggStream"><img src="https://avatars1.githubusercontent.com/u/51194915?v=4" width="100px;" alt="" /><br /><sub><b>BuggStream</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=BuggStream" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=BuggStream" title="Documentation">📖</a></td>
<td align="center"><a href="http://jonstodle.com"><img src="https://avatars1.githubusercontent.com/u/1719761?v=4" width="100px;" alt="" /><br /><sub><b>Jon Grythe Stødle</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=jonstodle" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=jonstodle" title="Tests">⚠️</a></td>
<td align="center"><a href="https://jasonet.co"><img src="https://avatars1.githubusercontent.com/u/10660468?v=4" width="100px;" alt="" /><br /><sub><b>Jason Etcovitch</b></sub></a><br /><a href="https://github.com/starship/starship/issues?q=author%3AJasonEtco" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/etiennemabille"><img src="https://avatars3.githubusercontent.com/u/11175343?v=4" width="100px;" alt="" /><br /><sub><b>Etienne Mabille</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=etiennemabille" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Scotsguy"><img src="https://avatars3.githubusercontent.com/u/20385973?v=4" width="100px;" alt="" /><br /><sub><b>AppleTheGolden</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Documentation">📖</a></td>
<td align="center"><a href="http://sda.io"><img src="https://avatars1.githubusercontent.com/u/481987?v=4" width="100px;" alt="" /><br /><sub><b>Mike Sampson</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=mfs" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Documentation">📖</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Tests">⚠️</a></td>
<td align="center"><a href="https://sternentstehung.de"><img src="https://avatars3.githubusercontent.com/u/36575275?v=4" width="100px;" alt="" /><br /><sub><b>Dominik Braun</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=dominikbraun" title="Code">💻</a></td>
</tr>
</table>

View File

@ -0,0 +1,61 @@
# 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)
### 基础要求
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
### 配置
```toml
[aws]
symbol = " "
[battery]
full_symbol = ""
charging_symbol = ""
discharging_symbol = ""
[conda]
symbol = " "
[git_branch]
symbol = " "
[golang]
symbol = " "
[hg_branch]
symbol = " "
[java]
symbol = " "
[memory_usage]
symbol = " "
[nodejs]
symbol = " "
[package]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
[ruby]
symbol = " "
[rust]
symbol = " "
```

View File

@ -32,43 +32,28 @@ footer: ISC Licensed | Copyright © 2019-present Starship Contributors
1. 安裝 **starship** 執行檔:
如果你並非使用以下平台,請直接**[下載編譯好的執行檔的壓縮檔](https://github.com/starship/starship/releases)**。
#### Install Latest Version
#### Homebrew
With Shell:
```sh
$ brew install starship
curl -fsSL https://starship.rs/install.sh | bash
```
#### Rust (v1.38 或更高版本)
#### Install via Package Manager
With [Homebrew](https://brew.sh/):
```sh
$ cargo install starship
brew install starship
```
With [Scoop](https://scoop.sh):
#### Arch Linux (AUR)
Starship 在 AUR 中已經以 `starship` 這個名字存在。 請使用 `yay` 或你喜歡的 AUR 幫手安裝。
```sh
$ yay -S starship
```
#### Nix (不穩定)
```sh
$ nix-env --install starship
```
#### Termux
```sh
$ pkg install starship
```powershell
scoop install starship
```
1. 將初始化腳本 (script) 加入你的 shell 的設定檔:
@ -113,5 +98,17 @@ footer: ISC Licensed | Copyright © 2019-present Starship Contributors
```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)
```

View File

@ -126,9 +126,10 @@ prompt_order = [
| 變數 | 預設 | 說明 |
| ----------------- | --------------- | --------------------------------------------------------------------------- |
| `symbol` | `"☁️ "` | 顯示在目前 AWS 配置之前的符號。 |
| `displayed_items` | `all` | Choose which item to display. Possible values: [`all`, `profile`, `region`] |
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
| `style` | `"bold yellow"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `AWS` 模組。 |
| `displayed_items` | `all` | Choose which item to display. Possible values: [`all`, `profile`, `region`] |
### 範例
@ -139,6 +140,9 @@ prompt_order = [
style = "bold blue"
symbol = "🅰 "
displayed_items = "region"
[aws.region_aliases]
ap-southeast-2 = "au"
us-east-1 = "va"
```
## 電池
@ -255,12 +259,13 @@ use_symbol_for_status = true
### 選項
| 變數 | 預設 | 說明 |
| ---------- | --------------- | --------------------- |
| `min_time` | `2` | 會顯示的最短時間長度。 |
| `prefix` | `took` | 在指令持續時間正前方顯示的前綴。 |
| `style` | `"bold yellow"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `cmd_duration` 模組。 |
| 變數 | 預設 | 說明 |
| ------------------- | --------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `prefix` | `took` | 在指令持續時間正前方顯示的前綴。 |
| `style` | `"bold yellow"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `cmd_duration` 模組。 |
### 範例
@ -268,13 +273,13 @@ use_symbol_for_status = true
# ~/.config/starship.toml
[cmd_duration]
min_time = 4
min_time = 500
prefix = "underwent "
```
## Conda
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
如果有設定 `$CONDA_DEFAULT_ENV` 時,`conda` 模組顯示現在 conda 的環境。
::: tip
@ -287,9 +292,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| 變數 | 預設 | 說明 |
| ------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. |
| `symbol` | `"C "` | The symbol used before the environment name. |
| `style` | `"bold green"` | The style for the module. |
| `disabled` | `false` | Disables the `conda` module. |
| `symbol` | `"C "` | 環境名稱前使用的符號。 |
| `style` | `"bold green"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `conda` 模組。 |
### 範例
@ -302,11 +307,11 @@ style = "dimmed green"
## 資料夾
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
`directory` 模組顯示到現在資料夾的路徑,並裁減到前三層資料夾。 你的資料夾也會被裁減到你所在的 git 儲存庫的根目錄。
When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
如果正在使用 fish 風格的 pwd 選項,將不會隱藏被裁減的資料夾,而是會根據你在選項中設定的數字看到每一層資料夾的縮寫。
For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
例如,給定一個右列的路徑 `~/Dev/Nix/nixpkgs/pkgs` 其中 `nixpkgs` 是儲存庫的根目錄,而且該選項被設定為 `1`。 你會看到 `~/D/N/nixpkgs/pkgs`,而在這個設定之前則是 `nixpkgs/pkgs`
### 選項
@ -315,11 +320,11 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 |
| `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 |
| `prefix` | `"in "` | Prefix to display immediately before the directory. |
| `style` | `"bold cyan"` | The style for the module. |
| `disabled` | `false` | Disables the `directory` module. |
| `style` | `"bold cyan"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `directory` 模組。 |
<details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
<summary>這個模組有些進階設定選項可以控制顯示資料夾。</summary>
| 變數 | 預設 | 說明 |
| --------------------------- | ------ | ------------------------------------ |
@ -339,11 +344,11 @@ truncation_length = 8
## Dotnet
The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
`dotnet` 模組顯示現在資料夾使用的 .NET Core SDK 的版本。 如果這個資料夾已經選定一個 SDK則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。
This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly.
這個模組只會在下列檔案出現在你的現在資料夾中時,顯示在你的提示字元:`global.json`、`project.json`、`*.sln`、`*.csproj`、`*.fsproj`、`*.xproj`。 你也會需要安裝 .NET Core 文字命令工具來正確使用這個模組。
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。
### 選項
@ -367,7 +372,7 @@ heuristic = false
## 環境變數
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met:
`env_var`模組顯示一個選擇的環境變數的現在數值。 這個模組只在下列條件其中之一達到時顯示:
- `variable` 設定選項符合一個存在的環境變數。
- 沒有設定 `variable` 選項,但是有設定 `default` 選項。
@ -396,7 +401,7 @@ default = "unknown shell"
## Git 分支
The `git_branch` module shows the active branch of the repo in your current directory.
`git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
### 選項
@ -421,11 +426,11 @@ truncation_symbol = ""
## Git Commit
The `git_commit` module shows the active branch of the repo in your current directory.
The `git_commit` module shows the current commit hash of the repo in your current directory.
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
:::
@ -451,7 +456,7 @@ commit_hash_length = 4
## Git State
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
`git_state` 模組會顯示在 git 儲存庫中的資料夾內以及會在有作業正在進行時顯示像是_REBASING_、_BISECTING_ 等等。 如果有進展的資訊 (像是 REBASING 3/10),也會一併顯示出來。
### 選項
@ -480,7 +485,7 @@ cherry_pick = "🍒 PICKING"
## Git Status
The `git_status` module shows symbols representing the state of the repo in your current directory.
`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
### 選項
@ -538,7 +543,7 @@ deleted = "🗑"
## Golang
The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met:
`golang` 模組顯示現在安裝的 Golang 版本。 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中含有一個 `go.mod` 檔案
- 現在資料夾中含有一個 `go.sum` 檔案
@ -592,7 +597,7 @@ truncation_symbol = ""
## 主機名稱
The `hostname` module shows the system hostname.
`hostname` 模組顯示系統的主機名稱。
### 選項
@ -620,7 +625,7 @@ disabled = false
## 工作
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists.
`jobs` 模組顯示現在正在執行中的工作。 這個模組只會在有背景工作正在執行時顯示。 這個模組會在工作數量超過一個,或者有設定 `threshold` 時且數量超過設定值時,顯示工作的數量。
### 選項
@ -643,11 +648,11 @@ threshold = 4
## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
顯示現在 Kubernetes 主體名稱以及從 kubeconfig 檔案來的名稱空間 (如果有設定的話)。 The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 如果有設定 `$KUBECONFIG` 環境變數,這個模組就會使用設定值;如果沒有,它就會使用 `~/.kube/config`
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
:::
@ -672,7 +677,7 @@ disabled = false
## 換行
The `line_break` module separates the prompt into two lines.
`line_break` 模組將提示字元分成兩行。
### 選項
@ -691,15 +696,15 @@ disabled = true
## Nix-shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
`nix_shell` 模組顯示 nix-shell 環境。 這個模組會在 nix-shell 環境中顯示。
### 選項
| 變數 | 預設 | 說明 |
| ------------ | ------------ | ------------------ |
| `use_name` | `false` | 顯示 nix-shell 的名稱。 |
| `impure_msg` | `impure` | 自定義「impure」訊息。 |
| `pure_msg` | `pure` | 自定義「pure」訊息。 |
| `impure_msg` | `"impure"` | 自定義「impure」訊息。 |
| `pure_msg` | `"pure"` | 自定義「pure」訊息。 |
| `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `nix_shell` 模組。 |
@ -715,15 +720,39 @@ impure_msg = "impure shell"
pure_msg = "pure shell"
```
## Java
`java` 模組顯示現在安裝的 Java 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `pom.xml`, `build.gradle`, `build.gradle.kts` or `build.sbt` file
- 現在資料夾中包含一個檔案具有 `.java`、`.class` 或 `.jar` 副檔名
### 選項
| 變數 | 預設 | 說明 |
| ---------- | -------------- | ----------------- |
| `symbol` | `"☕ "` | 顯示在 Java 版本之前的符號。 |
| `style` | `"dimmed red"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `java` 模組。 |
### 範例
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## 記憶體使用量
The `memory_usage` module shows current system memory and swap usage.
`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。
By default the swap usage is displayed if the total system swap is non-zero.
預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
:::
@ -753,33 +782,9 @@ separator = "/"
style = "bold dimmed green"
```
## Java
The `java` module shows the currently installed version of Java. 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中包含一個 `pom.xml`、`build.gradle` 或 `build.sbt` 檔案
- 現在資料夾中包含一個檔案具有 `.java`、`.class` 或 `.jar` 副檔名
### 選項
| 變數 | 預設 | 說明 |
| ---------- | -------------- | ----------------- |
| `symbol` | `"☕ "` | 顯示在 Java 版本之前的符號。 |
| `style` | `"dimmed red"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `java` 模組。 |
### 範例
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met:
`nodejs` 模組顯示現在安裝的 NodeJS 版本。 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中包含一個 `package.json` 檔案
- 現在資料夾中包含一個 `node_modules` 資料夾
@ -804,7 +809,7 @@ symbol = "🤖 "
## 套件版本
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`, and `poetry` packages.
The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 這個模組目前支援 `npm`、`cargo` 與 `poetry` 套件。
- **npm** `npm` 套件的版本是從現在資料夾中的 `package.json` 之中擷取出來的
- **cargo** `cargo` 套件的版本是從現在資料夾中的 `Cargo.toml` 之中擷取出來的
@ -832,7 +837,7 @@ 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:
The `php` module shows the currently installed version of PHP. 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中含有一個 `composer.json` 檔案
- The current directory contains a `.php` file
@ -856,13 +861,13 @@ symbol = "🔹 "
## Python
The `python` module shows the currently installed version of Python.
`python` 模組顯示現在安裝的 Python 版本
If `pyenv_version_name` is set to `true`, it will display the pyenv version name.
如果 `pyenv_version_name` 的值為 `true`, 會顯示 pyenv 內的版本名稱
Otherwise, it will display the version number from `python --version` and show the current Python virtual environment if one is activated.
要不然就會顯示 `python -version` 的版本和有啟用的 Python 虛擬環境版本
The module will be shown if any of the following conditions are met:
這個模組在下列其中一個條件達成時顯示:
- 目前資料夾中有一個 `.python-version` 檔案
- 目前資料夾中有一個 `requirements.txt` 檔案
@ -895,7 +900,7 @@ pyenv_prefix = "foo "
## Ruby
The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met:
`ruby` 模組顯示現在安裝的 Ruby 版本。 這個模組在下列其中一個條件達成時顯示:
- 目前資料夾中有一個 `Gemfile` 檔案
- 目前資料夾中有一個 `.rb` 檔案
@ -919,7 +924,7 @@ symbol = "🔺 "
## Rust
The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met:
`rust` 模組顯示現在安裝的 Rust 版本。 這個模組在下列其中一個條件達成時顯示:
- 目前資料夾中有一個 `Cargo.toml` 檔案
- 現在資料夾中包含一個檔案具有 `.rs` 副檔名
@ -943,7 +948,7 @@ symbol = "⚙️ "
## Terraform
The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. The module will be shown if any of the following conditions are met:
The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `.terraform` folder
- Current directory contains a file with the `.tf` extension
@ -954,7 +959,7 @@ The `terraform` module shows the currently selected terraform workspace and vers
| -------------- | ------------ | ----------------------------------------------------------- |
| `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. |
| `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. |
| `style` | `"bold 105"` | The style for the module. |
| `style` | `"bold 105"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `terraform` module. |
### 範例
@ -966,27 +971,27 @@ The `terraform` module shows the currently selected terraform workspace and vers
symbol = "🏎💨 "
```
## Time
## 時間
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
`time` 模組顯示目前的**當地**時間. `format` 設定值被 [`chrono`](https://crates.io/crates/chrono) crate 用來控制時間如何顯示。 請看 [chrono 的 strftime 文件](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)來了解有那些選項可以使用。
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
:::
### 選項
| 變數 | 預設 | 說明 |
| ----------------- | ------------- | ------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Enables 12 hour formatting |
| `format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `bold yellow` | The style for the module time |
| `disabled` | `true` | Disables the `time` module. |
| `utc_time_offset` | `local` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| 變數 | 預設 | 說明 |
| ----------------- | ------------- | -------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | 啟用 12 小時格式。 |
| `format` | 請看下列 | 用來顯示時間的 [chrono 格式字串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)。 |
| `style` | `bold yellow` | 這個模組的時間的風格。 |
| `utc_time_offset` | `local` | 設定相對於 UTC 的時差。 範圍 -24 < x < 24 允許使用浮點數來表示 30/45 分鐘時差的時區 |
| `disabled` | `true` | 停用 `time` 模組。 |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting.
如果 `use_12hr``true` 的話,`format` 會被預設為 `"%r"`。 不然的話,它會被預設為 `"%T"`。 手動設定 `format` 的設定值會覆寫 `use_12hr` 的設定。
### 範例
@ -999,25 +1004,25 @@ format = "🕙[ %T ]"
utc_time_offset = -5
```
## Username
## 使用者名稱
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
`username` 模組顯示現在使用中的使用者名稱。 這個模組在下列其中一個條件達成時顯示:
- The current user is root
- The current user isn't the same as the one that is logged in
- The user is currently connected as an SSH session
- The variable `show_always` is set to true
- 目前使用者為 root
- 目前使用者並非登入時的使用者
- 使用者透過 SSH session 進行連線
- 變數 `show_always` 被設為 true
### Options
### 選項
| Variable | Default | Description |
| ------------- | --------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| 變數 | 預設 | 說明 |
| ------------- | --------------- | ------------------- |
| `style_root` | `"bold red"` | 使用者為 root 時使用的風格。 |
| `style_user` | `"bold yellow"` | 非 root 使用者時使用的風格。 |
| `show_always` | `false` | 總是顯示 `username` 模組。 |
| `disabled` | `false` | 停用 `username` 模組。 |
### Example
### 範例
```toml
# ~/.config/starship.toml

View File

@ -7,7 +7,7 @@
<p align="center">
<a href="https://github.com/starship/starship/actions"
><img
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg"
src="https://github.com/starship/starship/workflows/Main%20workflow/badge.svg?branch=master&event=push"
alt="GitHub Actions workflow status" /></a>
<a href="https://crates.io/crates/starship"
><img src="https://img.shields.io/crates/v/starship" alt="Crates.io version" /></a>
@ -21,7 +21,7 @@
src="https://img.shields.io/discord/567163873606500352?logo=discord"
alt="在 Discord 上聊天" /></a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-58-orange" alt="All Contributors"></a>
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-63-orange" alt="All Contributors"></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
</p>
@ -181,12 +181,13 @@
```
#### Powershell
#### PowerShell
將以下內容放到 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 的結尾 (或是在 -Nix 上的 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`)
```sh
# ~\Documents\PowerShell\Profile.ps1
Invoke-Expression (&starship init powershell)
```
@ -303,6 +304,11 @@
<tr>
<td align="center"><a href="https://github.com/BuggStream"><img src="https://avatars1.githubusercontent.com/u/51194915?v=4" width="100px;" alt="" /><br /><sub><b>BuggStream</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=BuggStream" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=BuggStream" title="Documentation">📖</a></td>
<td align="center"><a href="http://jonstodle.com"><img src="https://avatars1.githubusercontent.com/u/1719761?v=4" width="100px;" alt="" /><br /><sub><b>Jon Grythe Stødle</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=jonstodle" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=jonstodle" title="Tests">⚠️</a></td>
<td align="center"><a href="https://jasonet.co"><img src="https://avatars1.githubusercontent.com/u/10660468?v=4" width="100px;" alt="" /><br /><sub><b>Jason Etcovitch</b></sub></a><br /><a href="https://github.com/starship/starship/issues?q=author%3AJasonEtco" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/etiennemabille"><img src="https://avatars3.githubusercontent.com/u/11175343?v=4" width="100px;" alt="" /><br /><sub><b>Etienne Mabille</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=etiennemabille" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Scotsguy"><img src="https://avatars3.githubusercontent.com/u/20385973?v=4" width="100px;" alt="" /><br /><sub><b>AppleTheGolden</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=Scotsguy" title="Documentation">📖</a></td>
<td align="center"><a href="http://sda.io"><img src="https://avatars1.githubusercontent.com/u/481987?v=4" width="100px;" alt="" /><br /><sub><b>Mike Sampson</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=mfs" title="Code">💻</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Documentation">📖</a> <a href="https://github.com/starship/starship/commits?author=mfs" title="Tests">⚠️</a></td>
<td align="center"><a href="https://sternentstehung.de"><img src="https://avatars3.githubusercontent.com/u/36575275?v=4" width="100px;" alt="" /><br /><sub><b>Dominik Braun</b></sub></a><br /><a href="https://github.com/starship/starship/commits?author=dominikbraun" title="Code">💻</a></td>
</tr>
</table>

View File

@ -0,0 +1,61 @@
# 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)
### 先決要求
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
### 設定
```toml
[aws]
symbol = " "
[battery]
full_symbol = ""
charging_symbol = ""
discharging_symbol = ""
[conda]
symbol = " "
[git_branch]
symbol = " "
[golang]
symbol = " "
[hg_branch]
symbol = " "
[java]
symbol = " "
[memory_usage]
symbol = " "
[nodejs]
symbol = " "
[package]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
[ruby]
symbol = " "
[rust]
symbol = " "
```