1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-28 07:46:28 +00:00

docs(i18n): new Crowdin updates (#2068)

This commit is contained in:
Matan Kushner 2021-01-07 18:08:18 -05:00 committed by GitHub
parent be11c73507
commit 49c51437d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
51 changed files with 2822 additions and 2116 deletions

View File

@ -1805,8 +1805,8 @@ The `package` module is shown when the current directory is the repository for a
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| `style` | `"bold 208"` | The style for the module. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Options
@ -2335,7 +2337,11 @@ 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
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### Options

View File

@ -125,6 +125,8 @@
### Getting Started
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Install the **starship** binary:
@ -138,17 +140,10 @@
```
##### From source on [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Install via Package Manager
##### With [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Add the init script to your shell's config file:
2. Add the init script to your shell's config file:
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -82,7 +82,7 @@ Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben kein
wobei `<color>` eine Farbspezifikation ist (siehe unten). `fg:<color>` und `<color>` tun derzeit dasselbe , das kann sich in Zukunft aber ändern. Die Reihenfolge der Wörter in der Liste spielt keine Rolle.
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. In der Zukunft könnte die Unterstützung von `none` in Verbindung mit anderen Tokens fallen gelassen werden.
Eine Farbspezifikation kann wie folgt aussehen:

View File

@ -304,15 +304,15 @@ Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den akt
### Optionen
| Option | Standartwert | Beschreibung |
| -------------------- | --------------------------------- | ---------------------------------------------------------------- |
| -------------------- | --------------------------------- | ----------------------------------------------------------------------------------- |
| `full_symbol` | `""` | Das Symbol das angezeigt wird wenn der Akku voll geladen ist. |
| `charging_symbol` | `""` | Das Symbol das angezeigt wird wenn der Akku aufgeladen wird. |
| `discharging_symbol` | `""` | Das Symbol, das angezeigt wird, wenn die Batterie entladen wird. |
| `unknown_symbol` | `""` | The symbol shown when the battery state is unknown. |
| `empty_symbol` | `""` | The symbol shown when the battery state is empty. |
| `format` | `"[$symbol$percentage]($style) "` | The format for the module. |
| `display` | [link](#battery-display) | Display threshold and style for the module. |
| `disabled` | `false` | Disables the `battery` module. |
| `display` | [link](#battery-display) | Stellt den Grenzwert ein ab dem der Ladezustand (das battery-Modul) angezeigt wird. |
| `disabled` | `false` | Wenn der Wert auf `true` steht, wird das Akkustand-Modul deaktiviert. |
### Beispiel
@ -328,7 +328,7 @@ discharging_symbol = "💀"
### Anzeige des Akkustandes
The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. Die Standardwerte sind folgende:
Die `display` Konfiguration "threshold" stellt ein ab wann die Akkuanzeige eingeblendet wird. Mit "style" wird das Erscheinungsbild festgelegt. Wenn `display` nicht angegeben ist. Die Standardwerte sind folgende:
```toml
[[battery.display]]
@ -338,12 +338,12 @@ style = "bold red"
#### Optionen
The `display` option is an array of the following table.
Die `display`-Option beinhaltet ein Array mit den folgenden Werten.
| Option | Beschreibung |
| ----------- | ----------------------------------------------- |
| `threshold` | The upper bound for the display option. |
| `style` | The style used if the display option is in use. |
| ----------- | ------------------------------------------------------- |
| `threshold` | Der Schwellenwert zur Anzeige dieser Option. |
| `style` | Der Stil, der zur Anzeige dieser Option verwendet wird. |
#### Beispiel
@ -362,9 +362,9 @@ style = "bold yellow"
## Zeichen
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
Das `character` Modul zeigt ein Zeichen ( meistens einen Pfeil "") vor der Texteingabe an.
The character will tell you whether the last command was successful or not. It can do this in two ways:
Das Zeichen zeigt an ob der letzte Befehl erfolgreich war, oder einen Fehler erzeugt hat. It can do this in two ways:
- changing color (`red`/`green`)
- changing shape (``/`✖`)
@ -379,7 +379,7 @@ By default it only changes color. If you also want to change it's shape take a l
| `success_symbol` | `"[](bold green)"` | The format string used before the text input if the previous command succeeded. |
| `error_symbol` | `"[](bold red)"` | The format string used before the text input if the previous command failed. |
| `vicmd_symbol` | `"[](bold green)"` | The format string used before the text input if the shell is in vim normal mode. |
| `disabled` | `false` | Disables the `character` module. |
| `disabled` | `false` | Deaktiviert das `character`-Modul. |
### Variables
@ -446,25 +446,25 @@ The `cmake` module shows the currently installed version of CMake if any of the
## Befehlsdauer
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
Das `cmd_duration` Modul zeigt an wie lange der letzte Befehl ausgeführt wurde. Das Modul wird nur angezeigt wenn der letzte Befehl länger als zwei Sekunden ausgeführt wurde. Mit der `min_time` Option kann die Zeit eingestellt werden ab der `cmd_duration` angezeigt wird.
::: warning Do not hook the DEBUG trap in Bash
::: warning Nicht die DEBUG-trap in der Bash hooken
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
Ist `bash` die Konsole der Wahl, dann nicht die `DEBUG`-trap nach der Ausführung von `eval $(starship init $0)` hooken, andernfalls **wird** dieses Modul unweigerlich untergehen.
:::
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras bash_preexec Framework](https://github.com/rcaloras/bash-preexec) verwenden. Definieren Sie einfach die Arrays `preexec_functions` und `precmd_functions` bevor sie `eval $(starship init $0)` ausführen, und fahren Sie dann wie gewohnt fort.
### Optionen
| Option | 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. |
| -------------------- | ----------------------------- | ------------------------------------------------------------------ |
| `min_time` | `2_000` | Schwellwert für kleinste anzuzeigende Laufzeit (in Millisekunden). |
| `show_milliseconds` | `false` | Zeige Millisekunden zusätzlich zu Sekunden. |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `disabled` | `false` | Deaktiviert das `cmd_duration`-Modul. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
@ -495,24 +495,24 @@ format = "underwent [$duration](bold yellow)"
## 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.
::: Tipp
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
Hinweis: Dies unterdrückt nicht conda's eigenen Prompt-Modifikator, sie können jedoch conda mit `conda config --set changeps1 False` konfigurieren, um die Ausgabe von conda selbst auszuschalten.
:::
### Optionen
| Option | 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` | `"🅒 "` | The symbol used before the environment name. |
| ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | Die Anzahl der Verzeichnisse, auf die der Verzeichnisspfad abgeschnitten werden soll, wenn die Umgebung über `conda erstellt wurde -p [path]`. `0` bedeutet keine Kürzung. Beachte auch die Beschreibung für das [`directory`](#directory) Modul. |
| `symbol` | `"🅒 "` | Symbol das vor dem Umgebungsnamen angezeigt wird. |
| `style` | `"bold green"` | Stil für dieses Modul. |
| `format` | `"via [$symbol$environment]($style) "` | The format for the module. |
| `ignore_base` | `true` | Ignores `base` environment when activated. |
| `disabled` | `false` | Disables the `conda` module. |
| `disabled` | `false` | Deaktiviert das `conda`-Modul. |
### Variables
@ -606,7 +606,7 @@ format = "via [🔰 $version](bold red) "
## Verzeichnis
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.
Das `directory` -Modul zeigt den Pfad zu Ihrem aktuellen Verzeichnis an, abgeschnitten auf drei übergeordnete Ordner. Your directory will also be truncated to the root of the git repo that you're currently in.
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.
@ -616,17 +616,17 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| Option | Standardwert | Beschreibung |
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- |
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
| `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. |
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. |
| `style` | `"bold cyan"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `directory` module. |
| `disabled` | `false` | Deaktiviert das `directory`-Modul. |
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
<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>
| Advanced Option | Standardwert | Beschreibung |
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
@ -723,12 +723,12 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
### Optionen
| Option | Standardwert | Beschreibung |
| ----------- | --------------------------------------- | -------------------------------------------------------- |
| ----------- | --------------------------------------- | ------------------------------------------------------------------ |
| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
| `symbol` | `"•NET "` | Symbol das vor der dotnet-Version angezeigt wird. |
| `heuristic` | `true` | Schnelle Versionserkennung nutzen um Starship bedienbar zu halten. |
| `style` | `"bold blue"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `dotnet` module. |
| `disabled` | `false` | Deaktiviert das `dotnet`-Modul. |
### Variables
@ -835,12 +835,12 @@ The `env_var` module displays the current value of a selected environment variab
### Optionen
| Option | Standardwert | Beschreibung |
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
| `symbol` | | The symbol used before displaying the variable value. |
| `variable` | | The environment variable to be displayed. |
| `default` | | The default value to be displayed when the selected variable is not defined. |
| ---------- | ------------------------------ | ---------------------------------------------------------------------------------------- |
| `symbol` | | Das Symbol, das vor der Anzeige der Variable verwendet wird. |
| `variable` | | Die anzuzeigende Umgebungsvariable. |
| `default` | | Der Standardwert, der angezeigt wird, wenn die ausgewählte Variable nicht definiert ist. |
| `format` | `"with [$env_value]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `env_var` module. |
| `disabled` | `false` | Deaktiviert das `env_var`-Modul. |
### Variables
@ -959,7 +959,7 @@ asia-northeast1 = "an1"
## 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
@ -972,7 +972,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. |
| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. |
| `disabled` | `false` | Disables the `git_branch` module. |
| `disabled` | `false` | Deaktiviert das `git_branch`-Modul. |
### Variables
@ -1049,7 +1049,7 @@ The `git_state` module will show in directories which are part of a git reposito
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
| `style` | `"bold yellow"` | Stil für dieses Modul. |
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. |
| `disabled` | `false` | Disables the `git_state` module. |
| `disabled` | `false` | Deaktiviert das `git_state`-Modul. |
### Variables
@ -1092,7 +1092,7 @@ The `git_status` module shows symbols representing the state of the repo in your
| `renamed` | `"»"` | The format of `renamed` |
| `deleted` | `"✘"` | The format of `deleted` |
| `style` | `"bold red"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `git_status` module. |
| `disabled` | `false` | Deaktiviert das `git_status`-Modul. |
### Variables
@ -1157,7 +1157,7 @@ behind = "⇣${count}"
## Golang
The `golang` module shows the currently installed version of Golang. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
Das `golang`-Modul zeigt die aktuell installierte Version von Golang. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- Das aktuelle Verzeichnis enthält eine `go.mod`-Datei
- Das aktuelle Verzeichnis enthält eine `go.sum`-Datei
@ -1175,7 +1175,7 @@ The `golang` module shows the currently installed version of Golang. Das Modul w
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"🐹 "` | A format string representing the symbol of Go. |
| `style` | `"bold cyan"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `golang` module. |
| `disabled` | `false` | Deaktiviert das `golang`-Modul. |
### Variables
@ -1233,17 +1233,17 @@ format = "via [⎈ $version](bold white) "
## Hostname
The `hostname` module shows the system hostname.
Das `hostname`-Modul zeigt den Hostnamen des Systems an.
### Optionen
| Option | Standardwert | Beschreibung |
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
| `ssh_only` | `true` | Zeigt den Hostnamen nur, wenn via SSH-Sitzung verbunden. |
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
| `format` | `"[$hostname]($style) in "` | The format for the module. |
| `style` | `"bold dimmed green"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `hostname` module. |
| `disabled` | `false` | Deaktiviert das `hostname`-Modul. |
### Variables
@ -1268,7 +1268,7 @@ disabled = false
## Java
The `java` module shows the currently installed version of Java. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
Das `java` Modul zeigt die derzeit installierte Version von Java an. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
@ -1280,7 +1280,7 @@ The `java` module shows the currently installed version of Java. Das Modul wird
| `format` | `"via [${symbol}${version}]($style) "` | The format for the module. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `java` module. |
| `disabled` | `false` | Deaktiviert das `Java`-Modul. |
### Variables
@ -1308,12 +1308,12 @@ The `jobs` module shows the current number of jobs running. The module will be s
### Optionen
| Option | Standardwert | Beschreibung |
| ----------- | ----------------------------- | ------------------------------------------------ |
| `threshold` | `1` | Show number of jobs if exceeded. |
| ----------- | ----------------------------- | -------------------------------------------------------------------------------- |
| `threshold` | `1` | Zeigt die Anzahl der Jobs wenn der angegebene Schwellenwert überschritten wurde. |
| `format` | `"[$symbol$number]($style) "` | The format for the module. |
| `symbol` | `"✦"` | A format string representing the number of jobs. |
| `style` | `"bold blue"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `jobs` module. |
| `disabled` | `false` | Deaktiviert das `jobs`-Modul. |
### Variables
@ -1420,7 +1420,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
::: Tipp
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
:::
@ -1432,7 +1432,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | Stil für dieses Modul. |
| `context_aliases` | | Table of context aliases to display. |
| `disabled` | `true` | Disables the `kubernetes` module. |
| `disabled` | `true` | Deaktiviert das `kubernetes`-Modul. |
### Variables
@ -1457,15 +1457,15 @@ disabled = false
"dev.local.cluster.k8s" = "dev"
```
## Line Break
## Zeilenumbruch
The `line_break` module separates the prompt into two lines.
Das `line_break`-Modul unterteilt den Prompt in zwei Zeilen.
### Optionen
| Option | Standardwert | Beschreibung |
| ---------- | ------------ | ------------------------------------------------------------------ |
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
| ---------- | ------------ | ---------------------------------------------------------------------- |
| `disabled` | `false` | Deaktiviert das `line_break`-Modul, wodurch der Prompt einzeilig wird. |
### Beispiel
@ -1513,27 +1513,27 @@ The `lua` module shows the currently installed version of Lua. Das Modul wird ge
format = "via [🌕 $version](bold blue) "
```
## Memory Usage
## Speicherauslastung
The `memory_usage` module shows current system memory and swap usage.
Das `memory_usage` Modul zeigt den aktuellen Systemspeicher und die swap-Nutzung an.
By default the swap usage is displayed if the total system swap is non-zero.
Standardmäßig wird die swap-Nutzung angezeigt, wenn der gesamte System-swap nicht Null ist.
::: Tipp
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
:::
### Optionen
| Option | Standardwert | Beschreibung |
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
| ----------- | --------------------------------------------- | --------------------------------------------------------------------- |
| `threshold` | `75` | Speicherauslastung ausblenden, wenn sie unter diesem Prozentsatz ist. |
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
| `symbol` | `"🐏"` | Symbol das vor der Speicherauslastung angezeigt wird. |
| `style` | `"bold dimmed white"` | Stil für dieses Modul. |
| `disabled` | `true` | Disables the `memory_usage` module. |
| `disabled` | `true` | Deaktiviert das `memory_usage`-Modul. |
### Variables
@ -1634,9 +1634,9 @@ style = "yellow"
symbol = "🎣 "
```
## Nix-shell
## Nix-Shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
Das `nix_shell`-Modul zeigt die nix-shell Umgebung an. Das Modul wird angezeigt, wenn es sich in einer nix-Shell-Umgebung befindet.
### Optionen
@ -1647,7 +1647,7 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
| `style` | `"bold blue"` | Stil für dieses Modul. |
| `impure_msg` | `"impure"` | A format string shown when the shell is impure. |
| `pure_msg` | `"pure"` | A format string shown when the shell is pure. |
| `disabled` | `false` | Disables the `nix_shell` module. |
| `disabled` | `false` | Deaktiviert das `nix_shell`-Modul. |
### Variables
@ -1674,11 +1674,11 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
Das `nodejs`-Modul zeigt die aktuell installierte Version von NodeJS. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- The current directory contains a `package.json` file
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory
- Das aktuelle Verzeichnis enthält ein `node_modules`-Verzeichnis
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
- The current directory contains a file with the `.ts` extension
@ -1689,7 +1689,7 @@ The `nodejs` module shows the currently installed version of NodeJS. Das Modul w
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
| `style` | `"bold green"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `nodejs` module. |
| `disabled` | `false` | Deaktiviert das `nodejs`-Modul. |
| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. |
###  Variables
@ -1785,13 +1785,13 @@ style = "bold yellow"
symbol = "☁️ "
```
## Package Version
## Paketversion
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository für ein Paket ist, und zeigt dessen aktuelle Version an. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
- **npm** The `npm` package version is extracted from the `package.json` present in the current directory
- **cargo** The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
- **poetry** The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
- **npm** Die `npm` Paketversion wird aus dem `package.json` gelesen, das sich im aktuellen Verzeichnis befindet
- **Cargo** Die `Cargo` Paketversion wird aus dem `Cargo.toml` gelesen, das sich im aktuellen Verzeichnis befindet
- **poetry** Die `poetry` Paketversion wird aus der `pyproject.toml` gelesen, das sich im aktuellen Verzeichnis befindet
- **composer** The `composer` package version is extracted from the `composer.json` present in the current directory
- **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
@ -1805,12 +1805,12 @@ The `package` module is shown when the current directory is the repository for a
### Optionen
| Option | Standardwert | Beschreibung |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| ----------------- | --------------------------------- | --------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | Symbol das vor der Paketversion angezeigt wird. |
| `style` | `"bold 208"` | Stil für dieses Modul. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | Disables the `package` module. |
| `disabled` | `false` | Deaktiviert das `package`-Modul. |
### Variables
@ -1869,20 +1869,20 @@ format = "via [🦪 $version]($style) "
## PHP
The `php` module shows the currently installed version of PHP. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
Das `php`-Modul zeigt die aktuell installierte Version von PHP. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- The current directory contains a `composer.json` file
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file
- Das aktuelle Verzeichnis enthält eine `.php`-Datei
### Optionen
| Option | Standardwert | Beschreibung |
| ---------- | ---------------------------------- | ----------------------------------------------------- |
| ---------- | ---------------------------------- | ---------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
| `symbol` | `"🐘 "` | Symbol das vor der PHP-Version angezeigt wird. |
| `style` | `"147 bold"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `php` module. |
| `disabled` | `false` | Deaktiviert das `php`-Modul. |
### Variables
@ -1946,15 +1946,15 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- The current directory contains a `.python-version` file
- Das aktuelle Verzeichnis enthält eine `.python-version`-Datei
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- Das aktuelle Verzeichnis enthält eine `Pipfile`-Datei
- Das aktuelle Verzeichnis enthält eine `tox.ini`-Datei
- Das aktuelle Verzeichnis enthält eine `setup.py`-Datei
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
- Ein virtualenv ist momentan aktiv
### Optionen
@ -1963,11 +1963,11 @@ Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. |
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
| `style` | `"yellow bold"` | Stil für dieses Modul. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_version_name` | `false` | Verwende `pyenv` um die Python-Versionzu beziehen. |
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
| `disabled` | `false` | Disables the `python` module. |
| `disabled` | `false` | Deaktiviert das `python`-Modul. |
::: Tipp
@ -2008,11 +2008,11 @@ python_binary = "python3"
## Ruby
The `ruby` module shows the currently installed version of Ruby. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
Das `ruby` Modul zeigt die derzeit installierte Version von Ruby an. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- The current directory contains a `Gemfile` file
- Das aktuelle Verzeichnis enthält eine `Gemfile`-Datei
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file
- Das aktuelle Verzeichnis enthält eine `.rb`-Datei
### Optionen
@ -2021,7 +2021,7 @@ The `ruby` module shows the currently installed version of Ruby. Das Modul wird
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `ruby` module. |
| `disabled` | `false` | Deaktiviert das `ruby`-Modul. |
### Variables
@ -2044,10 +2044,10 @@ symbol = "🔺 "
## Rust
The `rust` module shows the currently installed version of Rust. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
Das `rust` Modul zeigt die derzeit installierte Version von Rust an. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- The current directory contains a `Cargo.toml` file
- The current directory contains a file with the `.rs` extension
- Das aktuelle Verzeichnis enthält eine `Cargo.toml`-Datei
- Das aktuelle Verzeichnis enthält eine Datei mit der `.rs`-Erweiterung
### Optionen
@ -2056,7 +2056,7 @@ The `rust` module shows the currently installed version of Rust. Das Modul wird
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `rust` module. |
| `disabled` | `false` | Deaktiviert das `rust`-Modul. |
### Variables
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: Tipp
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
:::
### Optionen
@ -2237,7 +2239,7 @@ format = "via [🏎 $version](red bold)"
The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- The current directory contains a `.terraform` folder
- Das aktuelle Verzeichnis enthält eine `.terraform`-Datei
- Current directory contains a file with the `.tf` or `.hcl` extensions
### Optionen
@ -2247,7 +2249,7 @@ The `terraform` module shows the currently selected terraform workspace and vers
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
| `symbol` | `"💠 "` | A format string shown before the terraform workspace. |
| `style` | `"bold 105"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `terraform` module. |
| `disabled` | `false` | Deaktiviert das `terraform` Modul. |
### Variables
@ -2286,20 +2288,20 @@ The `time` module shows the current **local** time. The `format` configuration v
::: Tipp
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
:::
### Optionen
| Option | Standardwert | Beschreibung |
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| ----------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `format` | `"at [$time]($style) "` | The format string for the module. |
| `use_12hr` | `false` | Enables 12 hour formatting |
| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `"bold yellow"` | The style for the module time |
| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 &lt; x &lt; 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
| `use_12hr` | `false` | Aktiviert 12-Stunden-Format |
| `time_format` | siehe unten | Das Format zum Anzeigen der Uhrzeit in [chrono-Formatierung](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html). |
| `style` | `"bold yellow"` | Stil für dieses Modul |
| `utc_time_offset` | `"local"` | Verwendetes Zeitzonen-Offset. Range from -24 &lt; x &lt; 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Deaktiviert das `time`-Modul. |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
@ -2308,7 +2310,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| Variable | Beispiel | Beschreibung |
| --------- | ---------- | ----------------------------------- |
| time | `13:08:10` | The current time. |
| zeit | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
@ -2330,22 +2332,26 @@ time_range = "10:00:00-14:00:00"
The `username` module shows active user's username. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
- The current user is root
- The current user isn't the same as the one that is logged in
- The user is currently connected as an SSH session
- The variable `show_always` is set to true
- Der aktuelle Benutzer ist root
- Der aktuelle Benutzer ist nicht der eingeloggte Benutzer
- Der Benutzer ist aktuell via SSH verbunden
- Die Variable `show_always` ist auf true gesetzt
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: Tipp
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### Optionen
| Option | Standardwert | Beschreibung |
| ------------- | ----------------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| ------------- | ----------------------- | ---------------------------------------------- |
| `style_root` | `"bold red"` | Stil wenn der Benutzer unter root läuft. |
| `style_user` | `"bold yellow"` | Stil wenn der Benutzer nicht unter root läuft. |
| `format` | `"[$user]($style) in "` | The format for the module. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| `show_always` | `false` | Immer das `username` Modul anzeigen. |
| `disabled` | `false` | Deavktiviert das `username` Modul. |
### Variables
@ -2433,11 +2439,11 @@ The order in which custom modules are shown can be individually set by including
### Optionen
| Option | Standardwert | Beschreibung |
| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| -------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `beschreibung` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |

View File

@ -102,7 +102,7 @@
width="50%"
align="right" />
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
**Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!**
- **Fast:** it's fast _really really_ fast! 🚀
- **Customizable:** configure every aspect of your prompt.
@ -125,6 +125,8 @@
### Erste Schritte
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Installiere **starship**:
@ -138,17 +140,10 @@
```
##### Per Quellcode über [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Installation mithilfe eines Paket-Managers
##### Mit [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Füge das init-Skript zur Konfigurationsdatei deiner Shell hinzu:
2. Füge das init-Skript zur Konfigurationsdatei deiner Shell hinzu:
#### Bash
@ -222,7 +217,7 @@ Wir laden Leute **aller Erfahrungsstufen** herzlich ein mitzumachen! Falls du di
Wenn du eine andere Sprache flüssig sprichts, würden wir uns sehr freuen wenn du helfen würdest die Dokumentation in anderen Sprachen auf dem aktuellsten Stand zu halten. Hier kannst du bei der Übersetzung helfen [Starship Crowdin](https://translate.starship.rs/).
Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord server](https://discord.gg/8Jzqu3T) vorbei. 👋
Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Leitfaden zum Mitwirken](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord-Server](https://discord.gg/8Jzqu3T) vorbei. 👋
### Mitwirkenden
@ -231,7 +226,7 @@ Das Projekt existiert dank aller der, die Mitwirken. [[Mitmachen](https://github
### Finanzielle Unterstützung
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
Become a financial contributor and help us sustain our community. [[Mitmachen](https://opencollective.com/starship/contribute)]
#### Individuals
@ -239,7 +234,7 @@ Become a financial contributor and help us sustain our community. [[Contribute](
#### Organisationen
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
Support this project with your organization. Your logo will show up here with a link to your website. [[Mitmachen](https://opencollective.com/starship/contribute)]
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
@ -254,7 +249,7 @@ Support this project with your organization. Your logo will show up here with a
## 💭 Inspiriert durch
Schaut euch bitte auch die Projekte an, die die Entstehung von Starship inspiriert haben. 🙏
Bitte schaue dir diese früheren Projekte an, die dazu beigetragen haben, Starship zu kreieren. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Ein ZSH-Prompt für Astronauten.
@ -264,9 +259,9 @@ Schaut euch bitte auch die Projekte an, die die Entstehung von Starship inspirie
<p align="center">
<br>
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship Raketen Icon">
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship Raketen-Symbol">
</p>
## 📝 Lizenz
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> Unter der [ISC](https://github.com/starship/starship/blob/master/LICENSE) Lizens.
Copyright © 2019-heute [Starship-Mitwirkende](https://github.com/starship/starship/graphs/contributors).<br /> Dieses Projekt ist [ISC](https://github.com/starship/starship/blob/master/LICENSE) lizenziert.

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

File diff suppressed because it is too large Load Diff

View File

@ -125,6 +125,8 @@
### Comenzar
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Instala el binario de **Starship**:
@ -138,17 +140,10 @@
```
##### Desde el código fuente en [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Instalar con un gestor de paquetes
##### Con [Homebew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Añade el script de inicio al archivo de configuración de tu interfaz de línea de comandos:
2. Añade el script de inicio al archivo de configuración de tu interfaz de línea de comandos:
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -82,7 +82,7 @@ Les chaînes de style sont une liste de mots, séparés par des espaces. Les mot
`<color>` est un spécificateur de couleur (discuté ci-dessous). `fg:<color>` et `<color>` font actuellement la même chose, même si cela peut changer plus tard. L'ordre des mots dans le string n'a pas d'importance.
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. Il peut devenir une erreur d'utiliser `none` en conjonction avec d'autres jetons dans le futur.
Un spécificateur de couleur peut être l'un des éléments suivants :

View File

@ -304,15 +304,15 @@ Le module `battery` montre à quel point la batterie de l'appareil est chargée
### Options
| Option | Default | Description |
| -------------------- | --------------------------------- | --------------------------------------------------- |
| -------------------- | --------------------------------- | ------------------------------------------------------------- |
| `full_symbol` | `""` | Le symbole affiché lorsque la batterie est pleine. |
| `charging_symbol` | `""` | Le symbole affiché lorsque la batterie se charge. |
| `discharging_symbol` | `""` | Le symbole affiché lorsque la batterie se décharge. |
| `unknown_symbol` | `""` | The symbol shown when the battery state is unknown. |
| `empty_symbol` | `""` | The symbol shown when the battery state is empty. |
| `unknown_symbol` | `""` | Le symbole affiché lorsque l'état de la batterie est inconnu. |
| `empty_symbol` | `""` | Le symbole affiché lorsque la batterie est vide. |
| `format` | `"[$symbol$percentage]($style) "` | Format du module. |
| `display` | [lien](#battery-display) | Display threshold and style for the module. |
| `disabled` | `false` | Disables the `battery` module. |
| `display` | [lien](#battery-display) | Affiche le seuil et le style du module. |
| `disabled` | `false` | Désactive le module `battery`. |
### Exemple
@ -328,7 +328,7 @@ discharging_symbol = "💀"
### Indicateur de batterie
The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. La valeur par défaut est la suivante :
L'option de configuration `display` est utilisée pour définir quand l'indicateur de batterie doit être affiché (seuil) et à quoi il ressemble (style). Si aucun `display` n'est fourni. La valeur par défaut est la suivante :
```toml
[[battery.display]]
@ -338,12 +338,12 @@ style = "bold red"
#### Options
The `display` option is an array of the following table.
L'option `display` est une array de la table suivante.
| Option | Description |
| ----------- | ----------------------------------------------- |
| `threshold` | The upper bound for the display option. |
| `style` | The style used if the display option is in use. |
| ----------- | -------------------------------------------------- |
| `threshold` | La limite supérieure pour l'option d'affichage. |
| `style` | Le style de l'option display si elle est utilisée. |
#### Exemple
@ -362,30 +362,30 @@ style = "bold yellow"
## Caractères
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
Le module `character` affiche un caractère (habituellement une flèche) à côté de l'endroit où le texte est entré dans votre terminal.
The character will tell you whether the last command was successful or not. It can do this in two ways:
Le caractère vous dira si la dernière commande a été réussie ou pas. Cela peut être fait de deux manières:
- changement de couleur (`red`/`green`)
- changement de forme (``/`✖`)
By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape).
Par défaut, il ne change que la couleur. Si vous voulez également changer sa forme, jetez un œil à [cet exemple](#with-custom-error-shape).
### Options
| Option | Défaut | Description |
| ---------------- | ------------------- | -------------------------------------------------------------------------------- |
| `format` | `"$symbol "` | The format string used before the text input. |
| `success_symbol` | `"[](bold green)"` | The format string used before the text input if the previous command succeeded. |
| `error_symbol` | `"[](bold red)"` | The format string used before the text input if the previous command failed. |
| `vicmd_symbol` | `"[](bold green)"` | The format string used before the text input if the shell is in vim normal mode. |
| `disabled` | `false` | Disables the `character` module. |
| ---------------- | ------------------- | ----------------------------------------------------------------------------- |
| `format` | `"$symbol "` | Le format utilisée avant l'entrée de texte. |
| `success_symbol` | `"[](bold green)"` | Le format utilisé avant l'entrée de texte si la commande précédente a réussi. |
| `error_symbol` | `"[](bold red)"` | Le format utilisé avant l'entrée de texte si la commande précédente a échoué. |
| `vicmd_symbol` | `"[](bold green)"` | Le format utilisé avant l'entrée de texte si le shell est en mode vim normal. |
| `disabled` | `false` | Désactive le module `character`. |
### Variables
| Variable | Exemple | Description |
| -------- | ------- | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| -------- | ------- | --------------------------------------------------------------- |
| symbol | | Reflète sois `success_symbol`, `error_symbol` ou `vicmd_symbol` |
### Exemples
@ -420,7 +420,7 @@ vicmd_symbol = "[V](bold green) "
## CMake
The `cmake` module shows the currently installed version of CMake if any of the following conditions are met:
Le module `cmake` affiche la version actuellement installée de CMake si l'une des conditions suivantes est remplie :
- Le répertoire actuel contient un fichier `CMakeLists.txt`
- Le répertoire actuel contient un fichier ` CMakeCache.txt`
@ -428,17 +428,17 @@ The `cmake` module shows the currently installed version of CMake if any of the
### Options
| Option | Défaut | Description |
| ---------- | ---------------------------------- | -------------------------------------------- |
| ---------- | ---------------------------------- | --------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | Format du module. |
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
| `symbol` | `"喝 "` | Le symbole utilisé avant la version de cmake. |
| `style` | `"bold blue"` | Le style du module. |
| `disabled` | `false` | Disables the `cmake` module. |
| `disabled` | `false` | Désactive le module `cmake`. |
### Variables
| Variable | Exemple | Description |
| --------- | --------- | -------------------------------------- |
| version | `v3.17.3` | The version of cmake |
| version | `v3.17.3` | La version de cmake |
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
@ -446,26 +446,26 @@ The `cmake` module shows the currently installed version of CMake if any of the
## Temps d'exécution
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
Le module `cmd_duration` montre le temps qu'a pris la dernière commande a pris pour s'exécuter. Le module ne sera affiché que si la commande a pris plus de deux secondes, ou si la valeur de configuration `min_time` existe.
::: warning Do not hook the DEBUG trap in Bash
::: attention, n'accrochez pas la trappe DEBUG en Bash
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
Si vous utilisez starship en `bash`, n'accrochez pas `DEBUG` après avoir exécuté `eval $(starship init $0)`, ou ce module **cassera**.
:::
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent utiliser [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Définissez simplement les array `preexec_functions` et `precmd_functions` avant d'éxécuter `eval $(starship init $0)`, puis procédez comme d'habitude.
### Options
| Option | Défaut | 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. |
| -------------------- | ----------------------------- | ---------------------------------------------------------------------- |
| `min_time` | `2_000` | Durée la plus courte quand afficher le temps (en millisecondes). |
| `show_milliseconds` | `false` | Afficher les millisecondes en plus des secondes pendant la durée. |
| `format` | `"took [$duration]($style) "` | Format du module. |
| `style` | `"bold yellow"` | Le style du module. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `disabled` | `false` | Désactive le module `cmd_duration`. |
| `show_notifications` | `false` | Afficher les notifications du bureau lorsque la commande est terminée. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
::: tip
@ -477,8 +477,8 @@ Showing desktop notifications requires starship to be built with `rust-notify` s
### Variables
| Variable | Exemple | Description |
| --------- | -------- | --------------------------------------- |
| duration | `16m40s` | The time it took to execute the command |
| --------- | -------- | --------------------------------------------- |
| duration | `16m40s` | Le temps nécessaire pour exécuter la commande |
| style\* | | Reflète la valeur de l'option `style` |
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
@ -495,30 +495,30 @@ format = "underwent [$duration](bold yellow)"
## Conda
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
Le module `conda` affiche l'environnement conda actuel, si `$CONDA_DEFAULT_ENV` est défini.
::: tip
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `conda config --set changeps1 False`.
:::
### Options
| Option | Défaut | Description |
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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` | `"🅒 "` | The symbol used before the environment name. |
| ------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | Le nombre de répertoires dans lesquels le chemin d'environnement (Path) doit être tronqué, si l'environnement a été créé via `conda create -p [path]`. `0` ne signifie pas de troncature. Regardez aussi le module [`directory`](#directory). |
| `symbol` | `"🅒 "` | Le symbole utilisé avant le nom d'environnement. |
| `style` | `"bold green"` | Le style du module. |
| `format` | `"via [$symbol$environment]($style) "` | Format du module. |
| `ignore_base` | `true` | Ignores `base` environment when activated. |
| `disabled` | `false` | Disables the `conda` module. |
| `ignore_base` | `true` | Ignore l'environnement `base` lorsqu'il est activé. |
| `disabled` | `false` | Désactive le module `conda`. |
### Variables
| Variable | Exemple | Description |
| ----------- | ------------ | -------------------------------------- |
| environment | `astronauts` | The current conda environment |
| ------------- | ------------ | -------------------------------------- |
| environnement | `astronauts` | La version courante de conda |
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
@ -535,7 +535,7 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
The `crystal` module shows the currently installed version of Crystal. Le module est affiché si l'une des ces conditions est remplie :
Le module `crystal` affiche la version actuellement installée de Crystal. Le module est affiché si l'une des ces conditions est remplie :
- Le répertoire courant contient un fichier `shard.yml`
- Le répertoire courant contient un fichier `.cr`
@ -543,17 +543,17 @@ The `crystal` module shows the currently installed version of Crystal. Le module
### Options
| Option | Défaut | Description |
| ---------- | ---------------------------------- | --------------------------------------------------------- |
| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. |
| `style` | `"bold red"` | Le style du module. |
| ---------- | ---------------------------------- | ---------------------------------------------------------- |
| `symbol` | `"🔮 "` | Le symbole utilisé avant d'afficher la version de crystal. |
| `style` | `"bold green"` | Le style du module. |
| `format` | `"via [$symbol$version]($style) "` | Format du module. |
| `disabled` | `false` | Disables the `crystal` module. |
| `disabled` | `false` | Désactive le module `crystal`. |
### Variables
| Variable | Exemple | Description |
| --------- | --------- | -------------------------------------- |
| version | `v0.32.1` | The version of `crystal` |
| version | `v0.32.1` | La version de `cristal` |
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
@ -570,7 +570,7 @@ format = "via [✨ $version](bold blue) "
## Dart
The `dart` module shows the currently installed version of Dart. Le module est affiché si l'une des ces conditions est remplie :
Le module `crystal` affiche la version courante installée de Dart. Le module est affiché si l'une des ces conditions est remplie :
- Le répertoire courant contient un fichier `.dart`
- Le répertoire courant contient un répertoire `.dart_tool`
@ -579,17 +579,17 @@ The `dart` module shows the currently installed version of Dart. Le module est a
### Options
| Option | Défaut | Description |
| ---------- | ---------------------------------- | ----------------------------------------------- |
| ---------- | ---------------------------------- | -------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | Format du module. |
| `symbol` | `"🎯 "` | A format string representing the symbol of Dart |
| `symbol` | `"🎯 "` | Une chaîne de caractères représentant le symbole de Dart |
| `style` | `"bold blue"` | Le style du module. |
| `disabled` | `false` | Disables the `dart` module. |
| `disabled` | `false` | Désactive le module `dart`. |
### Variables
| Variable | Exemple | Description |
| --------- | -------- | -------------------------------------- |
| version | `v2.8.4` | The version of `dart` |
| version | `v2.8.4` | La version de `dart` |
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
@ -606,31 +606,31 @@ format = "via [🔰 $version](bold red) "
## Dossier
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.
Le mode `directory` montre le chemin de votre dossier actuel, tronqué au 3 dossiers parents. Votre répertoire sera également tronqué à la racine du repo git dans lequel vous vous trouvez actuellement.
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.
Quand vous utilisez le style pwd de fish, au lieu de cacher le chemin qui est troqué, vous verrez un nom raccourcis de chaque dossiers basés sur le nombre établi pour l'option.
For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs``nixpkgs` est la racine du repo, et l'option définie à `1`. Vous verrez maintenant `~/D/N/nixpkgs/pkgs`, alors que vous auriez vu `nixpkgs/pkgs` avant.
### Options
| Option | Défaut | Description |
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- |
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `truncation_length` | `3` | Le nombre de dossiers parents selon lesquels le répertoire courant doit être tronqué. |
| `truncate_to_repo` | `true` | Si oui ou non tronquer à la racine du repo git dans lequel vous vous trouvez. |
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Format du module. |
| `style` | `"bold cyan"` | Le style du module. |
| `disabled` | `false` | Disables the `directory` module. |
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `disabled` | `false` | Désactive le module `directory`. |
| `read_only` | `"🔒"` | Le symbole indiquant que le répertoire courant est en lecture seule. |
| `read_only_style` | `"red"` | Le style du symbole en lecture seule. |
| `truncation_symbol` | `""` | Le symbole en préfixe aux chemins tronqués. eg: "…/" |
<details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
<summary>Ce module possède quelques options de configuration avancées qui contrôlent l'affichage du répertoire.</summary>
| Advanced Option | Défaut | Description |
| Options avancées | Défaut | Description |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| `substitutions` | | A table of substitutions to be made to the path. |
| `substitutions` | | Table de substitutions à faire au chemin. |
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. |
@ -650,7 +650,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| Variable | Exemple | Description |
| --------- | --------------------- | ------------------------------------- |
| path | `"D:/Projects"` | The current directory path |
| path | `"D:/Projects"` | Le chemin du répertoire courant |
| style\* | `"black bold dimmed"` | Reflète la valeur de l'option `style` |
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
@ -677,7 +677,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. |
| `style` | `"blue bold"` | Le style du module. |
| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
| `disabled` | `true` | Disables the `docker_context` module. |
| `disabled` | `true` | Désactive le module `docker_context`. |
### Variables
@ -728,13 +728,13 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
| `style` | `"bold blue"` | Le style du module. |
| `disabled` | `false` | Disables the `dotnet` module. |
| `disabled` | `false` | Désactive le module `dotnet`. |
### Variables
| Variable | Exemple | Description |
| --------- | ---------------- | ------------------------------------------------------------------ |
| version | `v3.1.201` | The version of `dotnet` sdk |
| version | `v3.1.201` | La version du sdk `dotnet` |
| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting |
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
@ -838,7 +838,7 @@ The `env_var` module displays the current value of a selected environment variab
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
| `symbol` | | The symbol used before displaying the variable value. |
| `variable` | | The environment variable to be displayed. |
| `default` | | The default value to be displayed when the selected variable is not defined. |
| `défaut` | | The default value to be displayed when the selected variable is not defined. |
| `format` | `"with [$env_value]($style) "` | Format du module. |
| `disabled` | `false` | Disables the `env_var` module. |
@ -874,7 +874,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. Le modu
| Option | Défaut | Description |
| ---------- | ---------------------------------- | -------------------------------------------------------- |
| `symbol` | `" "` | The symbol used before displaying the version of erlang. |
| `style` | `"bold red"` | Le style du module. |
| `style` | `"bold green"` | Le style du module. |
| `format` | `"via [$symbol$version]($style) "` | Format du module. |
| `disabled` | `false` | Disables the `erlang` module. |
@ -918,7 +918,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
| region | `us-central1` | The current GCP region |
| account | `foo@example.com` | The current GCP profile |
| project | | The current GCP project |
| active | `default` | The active config name written in `~/.config/gcloud/active_config` |
| active | `défaut` | The active config name written in `~/.config/gcloud/active_config` |
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
@ -1091,7 +1091,7 @@ The `git_status` module shows symbols representing the state of the repo in your
| `staged` | `"+"` | The format of `staged` |
| `renamed` | `"»"` | The format of `renamed` |
| `deleted` | `"✘"` | The format of `deleted` |
| `style` | `"bold red"` | Le style du module. |
| `style` | `"bold green"` | Le style du module. |
| `disabled` | `false` | Disables the `git_status` module. |
### Variables
@ -1420,7 +1420,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
:::
@ -1521,7 +1521,7 @@ By default the swap usage is displayed if the total system swap is non-zero.
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
:::
@ -1609,7 +1609,7 @@ The `nim` module shows the currently installed version of Nim. Le module est aff
| Option | Défaut | Description |
| ---------- | ---------------------------------- | ----------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module |
| `format` | `"via [$symbol$version]($style) "` | Format du module |
| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. |
| `style` | `"bold yellow"` | Le style du module. |
| `disabled` | `false` | Disables the `nim` module. |
@ -1805,8 +1805,8 @@ The `package` module is shown when the current directory is the repository for a
### Options
| Option | Défaut | Description |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | Format du module. |
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | Format du module. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| `style` | `"bold 208"` | Le style du module. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
@ -1905,19 +1905,19 @@ format = "via [🔹 $version](147 bold) "
## PureScript
The `purescript` module shows the currently installed version of PureScript version. Le module est affiché si l'une des ces conditions est remplie :
Le module `purescript` affiche la version courante de Purescript installée. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `spago.dhall` file
- Le répertoire courant contient un fichier `spago.dhall`
- The current directory contains a \*.purs files
### Options
| Option | Défaut | Description |
| ---------- | ---------------------------------- | ------------------------------------------------------------ |
| ---------- | ---------------------------------- | ------------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | Format du module. |
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
| `symbol` | `"<=> "` | Le symbole utilisé avant d'afficher la version de PureScript. |
| `style` | `"bold white"` | Le style du module. |
| `disabled` | `false` | Disables the `purescript` module. |
| `disabled` | `false` | Désactive le module `purescript`. |
### Variables
@ -1951,8 +1951,8 @@ Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `pyproject.toml` file
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- Le répertoire courant contient un fichier `tox.ini`
- Le répertoire courant contient un fichier `setup.py`
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
@ -2020,7 +2020,7 @@ The `ruby` module shows the currently installed version of Ruby. Le module est a
| ---------- | ---------------------------------- | ------------------------------------------------ |
| `format` | `"via [$symbol$version]($style) "` | Format du module. |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | Le style du module. |
| `style` | `"bold green"` | Le style du module. |
| `disabled` | `false` | Disables the `ruby` module. |
### Variables
@ -2055,7 +2055,7 @@ The `rust` module shows the currently installed version of Rust. Le module est a
| ---------- | ---------------------------------- | ----------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | Format du module. |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | Le style du module. |
| `style` | `"bold green"` | Le style du module. |
| `disabled` | `false` | Disables the `rust` module. |
### Variables
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
:::
### Options
@ -2163,7 +2165,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Le style du module. |
| `style` | `"bold green"` | Le style du module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `disabled` | `true` | Disables the `status` module. |
@ -2254,7 +2256,7 @@ The `terraform` module shows the currently selected terraform workspace and vers
| Variable | Exemple | Description |
| --------- | ---------- | -------------------------------------- |
| version | `v0.12.24` | The version of `terraform` |
| workspace | `default` | The current terraform workspace |
| workspace | `défaut` | The current terraform workspace |
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
@ -2286,20 +2288,20 @@ 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.
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
:::
### Options
| Option | Défaut | Description |
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| ----------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `format` | `"at [$time]($style) "` | The format string for the module. |
| `use_12hr` | `false` | Enables 12 hour formatting |
| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `"bold yellow"` | The style for the module time |
| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 &lt; x &lt; 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
| `use_12hr` | `false` | Activer le format 12h |
| `time_format` | voir plus bas | Le [format chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilisé pour formater l'heure. |
| `style` | `"bold yellow"` | Le style utilisé par le module |
| `utc_time_offset` | `"local"` | Définir le décalage horaire UTC à utiliser. Range from -24 &lt; x &lt; 24. Accepte des nombres décimaux pour s'adapter aux décalages de 30/45 minutes. |
| `disabled` | `true` | Désactiver le module `time`. |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
@ -2308,7 +2310,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| Variable | Exemple | Description |
| --------- | ---------- | ------------------------------------- |
| time | `13:08:10` | The current time. |
| temps | `13:08:10` | The current time. |
| style\* | | Reflète la valeur de l'option `style` |
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
@ -2326,26 +2328,30 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Username
## Nom d'utilisateur
The `username` module shows active user's username. Le module est affiché si l'une des ces conditions est remplie :
- The current user is root
- The current user isn't the same as the one that is logged in
- The user is currently connected as an SSH session
- The variable `show_always` is set to true
- L'utilisateur courant est root
- L'utilisateur courant est différent de celui connecté
- L'utilisateur est actuellement connecté à une session SSH
- La variable `show_always` a comme valeur true
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### Options
| Option | Défaut | Description |
| ------------- | ----------------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| ------------- | ----------------------- | ------------------------------------------------ |
| `style_root` | `"bold green"` | Le style utilisé quand l'utilisateur est root. |
| `style_user` | `"bold yellow"` | Le style utilisé pour les utilisateurs non-root. |
| `format` | `"[$user]($style) in "` | Format du module. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| `show_always` | `false` | Toujours afficher le module `username`. |
| `disabled` | `false` | Désactiver le module `username`. |
### Variables
@ -2460,7 +2466,7 @@ The order in which custom modules are shown can be individually set by including
`shell` accepts a non-empty list of strings, where:
- The first string is the path to the shell to use to execute the command.
- La première chaîne est le chemin vers le shell à utiliser pour exécuter la commande.
- Other following arguments are passed to the shell.
If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows.

View File

@ -125,6 +125,8 @@
### Démarrage rapide
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Installer l'exécutable **starship** :
@ -138,17 +140,10 @@
```
##### Depuis la source sur [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Installer via le gestionnaire de paquets
##### Avec [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Ajouter le script dinitialisation au fichier de configuration de votre shell:
2. Ajouter le script dinitialisation au fichier de configuration de votre shell:
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -44,7 +44,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
#### Installa con Package Manager
With [Homebrew](https://brew.sh/):
Con [Homebrew](https://brew.sh/):
```sh
brew install starship

View File

@ -1,4 +1,4 @@
# Configuration
# Configurazione
To get started configuring starship, create the following file: `~/.config/starship.toml`.
@ -825,7 +825,7 @@ The `elm` module shows the currently installed version of Elm. The module will b
format = "via [ $version](cyan bold) "
```
## Environment Variable
## Variabili di ambiente
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:
@ -1685,12 +1685,12 @@ The `nodejs` module shows the currently installed version of NodeJS. The module
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------- |
| ------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
| `style` | `"bold green"` | The style for the module. |
| `disabled` | `false` | Disables the `nodejs` module. |
| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. |
| `not_capable_style` | `bold red` | Lo stile per il modulo quando una proprietà chiave in Packages.json non corrisponde alla versione NodeJS. |
###  Variables
@ -1798,15 +1798,15 @@ The `package` module is shown when the current directory is the repository for a
- **mix** - The `mix` package version is extracted from the `mix.exs` present
- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present
- **maven** - The `maven` package version is extracted from the `pom.xml` present
- **meson** - The `meson` package version is extracted from the `meson.build` present
- **meson** - La versione del pacchetto `meson` è estratta dal `meson.build` presente
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| `style` | `"bold 208"` | The style for the module. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Options
@ -2335,7 +2337,11 @@ 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
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### Options

View File

@ -125,6 +125,8 @@
### Inizia
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Installa il binario **starship**:
@ -138,17 +140,10 @@
```
##### Da un sorgente su [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Installa via Package Manager
##### Con [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Aggiungi lo script di inizializzazione al file di configurazione della shell:
2. Aggiungi lo script di inizializzazione al file di configurazione della shell:
#### Bash
@ -231,7 +226,7 @@ Questi progetto esiste grazie a tutte le persone che contribuiscono. [[Contribut
### Contributori Finanziari
Diventa un contributore finanziario e aiutaci a sostenere la nostra comunità. [[Contribute](https://opencollective.com/starship/contribute)]
Diventa un contributore finanziario e aiutaci a sostenere la nostra comunità. [[Contribuisci](https://opencollective.com/starship/contribute)]
#### Privati

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -82,7 +82,7 @@ starship_precmd_user_func="set_win_title"
ここで、 `<color>` は色を指定します(以下で述べます)。 `fg:<color>``<color>` は現在同様の動作ですが、将来変更される可能性があります。 文字列中の単語の順序は関係ありません。
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. 将来 `none` を他の単語と一緒に使用することはエラーになるかもしれません。
色は以下のいずれか1つを指定できます。

View File

@ -305,15 +305,15 @@ symbol = "🅰 "
### オプション
| オプション | デフォルト | 説明 |
| -------------------- | --------------------------------- | --------------------------------------------------- |
| -------------------- | --------------------------------- | ------------------------- |
| `full_symbol` | `""` | バッテリーが満タンのときに表示される記号です。 |
| `charging_symbol` | `""` | バッテリーの充電中に表示される記号です。 |
| `discharging_symbol` | `""` | バッテリーが放電しているときに表示される記号です。 |
| `unknown_symbol` | `""` | The symbol shown when the battery state is unknown. |
| `empty_symbol` | `""` | The symbol shown when the battery state is empty. |
| `unknown_symbol` | `""` | バッテリー状態が不明なときに表示される記号です。 |
| `empty_symbol` | `""` | バッテリーが空のときに表示される記号です。 |
| `format` | `"[$symbol$percentage]($style) "` | moduleのフォーマットです。 |
| `display` | [link](#battery-display) | Display threshold and style for the module. |
| `disabled` | `false` | Disables the `battery` module. |
| `display` | [link](#battery-display) | モジュールの閾値とスタイルを表示します。 |
| `disabled` | `false` | `battery`モジュールを無効にします。 |
### 設定例
@ -329,7 +329,7 @@ discharging_symbol = "💀"
### バッテリーの表示
The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. デフォルトは次のとおりです。
`display` オプションを使用して、バッテリーインジケーターを表示するタイミング(閾値)と外観(スタイル)を定義します。 `display` が提供されない場合、 デフォルトは次のとおりです。
```toml
[[battery.display]]
@ -339,12 +339,12 @@ style = "bold red"
#### オプション
The `display` option is an array of the following table.
`display`オプションは、次の表の通りです。
| オプション | 説明 |
| ----------- | ----------------------------------------------- |
| `threshold` | The upper bound for the display option. |
| `style` | The style used if the display option is in use. |
| ----------- | ------------------------------ |
| `threshold` | バッテリーが表示される上限です。 |
| `style` | displayオプションが使用されている場合のスタイルです。 |
#### 設定例
@ -363,14 +363,14 @@ style = "bold yellow"
## 文字
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
`character`モジュールは、端末でテキストが入力される場所の横に文字(通常は矢印)を表示します。
The character will tell you whether the last command was successful or not. It can do this in two ways:
文字は、最後のコマンドが成功したかどうかを示します。 表し方は下記の2つです。
- 色の変更 (`赤`/`緑`)
- プロンプトの表示の変更 (``/`✖`)
By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape).
デフォルトでは、色だけが変更されます。 If you also want to change it's shape take a look at [this example](#with-custom-error-shape).
### オプション
@ -380,7 +380,7 @@ By default it only changes color. If you also want to change it's shape take a l
| `success_symbol` | `"[](bold green)"` | The format string used before the text input if the previous command succeeded. |
| `error_symbol` | `"[](bold red)"` | The format string used before the text input if the previous command failed. |
| `vicmd_symbol` | `"[](bold green)"` | The format string used before the text input if the shell is in vim normal mode. |
| `disabled` | `false` | Disables the `character` module. |
| `disabled` | `false` | `character`モジュールを無効にします。 |
### 変数
@ -447,25 +447,25 @@ The `cmake` module shows the currently installed version of CMake if any of the
## コマンド実行時間
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
`cmd_duration`モジュールは、最後のコマンドの実行にかかった時間を示します。 モジュールが表示されるのは、コマンドが2秒以上かかった場合、または`min_time`値が存在する場合のみです。
::: warning Do not hook the DEBUG trap in Bash
::: warning BashでDEBUGトラップをhookしない
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
`bash`でStarshipを実行している場合、 `eval $(starship init $0)`実行した後に`DEBUG`トラップをフックしないでください。そうしないと、このモジュールが**おそらくですが**壊れます。
:::
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
preexecのような機能を必要とするBashユーザーは、 [rcalorasのbash_preexecフレームワーク](https://github.com/rcaloras/bash-preexec)を使用できます。 `eval $(starship init $0)` を実行する前に、`preexec_functions`、および`precmd_functions`定義するだけで、通常どおり続行します。
### オプション
| オプション | デフォルト | 説明 |
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| -------------------- | ----------------------------- | ----------------------------------------------------- |
| `min_time` | `2_000` | 実行時間を表示する最短期間(ミリ秒単位)です。 |
| `show_milliseconds` | `false` | 実行時間の秒に加えてミリ秒を表示します。 |
| `format` | `"took [$duration]($style) "` | moduleのフォーマットです。 |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `disabled` | `false` | `cmd_duration`モジュールを無効にします。 |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
@ -478,8 +478,8 @@ Showing desktop notifications requires starship to be built with `rust-notify` s
### 変数
| 変数 | 設定例 | 説明 |
| --------- | -------- | --------------------------------------- |
| duration | `16m40s` | The time it took to execute the command |
| --------- | -------- | ---------------------- |
| duration | `16m40s` | コマンドの実行時間 |
| style\* | | オプション `style` の値をミラーする |
\*: この変数はスタイル文字列の一部としてのみ使用できます
@ -496,24 +496,24 @@ format = "underwent [$duration](bold yellow)"
## Conda
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
`$CONDA_DEFAULT_ENV`が設定されている場合、`conda`モジュールは現在のcondaの環境を表示します。
::: tip
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
Note: これはconda自身の プロンプト修飾子 を抑制しません。`conda config --set changeps1 False` で実行することができます。
:::
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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` | `"🅒 "` | The symbol used before the environment name. |
| ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | 環境が`conda create -p [path]`で作成された場合、環境パスが切り捨てられるディレクトリ数。 `0`は切り捨てがないことを意味します。 [`directory`](#directory)もご覧ください。 |
| `symbol` | `"🅒 "` | 環境名の直前に使用されるシンボルです。 |
| `style` | `"bold green"` | モジュールのスタイルです。 |
| `format` | `"via [$symbol$environment]($style) "` | moduleのフォーマットです。 |
| `ignore_base` | `true` | Ignores `base` environment when activated. |
| `disabled` | `false` | Disables the `conda` module. |
| `disabled` | `false` | `conda`モジュールを無効にします。 |
### 変数
@ -536,7 +536,7 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
The `crystal` module shows the currently installed version of Crystal. 次の条件のいずれかが満たされると、モジュールが表示されます。
`crystal`モジュールには、現在インストールされているCrystalのバージョンが表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`shard.yml`ファイルが含まれている
- カレントディレクトリに`.cr`の拡張子のファイルが含まれている
@ -544,11 +544,11 @@ The `crystal` module shows the currently installed version of Crystal. 次の条
### オプション
| オプション | デフォルト | 説明 |
| ---------- | ---------------------------------- | --------------------------------------------------------- |
| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. |
| ---------- | ---------------------------------- | ------------------------------ |
| `symbol` | `"🔮 "` | Crystalのバージョンを表示する前に使用される記号です。 |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `disabled` | `false` | Disables the `crystal` module. |
| `disabled` | `false` | `crystal`モジュールを無効にします。 |
### 変数
@ -607,33 +607,33 @@ format = "via [🔰 $version](bold red) "
## ディレクトリ
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`モジュールには、現在のディレクトリへのパスが表示され、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`が表示されます。
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- |
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
| ------------------- | -------------------------------------------------- | ----------------------------------------------------- |
| `truncation_length` | `3` | 現在のディレクトリを切り捨てる親フォルダーの数です。 |
| `truncate_to_repo` | `true` | 現在いるgitリポジトリのルートに切り捨てるかどうかです。 |
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | moduleのフォーマットです。 |
| `style` | `"bold cyan"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `directory` module. |
| `disabled` | `false` | `directory`モジュールを無効にします。 |
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
<details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
<summary>このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。</summary>
| Advanced Option | デフォルト | 説明 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| --------------------------- | ------ | ------------------------------------------------ |
| `substitutions` | | A table of substitutions to be made to the path. |
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. |
| `fish_style_pwd_dir_length` | `0` | fish shellのpwdパスロジックを適用するときに使用する文字数です。 |
| `use_logical_path` | `true` | OSからのパスの代わりに、シェル(`PWD`) によって提供される論理パスを表示します。 |
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD.
@ -668,7 +668,7 @@ truncation_symbol = "…/"
## Docker Context
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`.
`docker_context`モジュールは、 [Dockerコンテキスト](https://docs.docker.com/engine/context/working-with-contexts/)が`デフォルト`に設定されていない場合、現在アクティブな <1>Dockerコンテキストを表示します。
### オプション
@ -678,7 +678,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. |
| `style` | `"blue bold"` | モジュールのスタイルです。 |
| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
| `disabled` | `true` | Disables the `docker_context` module. |
| `disabled` | `true` | `docker_context`モジュールを無効にします。 |
### 変数
@ -701,7 +701,7 @@ format = "via [🐋 $context](blue bold)"
## 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 or more of the following files are present in the current directory:
@ -717,19 +717,19 @@ This module will only be shown in your prompt when one or more of the following
You'll also need the .NET Core SDK installed in order to use it correctly.
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 `を設定します。
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
### オプション
| オプション | デフォルト | 説明 |
| ----------- | --------------------------------------- | -------------------------------------------------------- |
| ----------- | --------------------------------------- | ------------------------------------ |
| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
| `symbol` | `•NET "` | dotnetのバージョンを表示する前に使用される記号です。 |
| `heuristic` | `true` | より高速なバージョン検出を使用して、starshipの動作を維持します。 |
| `style` | `"bold blue"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `dotnet` module. |
| `disabled` | `false` | `dotnet`モジュールを無効にします。 |
### 変数
@ -790,7 +790,7 @@ symbol = "🔮 "
## Elm
The `elm` module shows the currently installed version of Elm. 次の条件のいずれかが満たされると、モジュールが表示されます。
`elm`モジュールは、現在インストールされているElmのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`elm.json`ファイルが含まれている
- カレントディレクトリに`elm-package.json`ファイルが含まれている
@ -805,7 +805,7 @@ The `elm` module shows the currently installed version of Elm. 次の条件の
| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. |
| `style` | `"cyan bold"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `elm` module. |
| `disabled` | `false` | `elm`モジュールを無効にします。 |
### 変数
@ -828,7 +828,7 @@ format = "via [ $version](cyan bold) "
## 環境変数
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`オプションが定義されている
@ -836,12 +836,12 @@ The `env_var` module displays the current value of a selected environment variab
### オプション
| オプション | デフォルト | 説明 |
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
| `symbol` | | The symbol used before displaying the variable value. |
| `variable` | | The environment variable to be displayed. |
| `default` | | The default value to be displayed when the selected variable is not defined. |
| ---------- | ------------------------------ | ------------------------------------- |
| `symbol` | | 環境変数を表示する前に使用される記号です。 |
| `variable` | | 表示される環境変数です。 |
| `default` | | 上のvariableが定義されていない場合に表示されるデフォルトの値です。 |
| `format` | `"with [$env_value]($style) "` | moduleのフォーマットです。 |
| `disabled` | `false` | Disables the `env_var` module. |
| `disabled` | `false` | `env_var`モジュールを無効にします。 |
### 変数
@ -960,20 +960,20 @@ asia-northeast1 = "an1"
## Git ブランチ
The `git_branch` module shows the active branch of the repo in your current directory.
`git_branch`モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを表示します。
### オプション
| オプション | デフォルト | 説明 |
| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
| -------------------- | -------------------------------- | ------------------------------------------------------------------------------------ |
| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
| `format` | `"on [$symbol$branch]($style) "` | moduleのフォーマットです。 Use `"$branch"` to refer to the current branch name. |
| `symbol` | `" "` | A format string representing the symbol of git branch. |
| `style` | `"bold purple"` | モジュールのスタイルです。 |
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. |
| `truncation_symbol` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 You can use `""` for no symbol. |
| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. |
| `disabled` | `false` | Disables the `git_branch` module. |
| `disabled` | `false` | `git_branch`モジュールを無効にします。 |
### 変数
@ -1005,14 +1005,14 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### オプション
| オプション | デフォルト | 説明 |
| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| -------------------- | ------------------------------------------------------ | ------------------------------------------------- |
| `commit_hash_length` | `7` | 表示されるgitコミットハッシュの長さです。 |
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | moduleのフォーマットです。 |
| `style` | `"bold green"` | モジュールのスタイルです。 |
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state |
| `only_detached` | `true` | 切り離されたHEAD状態のときのみgit commit hashを表示します |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_symbol` | `"🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| `disabled` | `false` | `git_commit`モジュールを無効にします。 |
### 変数
@ -1035,7 +1035,7 @@ tag_symbol = "🔖 "
## 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)はその情報も表示されます。
### オプション
@ -1050,7 +1050,7 @@ The `git_state` module will show in directories which are part of a git reposito
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | moduleのフォーマットです。 |
| `disabled` | `false` | Disables the `git_state` module. |
| `disabled` | `false` | `git_state`モジュールを無効にします。 |
### 変数
@ -1075,17 +1075,17 @@ cherry_pick = "[🍒 PICKING](bold red)"
## Git の状態
The `git_status` module shows symbols representing the state of the repo in your current directory.
`git_status`モジュールは、現在のディレクトリのリポジトリの状態を表すシンボルを表示します。
### オプション
| オプション | デフォルト | 説明 |
| ------------ | ----------------------------------------------- | ----------------------------------- |
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
| `conflicted` | `"="` | This branch has merge conflicts. |
| `ahead` | `"⇡"` | The format of `ahead` |
| `behind` | `"⇣"` | The format of `behind` |
| `diverged` | `"⇕"` | The format of `diverged` |
| ------------ | ----------------------------------------------- | ------------------------- |
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | `git_status` のデフォルトフォーマット |
| `conflicted` | `"="` | このブランチにはマージの競合があります。 |
| `ahead` | `"⇡"` | `ahead`のフォーマット |
| `behind` | `"⇣"` | `behind`のフォーマット |
| `diverged` | `"⇕"` | `diverged`のフォーマット |
| `untracked` | `"?"` | The format of `untracked` |
| `stashed` | `"$"` | The format of `stashed` |
| `modified` | `"!"` | The format of `modified` |
@ -1093,7 +1093,7 @@ The `git_status` module shows symbols representing the state of the repo in your
| `renamed` | `"»"` | The format of `renamed` |
| `deleted` | `"✘"` | The format of `deleted` |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `git_status` module. |
| `disabled` | `false` | `git_status`モジュールを無効にします。 |
### 変数
@ -1124,8 +1124,8 @@ The following variables can be used in `diverged`:
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
| 変数 | 説明 |
| ------- | ------------------------ |
| `count` | Show the number of files |
| ------- | ------------- |
| `count` | ファイルの数を表示します。 |
### 設定例
@ -1158,7 +1158,7 @@ behind = "⇣${count}"
## Golang
The `golang` module shows the currently installed version of Golang. 次の条件のいずれかが満たされると、モジュールが表示されます。
`golang`モジュールは、現在インストールされているGolangのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`go.mod`ファイルが含まれている
- カレントディレクトリに`go.sum`ファイルが含まれている
@ -1176,7 +1176,7 @@ The `golang` module shows the currently installed version of Golang. 次の条
| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"🐹 "` | A format string representing the symbol of Go. |
| `style` | `"bold cyan"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `golang` module. |
| `disabled` | `false` | `golang`モジュールを無効にします。 |
### 変数
@ -1234,17 +1234,17 @@ format = "via [⎈ $version](bold white) "
## ホスト名
The `hostname` module shows the system hostname.
`hostname`モジュールには、システムのホスト名が表示されます。
### オプション
| オプション | デフォルト | 説明 |
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
| ---------- | --------------------------- | --------------------------------------------------------------------------- |
| `ssh_only` | `true` | SSHセッションに接続されている場合にのみホスト名を表示します。 |
| `trim_at` | `"."` | この文字が最初にマッチするまでをホスト名と認識します。 `"."`は最初の. までをホスト名として認識します。 `""`を指定した場合トリムしません。 |
| `format` | `"[$hostname]($style) in "` | moduleのフォーマットです。 |
| `style` | `"bold dimmed green"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `hostname` module. |
| `disabled` | `false` | `hostname`モジュールを無効にします。 |
### 変数
@ -1269,7 +1269,7 @@ disabled = false
## Java
The `java` module shows the currently installed version of Java. 次の条件のいずれかが満たされると、モジュールが表示されます。
`java`モジュールは、現在インストールされているJavaのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
@ -1281,7 +1281,7 @@ The `java` module shows the currently installed version of Java. 次の条件の
| `format` | `"via [${symbol}${version}]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `java` module. |
| `disabled` | `false` | `java`モジュールを無効にします。 |
### 変数
@ -1304,17 +1304,17 @@ symbol = "🌟 "
## ジョブ
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists.
`jobs`モジュールには、実行中のジョブの現在の数が表示されます。 このモジュールは、実行中のバックグラウンドジョブがある場合にのみ表示されます。 1つ以上のジョブがある、または`threshold`に指定した値以上にジョブがある場合は実行中のジョブの数を表示します。
### オプション
| オプション | デフォルト | 説明 |
| ----------- | ----------------------------- | ------------------------------------------------ |
| `threshold` | `1` | Show number of jobs if exceeded. |
| `threshold` | `1` | 超過した場合、ジョブの数を表示します。 |
| `format` | `"[$symbol$number]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"✦"` | A format string representing the number of jobs. |
| `style` | `"bold blue"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `jobs` module. |
| `disabled` | `false` | `jobs`モジュールを無効にします。 |
### 変数
@ -1338,7 +1338,7 @@ threshold = 4
## Julia
The `julia` module shows the currently installed version of Julia. 次の条件のいずれかが満たされると、モジュールが表示されます。
`julia`モジュールは、現在インストールされているJuliaのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`Project.toml`ファイルが含まれている
- カレントディレクトリに`Manifest.toml`ファイルが含まれている
@ -1351,7 +1351,7 @@ The `julia` module shows the currently installed version of Julia. 次の条件
| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. |
| `style` | `"bold purple"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `julia` module. |
| `disabled` | `false` | `julia`モジュールを無効にします。 |
### 変数
@ -1421,7 +1421,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`に設定します。
:::
@ -1458,15 +1458,15 @@ disabled = false
"dev.local.cluster.k8s" = "dev"
```
## Line Break
## 改行
The `line_break` module separates the prompt into two lines.
`line_break`モジュールは、プロンプトを2行に分割します。
### オプション
| オプション | デフォルト | 説明 |
| ---------- | ------- | ------------------------------------------------------------------ |
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
| ---------- | ------- | ------------------------------------- |
| `disabled` | `false` | `line_break`モジュールを無効にして、プロンプトを1行にします。 |
### 設定例
@ -1514,27 +1514,28 @@ The `lua` module shows the currently installed version of Lua. 次の条件の
format = "via [🌕 $version](bold blue) "
```
## Memory Usage
## メモリ使用量
The `memory_usage` module shows current system memory and swap usage.
`memory_usage</ 0>モジュールは、現在のシステムメモリとスワップ使用量を示します。</p>
By default the swap usage is displayed if the total system swap is non-zero.
<p spaces-before="0">デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。</p>
::: tip
<p spaces-before="0">::: tip</p>
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
<p spaces-before="0">このモジュールはデフォルトで無効になっています。
有効にするには、設定ファイルで<code>disabled`を`false`に設定します。
:::
### オプション
| オプション | デフォルト | 説明 |
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
| ----------- | --------------------------------------------- | --------------------------- |
| `threshold` | `75` | この閾値を超えない限り、メモリ使用率は表示されません。 |
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
| `symbol` | `"🐏"` | メモリ使用率を表示する前に使用される記号です。 |
| `style` | `"bold dimmed white"` | モジュールのスタイルです。 |
| `disabled` | `true` | Disables the `memory_usage` module. |
| `disabled` | `true` | `memory_usage`モジュールを無効にします。 |
### 変数
@ -1561,9 +1562,9 @@ symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
## Mercurial ブランチ
The `hg_branch` module shows the active branch of the repo in your current directory.
` hg_branch `モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを示します。
### オプション
@ -1573,7 +1574,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| `style` | `"bold purple"` | モジュールのスタイルです。 |
| `format` | `"on [$symbol$branch]($style) "` | moduleのフォーマットです。 |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
| `truncation_symbol` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 |
| `disabled` | `true` | Disables the `hg_branch` module. |
### 変数
@ -1637,7 +1638,7 @@ symbol = "🎣 "
## Nix-shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
`nix_shell`モジュールは、nix-shell環境を示しています。 このモジュールは、nixシェル環境内にあるときに表示されます。
### オプション
@ -1648,7 +1649,7 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
| `style` | `"bold blue"` | モジュールのスタイルです。 |
| `impure_msg` | `"impure"` | A format string shown when the shell is impure. |
| `pure_msg` | `"pure"` | A format string shown when the shell is pure. |
| `disabled` | `false` | Disables the `nix_shell` module. |
| `disabled` | `false` | `nix_shell`モジュールを無効にします。 |
### 変数
@ -1675,11 +1676,11 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. 次の条件のいずれかが満たされると、モジュールが表示されます。
`nodejs`モジュールは、現在インストールされているNodeJSのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `package.json` file
- カレントディレクトリに`package.json`ファイルが含まれている
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory
- カレントディレクトリに`node_modules`ディレクトリが含まれている
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
- The current directory contains a file with the `.ts` extension
@ -1690,7 +1691,7 @@ The `nodejs` module shows the currently installed version of NodeJS. 次の条
| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
| `style` | `"bold green"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `nodejs` module. |
| `disabled` | `false` | `nodejs`モジュールを無効にします。 |
| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. |
###  Variables
@ -1786,14 +1787,14 @@ style = "bold yellow"
symbol = "☁️ "
```
## Package Version
## パッケージのバージョン
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
- **npm** The `npm` package version is extracted from the `package.json` present in the current directory
- **cargo** The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
- **poetry** The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
- **composer** The `composer` package version is extracted from the `composer.json` present in the current directory
- **npm** `npm`パッケージバージョンは、現在のディレクトリにある`package.json`から抽出されます
- **cargo** `cargo`パッケージバージョンは、現在のディレクトリにある`Cargo.toml`から抽出されます。
- **poetry** `poetry`パッケージバージョンは、現在のディレクトリにある`pyproject.toml`から抽出されます
- **composer** `composer`パッケージバージョンは、現在のディレクトリにある`composer.json`から抽出されます
- **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
- **mix** - The `mix` package version is extracted from the `mix.exs` present
@ -1806,12 +1807,12 @@ The `package` module is shown when the current directory is the repository for a
### オプション
| オプション | デフォルト | 説明 |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| ----------------- | --------------------------------- | --------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"📦 "` | パッケージのバージョンを表示する前に使用される記号です。 |
| `style` | `"bold 208"` | モジュールのスタイルです。 |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | Disables the `package` module. |
| `disabled` | `false` | `package` モジュールを無効にします。 |
### 変数
@ -1870,20 +1871,20 @@ format = "via [🦪 $version]($style) "
## PHP
The `php` module shows the currently installed version of PHP. 次の条件のいずれかが満たされると、モジュールが表示されます。
`php`モジュールは、現在インストールされているPHPのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `composer.json` file
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file
- カレントディレクトリに`.php`の拡張子のファイルが含まれている
### オプション
| オプション | デフォルト | 説明 |
| ---------- | ---------------------------------- | ----------------------------------------------------- |
| ---------- | ---------------------------------- | -------------------------- |
| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
| `symbol` | `"🐘 "` | PHPのバージョンを表示する前に使用される記号です。 |
| `style` | `"147 bold"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `php` module. |
| `disabled` | `false` | `php`モジュールを無効にします。 |
### 変数
@ -1941,21 +1942,21 @@ format = "via [$symbol$version](bold white)"
## Python
The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated.
`python` モジュールは現在インストールされているPythonのバージョンと アクティブ化されている場合は現在のPython仮想環境を表示します。
If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`.
次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- カレントディレクトリに`.python-version`ファイルが含まれている
- カレントディレクトリに`requirements.txt`ファイルが含まれている
- カレントディレクトリに`pyproject.toml`ファイルが含まれている
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- カレントディレクトリに`Pipfile`ファイルが含まれている
- カレントディレクトリに`tox.ini`ファイルが含まれている
- カレントディレクトリに`setup.py`ファイルが含まれている
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
- 仮想環境がアクティブである
### オプション
@ -1964,11 +1965,11 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | moduleのフォーマットです。 |
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
| `style` | `"yellow bold"` | モジュールのスタイルです。 |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します |
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
| `disabled` | `false` | Disables the `python` module. |
| `disabled` | `false` | `python`モジュールを無効にします。 |
::: tip
@ -2009,11 +2010,11 @@ python_binary = "python3"
## Ruby
The `ruby` module shows the currently installed version of Ruby. 次の条件のいずれかが満たされると、モジュールが表示されます。
`ruby`モジュールは、現在インストールされているRubyのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `Gemfile` file
- カレントディレクトリに`Gemfile`ファイルが含まれている
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file
- カレントディレクトリに`.rb`の拡張子のファイルが含まれている
### オプション
@ -2022,7 +2023,7 @@ The `ruby` module shows the currently installed version of Ruby. 次の条件の
| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `ruby` module. |
| `disabled` | `false` | `ruby`モジュールを無効にします。 |
### 変数
@ -2045,10 +2046,10 @@ symbol = "🔺 "
## Rust
The `rust` module shows the currently installed version of Rust. 次の条件のいずれかが満たされると、モジュールが表示されます。
`rust`モジュールには、現在インストールされているRustのバージョンが表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `Cargo.toml` file
- The current directory contains a file with the `.rs` extension
- カレントディレクトリに`Cargo.toml`ファイルが含まれている
- カレントディレクトリに`.rs`の拡張子のファイルが含まれている
### オプション
@ -2057,7 +2058,7 @@ The `rust` module shows the currently installed version of Rust. 次の条件の
| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `rust` module. |
| `disabled` | `false` | `rust`モジュールを無効にします。 |
### 変数
@ -2152,7 +2153,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
:::
### オプション
@ -2238,7 +2241,7 @@ format = "via [🏎 $version](red bold)"
The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `.terraform` folder
- カレントディレクトリに`.terraform`フォルダが含まれている
- Current directory contains a file with the `.tf` or `.hcl` extensions
### オプション
@ -2248,7 +2251,7 @@ The `terraform` module shows the currently selected terraform workspace and vers
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
| `symbol` | `"💠 "` | A format string shown before the terraform workspace. |
| `style` | `"bold 105"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `terraform` module. |
| `disabled` | `false` | `terraform`モジュールを無効にします。 |
### 変数
@ -2287,20 +2290,20 @@ 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`に設定します。
:::
### オプション
| オプション | デフォルト | 説明 |
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- |
| `format` | `"at [$time]($style) "` | The format string for the module. |
| `use_12hr` | `false` | Enables 12 hour formatting |
| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `"bold yellow"` | The style for the module time |
| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 &lt; x &lt; 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
| `use_12hr` | `false` | 12時間のフォーマットを有効にします。 |
| `time_format` | この表の下を参照してください | 時刻のフォーマットに使用される[クロノフォーマット文字列](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) です。 |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `utc_time_offset` | `"local"` | 使用するUTCオフセットを設定します。 Range from -24 &lt; x &lt; 24. フロートが30/45分のタイムゾーンオフセットに対応できるようにします。 |
| `disabled` | `true` | `time`モジュールを無効にします。 |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
@ -2309,7 +2312,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| 変数 | 設定例 | 説明 |
| --------- | ---------- | ---------------------- |
| time | `13:08:10` | The current time. |
| 時刻 | `13:08:10` | The current time. |
| style\* | | オプション `style` の値をミラーする |
\*: この変数はスタイル文字列の一部としてのみ使用できます
@ -2327,26 +2330,30 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Username
## ユーザー名
The `username` module shows active user's 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に設定されている
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### オプション
| オプション | デフォルト | 説明 |
| ------------- | ----------------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| ------------- | ----------------------- | ------------------------- |
| `style_root` | `"bold red"` | ユーザーがrootのときに使用されるスタイルです。 |
| `style_user` | `"bold yellow"` | 非rootユーザーに使用されるスタイルです。 |
| `format` | `"[$user]($style) in "` | moduleのフォーマットです。 |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| `show_always` | `false` | `username` モジュールを常に表示します。 |
| `disabled` | `false` | `username` モジュールを無効にします。 |
### 変数
@ -2437,8 +2444,8 @@ The order in which custom modules are shown can be individually set by including
| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `shell` | | [この表の下を参照してください](#custom-command-shell) |
| `説明` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |

View File

@ -125,6 +125,8 @@
### 入門
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. **Starship** のバイナリをインストール
@ -138,17 +140,10 @@
```
##### [crates.io](https://crates.io/)からソースをインストール
```sh
cargo install starship
```
#### パッケージマネージャー経由でインストール
##### [ Homebrew ](https://brew.sh/)の場合:
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. 初期化のためのスクリプトをシェルの設定ファイルに追加
2. 初期化のためのスクリプトをシェルの設定ファイルに追加
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -1805,8 +1805,8 @@ The `package` module is shown when the current directory is the repository for a
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| `style` | `"bold 208"` | The style for the module. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Options
@ -2335,7 +2337,11 @@ 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
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### Options

View File

@ -125,6 +125,8 @@
### Getting Started
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Install the **starship** binary:
@ -138,17 +140,10 @@
```
##### From source on [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Install via Package Manager
##### With [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Add the init script to your shell's config file:
2. Add the init script to your shell's config file:
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -1805,8 +1805,8 @@ The `package` module is shown when the current directory is the repository for a
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| `style` | `"bold 208"` | The style for the module. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Options
@ -2335,7 +2337,11 @@ 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
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### Options

View File

@ -125,6 +125,8 @@
### Getting Started
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Install the **starship** binary:
@ -138,17 +140,10 @@
```
##### From source on [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Install via Package Manager
##### With [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Add the init script to your shell's config file:
2. Add the init script to your shell's config file:
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -1805,8 +1805,8 @@ The `package` module is shown when the current directory is the repository for a
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| `style` | `"bold 208"` | The style for the module. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Options
@ -2335,7 +2337,11 @@ 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
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### Options

View File

@ -125,6 +125,8 @@
### Getting Started
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Install the **starship** binary:
@ -138,17 +140,10 @@
```
##### From source on [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Install via Package Manager
##### With [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Add the init script to your shell's config file:
2. Add the init script to your shell's config file:
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -379,7 +379,7 @@ By default it only changes color. If you also want to change it's shape take a l
| `success_symbol` | `"[](bold green)"` | The format string used before the text input if the previous command succeeded. |
| `error_symbol` | `"[](bold red)"` | The format string used before the text input if the previous command failed. |
| `vicmd_symbol` | `"[](bold green)"` | The format string used before the text input if the shell is in vim normal mode. |
| `disabled` | `false` | Disables the `character` module. |
| `disabled` | `false` | Desabilita o módulo `character`. |
### Variables
@ -448,7 +448,7 @@ The `cmake` module shows the currently installed version of CMake if any of the
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
::: warning Do not hook the DEBUG trap in Bash
::: warning Não utilize o DEBUG-trap no Bash
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
@ -1457,7 +1457,7 @@ disabled = false
"dev.local.cluster.k8s" = "dev"
```
## Line Break
## Quebra de linha
The `line_break` module separates the prompt into two lines.
@ -1513,7 +1513,7 @@ The `lua` module shows the currently installed version of Lua. The module will b
format = "via [🌕 $version](bold blue) "
```
## Memory Usage
## Uso de memória
The `memory_usage` module shows current system memory and swap usage.
@ -1805,8 +1805,8 @@ The `package` module is shown when the current directory is the repository for a
### Opções
| Option | Padrão | Descrição |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| `style` | `"bold 208"` | O estilo do módulo. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Opções
@ -2335,7 +2337,11 @@ 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
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### Opções
@ -2437,7 +2443,7 @@ The order in which custom modules are shown can be individually set by including
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `descrição` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |

View File

@ -125,6 +125,8 @@
### Primeiros passos
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Instale o binário do **starship**:
@ -138,17 +140,10 @@
```
##### Código fonte via [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Instalar via gerenciador de pacotes
##### Com o [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Adicione o script de inicialização no arquivo de configuração do seu shell:
2. Adicione o script de inicialização no arquivo de configuração do seu shell:
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -1805,8 +1805,8 @@ The `package` module is shown when the current directory is the repository for a
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| `style` | `"bold 208"` | The style for the module. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Options
@ -2335,7 +2337,11 @@ 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
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### Options

View File

@ -125,6 +125,8 @@
### Getting Started
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Install the **starship** binary:
@ -138,17 +140,10 @@
```
##### From source on [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Install via Package Manager
##### With [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Add the init script to your shell's config file:
2. Add the init script to your shell's config file:
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -304,15 +304,15 @@ symbol = "🅰 "
### Опции
| Параметр | По умолчанию | Описание |
| -------------------- | --------------------------------- | --------------------------------------------------- |
| -------------------- | --------------------------------- | ------------------------------------------------------- |
| `full_symbol` | `""` | Символ, отображаемый при полной батарее. |
| `charging_symbol` | `""` | Символ, показываемый при зарядке аккумулятора. |
| `discharging_symbol` | `""` | Символ, показываемый при разрядке аккумулятора. |
| `unknown_symbol` | `""` | The symbol shown when the battery state is unknown. |
| `empty_symbol` | `""` | The symbol shown when the battery state is empty. |
| `unknown_symbol` | `""` | Символ, отображаемый при неизвестном состоянии батареи. |
| `empty_symbol` | `""` | Символ, отображаемый при пустом состоянии батареи. |
| `format` | `"[$symbol$percentage]($style) "` | Формат модуля. |
| `display` | [ссылка](#battery-display) | Display threshold and style for the module. |
| `disabled` | `false` | Disables the `battery` module. |
| `display` | [ссылка](#battery-display) | Порог отображения и стиль для модуля. |
| `disabled` | `false` | Отключает модуль `battery`. |
### Пример
@ -328,7 +328,7 @@ discharging_symbol = "💀"
### Отображение батареи
The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. Значение по умолчанию:
Параметр `display` используется для определения того, когда индикатор батареи должен быть показан (threshhold) и как он выглядит (style). Если `display` не предоставлено. Значение по умолчанию:
```toml
[[battery.display]]
@ -338,12 +338,12 @@ style = "bold red"
#### Опции
The `display` option is an array of the following table.
Опция `display` представляет собой массив следующей таблицы.
| Параметр | Описание |
| ----------- | ----------------------------------------------- |
| `threshold` | The upper bound for the display option. |
| `style` | The style used if the display option is in use. |
| ----------- | -------------------------------------------------------- |
| `threshold` | Верхняя граница опции отображения. |
| `style` | Используемый стиль, если используется опция отображения. |
#### Пример
@ -362,9 +362,9 @@ style = "bold yellow"
## Символ
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
Модуль `character` показывает символ (обычно, стрелка) рядом с вводимым текстом в терминале.
The character will tell you whether the last command was successful or not. It can do this in two ways:
Символ показывает, была ли последняя команда успешной или нет. It can do this in two ways:
- changing color (`red`/`green`)
- changing shape (``/`✖`)
@ -379,7 +379,7 @@ By default it only changes color. If you also want to change it's shape take a l
| `success_symbol` | `"[](bold green)"` | The format string used before the text input if the previous command succeeded. |
| `error_symbol` | `"[](bold red)"` | The format string used before the text input if the previous command failed. |
| `vicmd_symbol` | `"[](bold green)"` | The format string used before the text input if the shell is in vim normal mode. |
| `disabled` | `false` | Disables the `character` module. |
| `disabled` | `false` | Отключает модуль `character`. |
### Переменные
@ -446,25 +446,25 @@ The `cmake` module shows the currently installed version of CMake if any of the
## Длительность команды
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
Модуль `cmd_duration` показывает время исполнения последней команды. Модуль будет показан только, если команда заняла более двух секунд, или если задан параметр `min_time`.
::: warning Do not hook the DEBUG trap in Bash
::: warning Не подключайте ловушку DEBUG к Bash
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
Если вы испоьзуете Starship в `bash`, не подключайте ловушку `DEBUG` после запуска `eval $(starship init $0)`, иначе этот модуль сломается.
:::
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
Пользователи Bash, которым нужна функциональность, подобная preexec, могут использовать [фреймворк bash_preexec от rcaloras](https://github.com/rcaloras/bash-preexec). Просто определите массивы `preexec_functions` и `precmd_functions` перед запуском `eval $(starship init $0)`, а затем продолжайте нормально.
### Опции
| Параметр | По умолчанию | Описание |
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| -------------------- | ----------------------------- | -------------------------------------------------------------------- |
| `min_time` | `2_000` | Кратчайшая продолжительность для показа времени (в миллисекундах). |
| `show_milliseconds` | `false` | Показывать миллисекунды в дополнение к секундам в продолжительности. |
| `format` | `"took [$duration]($style) "` | Формат модуля. |
| `style` | `"bold yellow"` | Стиль модуля. |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `disabled` | `false` | Отключает модуль `cmd_duration`. |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
@ -495,24 +495,24 @@ format = "underwent [$duration](bold yellow)"
## Конда
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
Модуль `conda` показывает текущее окружение conda, если `$CONDA_DEFAULT_ENV` присвоено значение.
::: tip
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
Это не подавляет модификатор командной строки самой conda. Возможно, вы захотите запустить `conda config --set changeps1 False`.
:::
### Опции
| Параметр | По умолчанию | Описание |
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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` | `"🅒 "` | The symbol used before the environment name. |
| ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `truncation_length` | `1` | Количество каталогов, в которых путь к окружению должен быть усечен, если окружение было создано через `conda create -p [path]`. `0` означает без усечения. Также смотрите модуль [`directory`](#directory). |
| `symbol` | `"🅒 "` | Символ перед названием окружения. |
| `style` | `"bold green"` | Стиль модуля. |
| `format` | `"via [$symbol$environment]($style) "` | Формат модуля. |
| `ignore_base` | `true` | Ignores `base` environment when activated. |
| `disabled` | `false` | Disables the `conda` module. |
| `disabled` | `false` | Отключает модуль `conda`. |
### Переменные
@ -535,7 +535,7 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
The `crystal` module shows the currently installed version of Crystal. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `crystal` показывает установленную версию Crystal. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий каталог содержит файл `shard.yml`
- Текущий каталог содержит файл `.cr`
@ -543,11 +543,11 @@ The `crystal` module shows the currently installed version of Crystal. Моду
### Опции
| Параметр | По умолчанию | Описание |
| ---------- | ---------------------------------- | --------------------------------------------------------- |
| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. |
| ---------- | ---------------------------------- | ------------------------------------------------------- |
| `symbol` | `"🔮 "` | Символ, используемый перед отображением версии crystal. |
| `style` | `"bold red"` | Стиль модуля. |
| `format` | `"via [$symbol$version]($style) "` | Формат модуля. |
| `disabled` | `false` | Disables the `crystal` module. |
| `disabled` | `false` | Отключает модуль `crystal`. |
### Переменные
@ -606,33 +606,33 @@ format = "via [🔰 $version](bold red) "
## Каталог
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`.
### Опции
| Параметр | По умолчанию | Описание |
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- |
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
| ------------------- | -------------------------------------------------- | ---------------------------------------------------------------------------- |
| `truncation_length` | `3` | Количество родительских папок, к которым должен быть усечен текущий каталог. |
| `truncate_to_repo` | `true` | Следует или нет обрезать до корня репозитория git, в котором вы находитесь. |
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Формат модуля. |
| `style` | `"bold cyan"` | Стиль модуля. |
| `disabled` | `false` | Disables the `directory` module. |
| `disabled` | `false` | Отключает модуль `directory`. |
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
<details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
<summary>Этот модуль имеет несколько расширенных опций конфигурации, которые контролируют отображение каталога.</summary>
| Advanced Option | По умолчанию | Описание |
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
| --------------------------- | ------------ | --------------------------------------------------------------------------------- |
| `substitutions` | | A table of substitutions to be made to the path. |
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. |
| `fish_style_pwd_dir_length` | `0` | Количество символов, используемых при использовании логики создания пути из fish. |
| `use_logical_path` | `true` | Отображает логический путь от оболочки (`PWD`) вместо пути от ОС. |
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD.
@ -642,7 +642,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
"src/com/long/java/path" = "mypath"
```
`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
`fish_style_pwd_dir_length` взаимодействует со стандартными параметрами усечения, которые могут сначала показаться странными: если он не равен нулю, элементы пути, который обычно усекается, вместо этого отображаются с указанным количеством символов. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
</details>
@ -667,7 +667,7 @@ truncation_symbol = "…/"
## Контекст Docker
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`.
Модуль `docker_context` показывает текущий активный [контекст Docker](https://docs.docker.com/engine/context/working-with-contexts/), если он не установлен как `default`.
### Опции
@ -700,7 +700,7 @@ format = "via [🐋 $context](blue bold)"
## 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 or more of the following files are present in the current directory:
@ -716,19 +716,19 @@ This module will only be shown in your prompt when one or more of the following
You'll also need the .NET Core SDK installed in order to use it correctly.
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` в настройках модуля.
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
### Опции
| Параметр | По умолчанию | Описание |
| ----------- | --------------------------------------- | -------------------------------------------------------- |
| ----------- | --------------------------------------- | ----------------------------------------------------------------- |
| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | Формат модуля. |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
| `symbol` | `"•NET "` | Символ перед отображением текущей версии dotnet. |
| `heuristic` | `true` | Использовать быстрое определение версии, для сохранения скорости. |
| `style` | `"bold blue"` | Стиль модуля. |
| `disabled` | `false` | Disables the `dotnet` module. |
| `disabled` | `false` | Отключает модуль `dotnet`. |
### Переменные
@ -754,18 +754,18 @@ heuristic = false
## Elixir
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `elixir` показывает установленную версию Elixir и Erlang/OTP. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий каталог содержит файл `mix.exs`.
### Опции
| Параметр | По умолчанию | Описание |
| ---------- | --------------------------------------------------------- | --------------------------------------------------------------- |
| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. |
| ---------- | --------------------------------------------------------- | ------------------------------------------------------------- |
| `symbol` | `"💧 "` | Символ, используемый перед отображением версии Elixir/Erlang. |
| `style` | `"bold purple"` | Стиль модуля. |
| `format` | `'via [$symbol$version \(OTP $otp_version\)]($style) '` | The format for the module elixir. |
| `disabled` | `false` | Disables the `elixir` module. |
| `disabled` | `false` | Отключает модуль `elixir`. |
### Переменные
@ -789,7 +789,7 @@ symbol = "🔮 "
## Elm
The `elm` module shows the currently installed version of Elm. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `elm` показывает установленную версию Elm. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий каталог содержит файл `elm.json`
- Текущий каталог содержит файл `elm-package.json`
@ -804,7 +804,7 @@ The `elm` module shows the currently installed version of Elm. Модуль бу
| `format` | `"via [$symbol$version]($style) "` | Формат модуля. |
| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. |
| `style` | `"cyan bold"` | Стиль модуля. |
| `disabled` | `false` | Disables the `elm` module. |
| `disabled` | `false` | Отключает модуль `elm`. |
### Переменные
@ -827,7 +827,7 @@ format = "via [ $version](cyan bold) "
## Переменная Окружения
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`
@ -835,12 +835,12 @@ The `env_var` module displays the current value of a selected environment variab
### Опции
| Параметр | По умолчанию | Описание |
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
| `symbol` | | The symbol used before displaying the variable value. |
| `variable` | | The environment variable to be displayed. |
| `default` | | The default value to be displayed when the selected variable is not defined. |
| ---------- | ------------------------------ | ---------------------------------------------------------------- |
| `symbol` | | Символ, используемый перед отображением значения переменной. |
| `variable` | | Отображаемая переменная окружения. |
| `default` | | Значение отображаемое, когда выбранная переменная не определена. |
| `format` | `"with [$env_value]($style) "` | Формат модуля. |
| `disabled` | `false` | Disables the `env_var` module. |
| `disabled` | `false` | Отключает модуль `env_var`. |
### Переменные
@ -959,20 +959,20 @@ asia-northeast1 = "an1"
## Ветвь Git
The `git_branch` module shows the active branch of the repo in your current directory.
Модуль `git_branch` показывает активную ветку репозитория в вашем текущей директории.
### Опции
| Параметр | По умолчанию | Описание |
| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
| -------------------- | -------------------------------- | --------------------------------------------------------------------------------------------- |
| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
| `format` | `"on [$symbol$branch]($style) "` | Формат модуля. Use `"$branch"` to refer to the current branch name. |
| `symbol` | `" "` | A format string representing the symbol of git branch. |
| `style` | `"bold purple"` | Стиль модуля. |
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. |
| `truncation_length` | `2^63 - 1` | Отрезает ветку git до X графемов. |
| `truncation_symbol` | `"…"` | Символ, используемый для обозначения усечения названия ветки. You can use `""` for no symbol. |
| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. |
| `disabled` | `false` | Disables the `git_branch` module. |
| `disabled` | `false` | Отключает модуль `git_branch`. |
### Переменные
@ -1004,14 +1004,14 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Опции
| Параметр | По умолчанию | Описание |
| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| -------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------- |
| `commit_hash_length` | `7` | Длина отображаемого хэша коммита git. |
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | Формат модуля. |
| `style` | `"bold green"` | Стиль модуля. |
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state |
| `only_detached` | `true` | Показывать хэш коммита git, только находясь в состоянии отделённой HEAD |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_symbol` | `"🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| `disabled` | `false` | Отключает модуль `git_commit`. |
### Переменные
@ -1034,7 +1034,7 @@ tag_symbol = "🔖 "
## Состояние 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), эта информация также будет показана.
### Опции
@ -1049,7 +1049,7 @@ The `git_state` module will show in directories which are part of a git reposito
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
| `style` | `"bold yellow"` | Стиль модуля. |
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | Формат модуля. |
| `disabled` | `false` | Disables the `git_state` module. |
| `disabled` | `false` | Отключает модуль `git_state`. |
### Переменные
@ -1074,14 +1074,14 @@ cherry_pick = "[🍒 PICKING](bold red)"
## Статус Git
The `git_status` module shows symbols representing the state of the repo in your current directory.
Модуль `git_status` отображает символы, представляющие состояние репозитория в вашей текущей директории.
### Опции
| Параметр | По умолчанию | Описание |
| ------------ | ----------------------------------------------- | ----------------------------------- |
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
| `conflicted` | `"="` | This branch has merge conflicts. |
| `conflicted` | `"="` | Эта ветка имеет конфликты слияния. |
| `ahead` | `"⇡"` | The format of `ahead` |
| `behind` | `"⇣"` | The format of `behind` |
| `diverged` | `"⇕"` | The format of `diverged` |
@ -1092,7 +1092,7 @@ The `git_status` module shows symbols representing the state of the repo in your
| `renamed` | `"»"` | The format of `renamed` |
| `deleted` | `"✘"` | The format of `deleted` |
| `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `git_status` module. |
| `disabled` | `false` | Отключает модуль `git_status`. |
### Переменные
@ -1123,8 +1123,8 @@ The following variables can be used in `diverged`:
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
| Переменная | Описание |
| ---------- | ------------------------ |
| `count` | Show the number of files |
| ---------- | -------------------------- |
| `count` | Показать количество файлов |
### Пример
@ -1144,7 +1144,7 @@ renamed = "👅"
deleted = "🗑"
```
Show ahead/behind count of the branch being tracked
Показывать счетчик впереди/позади для отслеживаемой ветки
```toml
# ~/.config/starship.toml
@ -1157,7 +1157,7 @@ behind = "⇣${count}"
## Golang
The `golang` module shows the currently installed version of Golang. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `golang` показывает установленную версию Golang. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий каталог содержит файл `go.mod`
- Текущий каталог содержит файл `go.sum`
@ -1175,7 +1175,7 @@ The `golang` module shows the currently installed version of Golang. Модул
| `format` | `"via [$symbol$version]($style) "` | Формат модуля. |
| `symbol` | `"🐹 "` | A format string representing the symbol of Go. |
| `style` | `"bold cyan"` | Стиль модуля. |
| `disabled` | `false` | Disables the `golang` module. |
| `disabled` | `false` | Отключает модуль `golang`. |
### Переменные
@ -1233,17 +1233,17 @@ format = "via [⎈ $version](bold white) "
## Имя хоста
The `hostname` module shows the system hostname.
Модуль `hostname` отображает имя системы (хоста).
### Опции
| Параметр | По умолчанию | Описание |
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `ssh_only` | `true` | Показывать имя хоста только при подключении к SSH-сессии. |
| `trim_at` | `"."` | Символы, по которую имя хоста будет сокращено после первого совпадения. `"."` остановится после первой точки. `""` отключит любое усечение |
| `format` | `"[$hostname]($style) in "` | Формат модуля. |
| `style` | `"bold dimmed green"` | Стиль модуля. |
| `disabled` | `false` | Disables the `hostname` module. |
| `disabled` | `false` | Отключает модуль `hostname`. |
### Переменные
@ -1268,7 +1268,7 @@ disabled = false
## Java
The `java` module shows the currently installed version of Java. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `java` показывает установленную версию Java. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
@ -1280,7 +1280,7 @@ The `java` module shows the currently installed version of Java. Модуль б
| `format` | `"via [${symbol}${version}]($style) "` | Формат модуля. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | Стиль модуля. |
| `disabled` | `false` | Disables the `java` module. |
| `disabled` | `false` | Отключает модуль `java`. |
### Переменные
@ -1303,17 +1303,17 @@ symbol = "🌟 "
## Задачи
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists.
Модуль `jobs` отображает текущее количество запущенных работ. Модуль будет показан только если работы выполняются в фоне. Модуль покажет количество запущенных задач при наличии более чем 1 задачи, или больше, чем значение конфигурации `threshold`, если оно существует.
### Опции
| Параметр | По умолчанию | Описание |
| ----------- | ----------------------------- | ------------------------------------------------ |
| `threshold` | `1` | Show number of jobs if exceeded. |
| `threshold` | `1` | Показывать количество задач, если превышено. |
| `format` | `"[$symbol$number]($style) "` | Формат модуля. |
| `symbol` | `"✦"` | A format string representing the number of jobs. |
| `style` | `"bold blue"` | Стиль модуля. |
| `disabled` | `false` | Disables the `jobs` module. |
| `disabled` | `false` | Отключает модуль `jobs`. |
### Переменные
@ -1420,7 +1420,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` в файле конфигурации.
:::
@ -1432,7 +1432,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Формат модуля. |
| `style` | `"cyan bold"` | Стиль модуля. |
| `context_aliases` | | Table of context aliases to display. |
| `disabled` | `true` | Disables the `kubernetes` module. |
| `disabled` | `true` | Отключает модуль `kubernetes`. |
### Переменные
@ -1457,15 +1457,15 @@ disabled = false
"dev.local.cluster.k8s" = "dev"
```
## Line Break
## Перевод Строки
The `line_break` module separates the prompt into two lines.
Модуль `line_break` разделяет командную строку на две строки.
### Опции
| Параметр | По умолчанию | Описание |
| ---------- | ------------ | ------------------------------------------------------------------ |
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
| ---------- | ------------ | ------------------------------------------------------------------------ |
| `disabled` | `false` | Отключает модуль `line_break`, отображая командную строку в одну строку. |
### Пример
@ -1513,27 +1513,27 @@ The `lua` module shows the currently installed version of Lua. Модуль бу
format = "via [🌕 $version](bold blue) "
```
## Memory Usage
## Использование памяти
The `memory_usage` module shows current system memory and swap usage.
Модуль `memory_usage` отображает текущую системную память и использование подкачки.
By default the swap usage is displayed if the total system swap is non-zero.
По умолчанию использование подкачки отображается, если общая сумма подкачки системы не равна нулю.
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
:::
### Опции
| Параметр | По умолчанию | Описание |
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
| ----------- | --------------------------------------------- | ------------------------------------------------------------------ |
| `threshold` | `75` | Скрывать использование памяти, если она не превышает этот процент. |
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | Формат модуля. |
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
| `symbol` | `"🐏"` | Символ, используемый перед отображением использования памяти. |
| `style` | `"bold dimmed white"` | Стиль модуля. |
| `disabled` | `true` | Disables the `memory_usage` module. |
| `disabled` | `true` | Отключает модуль `memory_usage`. |
### Переменные
@ -1560,20 +1560,20 @@ symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
## Ветка Mercurial
The `hg_branch` module shows the active branch of the repo in your current directory.
Модуль `hg_branch` показывает активную ветку репозитория в вашем текущем каталоге.
### Опции
| Параметр | По умолчанию | Описание |
| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- |
| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
| `symbol` | `" "` | Символ, используемый перед закладкой hg или именем ветки репозитория в текущем каталоге. |
| `style` | `"bold purple"` | Стиль модуля. |
| `format` | `"on [$symbol$branch]($style) "` | Формат модуля. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
| `disabled` | `true` | Disables the `hg_branch` module. |
| `truncation_length` | `2^63 - 1` | Обрезает имя ветки hg до X графемов |
| `truncation_symbol` | `"…"` | Символ, используемый для обозначения усечения названия ветки. |
| `disabled` | `true` | Отключает модуль `hg_branch`. |
### Переменные
@ -1609,7 +1609,7 @@ The `nim` module shows the currently installed version of Nim. Модуль бу
| Параметр | По умолчанию | Описание |
| ---------- | ---------------------------------- | ----------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module |
| `format` | `"via [$symbol$version]($style) "` | Формат модуля |
| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. |
| `style` | `"bold yellow"` | Стиль модуля. |
| `disabled` | `false` | Disables the `nim` module. |
@ -1636,7 +1636,7 @@ symbol = "🎣 "
## Nix-shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
Модуль `nix_shell` показывает окружение nix-shell. Модуль будет показываться внутри среды nix-shell.
### Опции
@ -1647,7 +1647,7 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
| `style` | `"bold blue"` | Стиль модуля. |
| `impure_msg` | `"impure"` | A format string shown when the shell is impure. |
| `pure_msg` | `"pure"` | A format string shown when the shell is pure. |
| `disabled` | `false` | Disables the `nix_shell` module. |
| `disabled` | `false` | Отключает модуль `nix_shell`. |
### Переменные
@ -1674,11 +1674,11 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `nodejs` показывает установленную версию NodeJS. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `package.json` file
- Текущий каталог содержит файл `package.json`
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory
- Текущий каталог содержит каталог `node_modules`
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
- The current directory contains a file with the `.ts` extension
@ -1689,7 +1689,7 @@ The `nodejs` module shows the currently installed version of NodeJS. Модул
| `format` | `"via [$symbol$version]($style) "` | Формат модуля. |
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
| `style` | `"bold green"` | Стиль модуля. |
| `disabled` | `false` | Disables the `nodejs` module. |
| `disabled` | `false` | Отключает модуль `nodejs`. |
| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. |
###  Variables
@ -1785,15 +1785,15 @@ style = "bold yellow"
symbol = "☁️ "
```
## Package Version
## Версия пакета
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
Модуль `package` отображается, когда текущий каталог является репозиторием для пакета и показывает его текущую версию. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
- **npm** The `npm` package version is extracted from the `package.json` present in the current directory
- **cargo** The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
- **poetry** The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
- **composer** The `composer` package version is extracted from the `composer.json` present in the current directory
- **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **npm** Версия пакета `npm` из файла `package.json` в текущем каталоге
- **cargo** Версия пакета `cargo` из файла `Cargo.toml` в текущем каталоге
- **poetry** Версия пакета `poetry` из файла `pyproject.toml` в текущем каталоге
- **composer** Версия пакета `composer` из `composer.json` в текущем каталоге
- **gradle** Версия пакета `gradle` извлечена из `build.gradle`
- **julia** - The package version is extracted from the `Project.toml` present
- **mix** - The `mix` package version is extracted from the `mix.exs` present
- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present
@ -1805,12 +1805,12 @@ The `package` module is shown when the current directory is the repository for a
### Опции
| Параметр | По умолчанию | Описание |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | Формат модуля. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| ----------------- | --------------------------------- | --------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | Формат модуля. |
| `symbol` | `"📦 "` | Символ, используемый перед отображением версии пакета. |
| `style` | `"bold 208"` | Стиль модуля. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | Disables the `package` module. |
| `disabled` | `false` | Отключает модуль `package`. |
### Переменные
@ -1869,20 +1869,20 @@ format = "via [🦪 $version]($style) "
## PHP
The `php` module shows the currently installed version of PHP. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `php` показывает установленную версию PHP. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `composer.json` file
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file
- Текущий каталог содержит файл `composer.json`
- Текущий каталог содержит файл `.php-version`
- Текущий каталог содержит файл `.php`
### Опции
| Параметр | По умолчанию | Описание |
| ---------- | ---------------------------------- | ----------------------------------------------------- |
| ---------- | ---------------------------------- | --------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | Формат модуля. |
| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
| `symbol` | `"🐘 "` | Символ, используемый перед отображением версии PHP. |
| `style` | `"147 bold"` | Стиль модуля. |
| `disabled` | `false` | Disables the `php` module. |
| `disabled` | `false` | Отключает модуль `php`. |
### Переменные
@ -1946,15 +1946,15 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- Текущий каталог содержит файл `.python-version`
- Текущий каталог содержит файл `requirements.txt`
- Текущий каталог содержит файл `pyproject.toml`
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- Текущий каталог содержит файл `Pipfile`
- Текущий каталог содержит файл `tox.ini`
- Текущий каталог содержит файл `setup.py`
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
- Виртуальная среда в данный момент активирована
### Опции
@ -1963,7 +1963,7 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | Формат модуля. |
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
| `style` | `"yellow bold"` | Стиль модуля. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_version_name` | `false` | Использовать pyenv для получения версии Python |
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
@ -2008,11 +2008,11 @@ python_binary = "python3"
## Ruby
The `ruby` module shows the currently installed version of Ruby. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `ruby` показывает установленную версию Ruby. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `Gemfile` file
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file
- Текущий каталог содержит файл `Gemfile`
- Текущий каталог содержит файл `.ruby-version`
- Текущий каталог содержит файл `.rb`
### Опции
@ -2021,7 +2021,7 @@ The `ruby` module shows the currently installed version of Ruby. Модуль б
| `format` | `"via [$symbol$version]($style) "` | Формат модуля. |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `ruby` module. |
| `disabled` | `false` | Отключает модуль `ruby`. |
### Переменные
@ -2044,10 +2044,10 @@ symbol = "🔺 "
## Rust
The `rust` module shows the currently installed version of Rust. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `rust` показывает установленную версию Rust. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `Cargo.toml` file
- The current directory contains a file with the `.rs` extension
- Текущий каталог содержит файл `Cargo.toml`
- Текущий каталог содержит файл с расширением `.rs`
### Опции
@ -2056,7 +2056,7 @@ The `rust` module shows the currently installed version of Rust. Модуль б
| `format` | `"via [$symbol$version]($style) "` | Формат модуля. |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `rust` module. |
| `disabled` | `false` | Отключает модуль `rust`. |
### Переменные
@ -2115,7 +2115,7 @@ threshold = 3
## Singularity
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
Модуль `singularity` показывает текущий образ singularity, если внутри контейнера и `$SINGULARITY_NAME` установлена.
### Опции
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
:::
### Опции
@ -2237,7 +2239,7 @@ format = "via [🏎 $version](red bold)"
The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `.terraform` folder
- Текущий каталог содержит папку `.terraform`
- Current directory contains a file with the `.tf` or `.hcl` extensions
### Опции
@ -2247,7 +2249,7 @@ The `terraform` module shows the currently selected terraform workspace and vers
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
| `symbol` | `"💠 "` | A format string shown before the terraform workspace. |
| `style` | `"bold 105"` | Стиль модуля. |
| `disabled` | `false` | Disables the `terraform` module. |
| `disabled` | `false` | Отключает модуль `terraform`. |
### Переменные
@ -2286,20 +2288,20 @@ 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` в файле конфигурации.
:::
### Опции
| Параметр | По умолчанию | Описание |
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| ----------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | `"at [$time]($style) "` | The format string for the module. |
| `use_12hr` | `false` | Enables 12 hour formatting |
| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `"bold yellow"` | The style for the module time |
| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 &lt; x &lt; 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
| `use_12hr` | `false` | Включить 12-часовое форматирование |
| `time_format` | см. ниже | [Строка формата chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), используемая для форматирования времени. |
| `style` | `"bold yellow"` | Стиль модуля времени |
| `utc_time_offset` | `"local"` | Устанавливает смещение UTC. Range from -24 &lt; x &lt; 24. Разрешает числам с плавающей точкой встраивать 30/45-минутное смещение временной зоны. |
| `disabled` | `true` | Отключает модуль `time`. |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
@ -2308,7 +2310,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| Переменная | Пример | Описание |
| ---------- | ---------- | ----------------------------------- |
| time | `13:08:10` | The current time. |
| время | `13:08:10` | The current time. |
| style\* | | Отражает значение параметра `style` |
\*: Эта переменная может использоваться только в качестве части строки style
@ -2326,26 +2328,30 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Username
## Имя пользователя
The `username` module shows active user's 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
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### Опции
| Параметр | По умолчанию | Описание |
| ------------- | ----------------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| ------------- | ----------------------- | ------------------------------------------------------- |
| `style_root` | `"bold red"` | Стиль, используемый для пользователя root. |
| `style_user` | `"bold yellow"` | Стиль, используемый для всех пользователей, кроме root. |
| `format` | `"[$user]($style) in "` | Формат модуля. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| `show_always` | `false` | Всегда показывать модуль `username`. |
| `disabled` | `false` | Отключает модуль `username`. |
### Переменные
@ -2437,7 +2443,7 @@ The order in which custom modules are shown can be individually set by including
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `описание` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |

View File

@ -125,6 +125,8 @@
### Начало работы
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Установите двоичный файл **starship**:
@ -138,17 +140,10 @@
```
##### Из источника на [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Установить через менеджер пакетов
##### С [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Добавить сценарий инициализации в конфигурационный файл вашей оболочки:
2. Добавить сценарий инициализации в конфигурационный файл вашей оболочки:
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -1805,8 +1805,8 @@ The `package` module is shown when the current directory is the repository for a
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| `style` | `"bold 208"` | The style for the module. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Options
@ -2335,7 +2337,11 @@ 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
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### Options

View File

@ -125,6 +125,8 @@
### Getting Started
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Install the **starship** binary:
@ -138,17 +140,10 @@
```
##### From source on [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Install via Package Manager
##### With [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. Add the init script to your shell's config file:
2. Add the init script to your shell's config file:
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -82,7 +82,7 @@ starship_precmd_user_func="set_win_title"
`<color>` 是颜色说明符(下面解释)。 `fg:<color>``<color>` 当前产生一样的效果,尽管未来可能会改变。 字符串中的单词顺序不影响显示结果。
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. 未来可能会将 `none` 与其它标识符一起使用视为一种错误。
颜色说明符可以是以下内容之一:

View File

@ -304,15 +304,15 @@ symbol = "🅰 "
### 配置项
| Option | 默认值 | 描述 |
| -------------------- | --------------------------------- | --------------------------------------------------- |
| -------------------- | --------------------------------- | ---------------- |
| `full_symbol` | `""` | 显示于电池充满时。 |
| `charging_symbol` | `""` | 显示于正在充电时。 |
| `discharging_symbol` | `""` | 显示于电池放电时。 |
| `unknown_symbol` | `""` | The symbol shown when the battery state is unknown. |
| `empty_symbol` | `""` | The symbol shown when the battery state is empty. |
| `unknown_symbol` | `""` | 显示于电池状态未知时 |
| `empty_symbol` | `""` | 显示于电池状态为空时 |
| `format` | `"[$symbol$percentage]($style) "` | 组件格式化模板。 |
| `display` | [见下文](#battery-display) | Display threshold and style for the module. |
| `disabled` | `false` | Disables the `battery` module. |
| `display` | [见下文](#battery-display) | 电量显示阈值和样式。 |
| `disabled` | `false` | 禁用 `battery` 组件。 |
### 示例
@ -328,7 +328,7 @@ discharging_symbol = "💀"
### Battery 组件的显示
The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. 默认设置如下:
`display` 选项用于定义电池指示器的显示阈值threshold和显示效果style。 如果 `display` 没有设置, 默认设置如下:
```toml
[[battery.display]]
@ -338,12 +338,12 @@ style = "bold red"
#### 配置项
The `display` option is an array of the following table.
`display` 字段的子字段如下:
| Option | 描述 |
| ----------- | ----------------------------------------------- |
| `threshold` | The upper bound for the display option. |
| `style` | The style used if the display option is in use. |
| ----------- | ---------------- |
| `threshold` | 当前显示设置的电量上限(见示例) |
| `style` | 若组件被显示,则使用此样式 |
#### 示例
@ -362,9 +362,9 @@ style = "bold yellow"
## Character
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
`character` 组件用于在您输入终端的文本旁显示一个字符(通常是一个箭头)。
The character will tell you whether the last command was successful or not. It can do this in two ways:
这个字符可以告诉您最后一个命令是否执行成功。 It can do this in two ways:
- changing color (`red`/`green`)
- changing shape (``/`✖`)
@ -379,7 +379,7 @@ By default it only changes color. If you also want to change it's shape take a l
| `success_symbol` | `"[](bold green)"` | The format string used before the text input if the previous command succeeded. |
| `error_symbol` | `"[](bold red)"` | The format string used before the text input if the previous command failed. |
| `vicmd_symbol` | `"[](bold green)"` | The format string used before the text input if the shell is in vim normal mode. |
| `disabled` | `false` | Disables the `character` module. |
| `disabled` | `false` | 禁用 `character` 组件。 |
### Variables
@ -446,25 +446,25 @@ The `cmake` module shows the currently installed version of CMake if any of the
## Command Duration
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
`cmd_duration` 组件显示上一个命令执行的时间。 此组件只在命令执行时间长于两秒时显示,或者当其 `min_time` 字段被设置时,按此值为执行时间的显示下限。
::: warning Do not hook the DEBUG trap in Bash
::: warning 不要在 Bash 里捕获 DEBUG 信号
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
如果您正在 `bash` 上使用 Starship在运行 `eval $(starship)` 后,不要捕获 `DEBUG` 信号,否则此组件**将会**坏掉。
:::
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
需要在自动每一条命令前执行某些操作的 Bash 用户可以使用 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只需要在执行 `eval $(starship init $0)` 前简单地定义 `preexec_functions``precmd_functions` 两个列表,就可以照常运行了。
### 配置项
| Option | 默认值 | 描述 |
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| -------------------- | ----------------------------- | ----------------------------------------------------- |
| `min_time` | `2_000` | 显示此组件所需的最短执行时长(单位:毫秒)。 |
| `show_milliseconds` | `false` | 除了秒数外在执行时长中额外显示毫秒。 |
| `format` | `"took [$duration]($style) "` | 组件格式化模板。 |
| `style` | `"bold yellow"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `disabled` | `false` | 禁用 `cmd_duration` 组件。 |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
@ -495,24 +495,24 @@ format = "underwent [$duration](bold yellow)"
## Conda
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
`conda` 组件在 `$CONDA_DEFAULT_ENV` 被设置时显示当前 conda 环境。
::: tip
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
此组件没有禁用 conda 自带的提示符修改,您可能需要执行 `conda config --set changeps1 False`
:::
### 配置项
| Option | 默认值 | 描述 |
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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` | `"🅒 "` | The symbol used before the environment name. |
| ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | 如果这个 conda 环境是通过 `conda create -p [path]` 创建的,环境路径的目录深度应该被截断到此数量。 `0` 表示不用截断。 另请参阅 [`directory`](#directory) 组件。 |
| `symbol` | `"🅒 "` | 在环境名之前显示的符号。 |
| `style` | `"bold green"` | 此组件的样式。 |
| `format` | `"via [$symbol$environment]($style) "` | 组件格式化模板。 |
| `ignore_base` | `true` | Ignores `base` environment when activated. |
| `disabled` | `false` | Disables the `conda` module. |
| `disabled` | `false` | 禁用 `conda` 组件。 |
### Variables
@ -606,33 +606,33 @@ format = "via [🔰 $version](bold red) "
## Directory
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
`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` 是 git 仓库根目录fish 风格相关选项设置为 `1`。 您将会看到 `~/D/N/nixpkgs/pkgs`,而在设置 fish 风格之前,当前路径将显示成 `nixpkgs/pkgs`
### 配置项
| Option | 默认值 | 描述 |
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- |
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
| ------------------- | -------------------------------------------------- | ----------------------------------------------------- |
| `truncation_length` | `3` | 当前目录路径被截断后最多保留的父目录数量。 |
| `truncate_to_repo` | `true` | 是否只截断到您当前处于的 git 仓库根目录下。 |
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | 组件格式化模板。 |
| `style` | `"bold cyan"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `directory` module. |
| `disabled` | `false` | 禁用 `directory` 组件。 |
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
<details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
<summary>此组件有几个高级配置选项来控制当前目录路径的显示方式。</summary>
| Advanced Option | 默认值 | 描述 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| --------------------------- | ------ | ------------------------------------------------ |
| `substitutions` | | A table of substitutions to be made to the path. |
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. |
| `fish_style_pwd_dir_length` | `0` | 使用 fish shell 当前目录路径逻辑时每个省略目录名使用的字符数。 |
| `use_logical_path` | `true` | 显示由 shell 提供的逻辑路径(`PWD`)而不是 OS 提供的路径。 |
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD.
@ -700,7 +700,7 @@ format = "via [🐋 $context](blue bold)"
## 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 or more of the following files are present in the current directory:
@ -716,19 +716,19 @@ This module will only be shown in your prompt when one or more of the following
You'll also need the .NET Core SDK installed in order to use it correctly.
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` 来禁用该机制。
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
### 配置项
| Option | 默认值 | 描述 |
| ----------- | --------------------------------------- | -------------------------------------------------------- |
| ----------- | --------------------------------------- | ------------------------------ |
| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | 组件格式化模板。 |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
| `symbol` | `"•NET "` | 这个字段的内容会显示在当前 .NET 版本之前。 |
| `heuristic` | `true` | 使用更快的版本探测机制以保证 starship 的运行速度。 |
| `style` | `"bold blue"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `dotnet` module. |
| `disabled` | `false` | 禁用 `dotnet` 组件。 |
### Variables
@ -827,7 +827,7 @@ format = "via [ $version](cyan bold) "
## Environment Variable
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met:
`env_var` 组件显示选定的环境变量的当前值。 此组件只有满足以下条件之一时才会被显示:
- 设置的 `variable` 是一个已存在的环境变量
- 未定义 `variable`,但定义了 `default`
@ -835,12 +835,12 @@ The `env_var` module displays the current value of a selected environment variab
### 配置项
| Option | 默认值 | 描述 |
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
| `symbol` | | The symbol used before displaying the variable value. |
| `variable` | | The environment variable to be displayed. |
| `default` | | The default value to be displayed when the selected variable is not defined. |
| ---------- | ------------------------------ | ------------------- |
| `symbol` | | 这个字段的内容会显示在环境变量值之前。 |
| `variable` | | 要显示的环境变量。 |
| `default` | | 所选变量未定义时显示的默认值。 |
| `format` | `"with [$env_value]($style) "` | 组件格式化模板。 |
| `disabled` | `false` | Disables the `env_var` module. |
| `disabled` | `false` | 禁用 `env_var` 组件。 |
### Variables
@ -959,20 +959,20 @@ asia-northeast1 = "an1"
## Git Branch
The `git_branch` module shows the active branch of the repo in your current directory.
`git_branch` 组件显示当前目录的 git 仓库的活动分支。
### 配置项
| Option | 默认值 | 描述 |
| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
| -------------------- | -------------------------------- | ------------------------------------------------------------------------------------ |
| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
| `format` | `"on [$symbol$branch]($style) "` | 组件格式化模板。 Use `"$branch"` to refer to the current branch name. |
| `symbol` | `" "` | A format string representing the symbol of git branch. |
| `style` | `"bold purple"` | 此组件的样式。 |
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. |
| `truncation_symbol` | `"…"` | 此字段的内容用来表示分支名称被截断。 You can use `""` for no symbol. |
| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. |
| `disabled` | `false` | Disables the `git_branch` module. |
| `disabled` | `false` | 禁用 `git_branch` 组件。 |
### Variables
@ -1005,13 +1005,13 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
| Option | 默认值 | 描述 |
| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `commit_hash_length` | `7` | 显示的 git 提交哈希值的长度。 |
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | 组件格式化模板。 |
| `style` | `"bold green"` | 此组件的样式。 |
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_symbol` | `"🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| `disabled` | `false` | 禁用 `git_commit` 组件。 |
### Variables
@ -1034,7 +1034,7 @@ tag_symbol = "🔖 "
## 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如果存在则也会被显示。
### 配置项
@ -1049,7 +1049,7 @@ The `git_state` module will show in directories which are part of a git reposito
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
| `style` | `"bold yellow"` | 此组件的样式。 |
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | 组件格式化模板。 |
| `disabled` | `false` | Disables the `git_state` module. |
| `disabled` | `false` | 禁用 `git_state` 模块 |
### Variables
@ -1074,14 +1074,14 @@ cherry_pick = "[🍒 PICKING](bold red)"
## Git Status
The `git_status` module shows symbols representing the state of the repo in your current directory.
`git_status`组件通过相应的符号显示您当前目录中 git 仓库的状态。
### 配置项
| Option | 默认值 | 描述 |
| ------------ | ----------------------------------------------- | ----------------------------------- |
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
| `conflicted` | `"="` | This branch has merge conflicts. |
| `conflicted` | `"="` | 这个分支有合并冲突。 |
| `ahead` | `"⇡"` | The format of `ahead` |
| `behind` | `"⇣"` | The format of `behind` |
| `diverged` | `"⇕"` | The format of `diverged` |
@ -1092,7 +1092,7 @@ The `git_status` module shows symbols representing the state of the repo in your
| `renamed` | `"»"` | The format of `renamed` |
| `deleted` | `"✘"` | The format of `deleted` |
| `style` | `"bold red"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `git_status` module. |
| `disabled` | `false` | 禁用 `git_status` 组件。 |
### Variables
@ -1123,8 +1123,8 @@ The following variables can be used in `diverged`:
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
| 字段 | 描述 |
| ------- | ------------------------ |
| `count` | Show the number of files |
| ------- | --------- |
| `count` | 显示相应的文件数量 |
### 示例
@ -1157,7 +1157,7 @@ behind = "⇣${count}"
## Golang
The `golang` module shows the currently installed version of Golang. 此组件将在符合以下任意条件之一时显示:
`golang` 组件显示当前安装的 Golang 版本。 此组件将在符合以下任意条件之一时显示:
- 当前目录包含 `go.mod` 文件
- 当前目录包含 `go.sum` 文件
@ -1175,7 +1175,7 @@ The `golang` module shows the currently installed version of Golang. 此组件
| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 |
| `symbol` | `"🐹 "` | A format string representing the symbol of Go. |
| `style` | `"bold cyan"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `golang` module. |
| `disabled` | `false` | 禁用 `golang` 组件。 |
### Variables
@ -1233,17 +1233,17 @@ format = "via [⎈ $version](bold white) "
## Hostname
The `hostname` module shows the system hostname.
`hostname` 组件显示系统主机名。
### 配置项
| Option | 默认值 | 描述 |
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
| ---------- | --------------------------- | ------------------------------------------------------------------ |
| `ssh_only` | `true` | 仅在连接到 SSH 会话时显示主机名。 |
| `trim_at` | `"."` | 当主机名过长被截断时,会截断成第一次匹配该字符串之前的主机名。 `"."` 会让主机名截断到第一个点处。 `""` 会禁用任何截断。 |
| `format` | `"[$hostname]($style) in "` | 组件格式化模板。 |
| `style` | `"bold dimmed green"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `hostname` module. |
| `disabled` | `false` | 禁用 `hostname` 组件。 |
### Variables
@ -1268,7 +1268,7 @@ disabled = false
## Java
The `java` module shows the currently installed version of Java. 此组件将在符合以下任意条件之一时显示:
`java` 组件显示当前安装的 Java 版本。 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
@ -1280,7 +1280,7 @@ The `java` module shows the currently installed version of Java. 此组件将在
| `format` | `"via [${symbol}${version}]($style) "` | 组件格式化模板。 |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `java` module. |
| `disabled` | `false` | 禁用 `java` 组件。 |
### Variables
@ -1303,17 +1303,17 @@ symbol = "🌟 "
## Jobs
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists.
`jobs` 组件显示当前正在运行的任务数量。 仅当有后台任务运行时,此组件才会显示。 如果有超过 1 个作业,模块将显示正在运行的作业数量,如果配置了 `threshold` 字段,则使用它作为显示作业数量的下限。
### 配置项
| Option | 默认值 | 描述 |
| ----------- | ----------------------------- | ------------------------------------------------ |
| `threshold` | `1` | Show number of jobs if exceeded. |
| `threshold` | `1` | 如果超过此字段的值,显示任务数量。 |
| `format` | `"[$symbol$number]($style) "` | 组件格式化模板。 |
| `symbol` | `"✦"` | A format string representing the number of jobs. |
| `style` | `"bold blue"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `jobs` module. |
| `disabled` | `false` | 禁用 `jobs` 组件。 |
### Variables
@ -1420,7 +1420,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.
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`
:::
@ -1459,13 +1459,13 @@ disabled = false
## Line Break
The `line_break` module separates the prompt into two lines.
`line_break` 组件将提示分隔为两行。
### 配置项
| Option | 默认值 | 描述 |
| ---------- | ------- | ------------------------------------------------------------------ |
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
| ---------- | ------- | --------------------------- |
| `disabled` | `false` | 禁用 `line_break` 组件,使提示成为单行。 |
### 示例
@ -1515,25 +1515,25 @@ format = "via [🌕 $version](bold blue) "
## Memory Usage
The `memory_usage` module shows current system memory and swap usage.
`memory_usage` 组件显示当前系统内存和交换区使用情况。
By default the swap usage is displayed if the total system swap is non-zero.
默认情况下,如果系统交换区使用不为 0则会显示交换区使用情况。
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`
:::
### 配置项
| Option | 默认值 | 描述 |
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
| ----------- | --------------------------------------------- | ---------------------- |
| `threshold` | `75` | 隐藏内存使用情况,除非它超过这个百分比。 |
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | 组件格式化模板。 |
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
| `symbol` | `"🐏"` | 这个字段的内容会显示在当前内存使用情况之前。 |
| `style` | `"bold dimmed white"` | 此组件的样式。 |
| `disabled` | `true` | Disables the `memory_usage` module. |
| `disabled` | `true` | 禁用 `memory_usage` 模块 |
### Variables
@ -1562,18 +1562,18 @@ style = "bold dimmed green"
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
`hg_branch` 组件显示当前目录的 hg 仓库的活动分支。
### 配置项
| Option | 默认值 | 描述 |
| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- |
| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
| ------------------- | -------------------------------- | ------------------------------- |
| `symbol` | `" "` | 该字段的内容显示于当前仓库的 hg 书签或活动分支名之前。 |
| `style` | `"bold purple"` | 此组件的样式。 |
| `format` | `"on [$symbol$branch]($style) "` | 组件格式化模板。 |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
| `disabled` | `true` | Disables the `hg_branch` module. |
| `truncation_length` | `2^63 - 1` | 将显示的 hg 分支名截断到该数量的字素graphemes |
| `truncation_symbol` | `"…"` | 此字段的内容用来表示分支名称被截断。 |
| `disabled` | `true` | 禁用 `hg_branch` 组件。 |
### Variables
@ -1636,7 +1636,7 @@ symbol = "🎣 "
## Nix-shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
`nix_shell` 组件显示 nix-shell 环境。 当处于一个 nix-shell 环境中时,此组件会被显示。
### 配置项
@ -1647,7 +1647,7 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
| `style` | `"bold blue"` | 此组件的样式。 |
| `impure_msg` | `"impure"` | A format string shown when the shell is impure. |
| `pure_msg` | `"pure"` | A format string shown when the shell is pure. |
| `disabled` | `false` | Disables the `nix_shell` module. |
| `disabled` | `false` | 禁用 `nix_shell` 组件。 |
### Variables
@ -1674,11 +1674,11 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. 此组件将在符合以下任意条件之一时显示:
`nodejs` 组件显示当前安装的 NodeJS 版本。 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `package.json` file
- 当前目录包含 `package.json` 文件
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory
- 当前目录包含 `node_modules` 目录
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
- The current directory contains a file with the `.ts` extension
@ -1689,7 +1689,7 @@ The `nodejs` module shows the currently installed version of NodeJS. 此组件
| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 |
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
| `style` | `"bold green"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `nodejs` module. |
| `disabled` | `false` | 禁用 `nodejs` 组件。 |
| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. |
###  Variables
@ -1787,12 +1787,12 @@ symbol = "☁️ "
## Package Version
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
当前目录是软件包的代码仓库时,将显示 `package` 组件,并显示软件包当前版本。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
- **npm** The `npm` package version is extracted from the `package.json` present in the current directory
- **cargo** The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
- **poetry** The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
- **composer** The `composer` package version is extracted from the `composer.json` present in the current directory
- **npm** —— `npm` 软件包版本从当前目录下的 `package.json` 中得到
- **cargo** —— `cargo` 软件包的版本从当前目录下的 `Cargo.toml` 中得到
- **poetry** —— `poetry` 软件包版本从当前目录下的 `pyproject.toml` 中得到
- **composer** —— `composer` 软件包版本从当前目录下的 `composer.json` 中得到
- **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
- **mix** - The `mix` package version is extracted from the `mix.exs` present
@ -1805,12 +1805,12 @@ The `package` module is shown when the current directory is the repository for a
### 配置项
| Option | 默认值 | 描述 |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| ----------------- | --------------------------------- | --------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | 组件格式化模板。 |
| `symbol` | `"📦 "` | 这个字段的内容会显示在当前软件包版本之前。 |
| `style` | `"bold 208"` | 此组件的样式。 |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | Disables the `package` module. |
| `disabled` | `false` | 禁用 `package` 组件。 |
### Variables
@ -1869,20 +1869,20 @@ format = "via [🦪 $version]($style) "
## PHP
The `php` module shows the currently installed version of PHP. 此组件将在符合以下任意条件之一时显示:
`php` 组件显示当前安装的 PHP 版本。 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `composer.json` file
- 当前目录包含一个 `composer.json` 文件
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file
- 当前目录包含一个 `.php` 文件
### 配置项
| Option | 默认值 | 描述 |
| ---------- | ---------------------------------- | ----------------------------------------------------- |
| ---------- | ---------------------------------- | ----------------------- |
| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 |
| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
| `symbol` | `"🐘 "` | 这个字段的内容会显示在当前 PHP 版本之前。 |
| `style` | `"147 bold"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `php` module. |
| `disabled` | `false` | 禁用 `php` 组件。 |
### Variables
@ -1940,34 +1940,34 @@ format = "via [$symbol$version](bold white)"
## Python
The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated.
`python` 组件组件展示已经安装了的Python版本以及如果虚拟环境被激活则会显示当前Python虚拟环境
If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`.
如果`pyenv_version_name`被设置为`true`, 本组件将会展示pyenv版本名。 否则则显示通过`python --version`获得的版本号
此组件将在符合以下任意条件之一时显示:
- The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
- 当前目录包含 `.python-version` 文件
- 当前目录包含 `requirements.txt` 文件
- 当前目录包含 `pyproject.toml` 文件
- 当前目录包含一个扩展名名为`.py`的文件(以及`scan_for_pyfile`为true)
- 当前目录包含 `Pipfile` 文件
- 当前目录包含一个 `tox.ini` 文件
- 当前目录包含一个 `setup.py` 文件
- 当前目录包含一个名为`__init__.py`的文件
- 当前处于一个活跃的 python 虚拟环境中
### 配置项
| Option | 默认值 | 描述 |
| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | 组件格式化模板。 |
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
| `symbol` | `"🐍 "` | 用于表示Python的格式化字符串。 |
| `style` | `"yellow bold"` | 此组件的样式。 |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 |
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `scan_for_pyfiles` | `true` | 如果设置为false, 在本目录下的Python文件将不会在本组件中显示。 |
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
| `disabled` | `false` | Disables the `python` module. |
| `disabled` | `false` | 禁用 `python` 组件。 |
::: tip
@ -1981,11 +1981,11 @@ The default values and order for `python_binary` was chosen to first identify th
| 字段 | 示例 | 描述 |
| ------------ | --------------- | ------------------------------------------ |
| version | `"v3.8.1"` | The version of `python` |
| version | `"v3.8.1"` | `python`版本 |
| symbol | `"🐍 "` | `symbol`对应值 |
| style | `"yellow bold"` | `style`对应值 |
| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` |
| virtualenv | `"venv"` | The current `virtualenv` name |
| virtualenv | `"venv"` | 当前`virtualenv`名称 |
### 示例
@ -2008,11 +2008,11 @@ python_binary = "python3"
## Ruby
The `ruby` module shows the currently installed version of Ruby. 此组件将在符合以下任意条件之一时显示:
`ruby` 组件显示当前安装的 Ruby 版本。 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `Gemfile` file
- 当前目录包含 `Gemfile` 文件
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file
- 当前目录包含 `.rb` 文件
### 配置项
@ -2021,7 +2021,7 @@ The `ruby` module shows the currently installed version of Ruby. 此组件将在
| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `ruby` module. |
| `disabled` | `false` | 禁用 `ruby` 组件。 |
### Variables
@ -2044,10 +2044,10 @@ symbol = "🔺 "
## Rust
The `rust` module shows the currently installed version of Rust. 此组件将在符合以下任意条件之一时显示:
`rust` 组件显示当前安装的 Rust 版本。 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `Cargo.toml` file
- The current directory contains a file with the `.rs` extension
- 当前目录包含 `Cargo.toml` 文件
- 当前目录包含一个使用 `.rs` 扩展名的文件
### 配置项
@ -2056,7 +2056,7 @@ The `rust` module shows the currently installed version of Rust. 此组件将在
| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `rust` module. |
| `disabled` | `false` | 禁用 `rust` 组件。 |
### Variables
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`
:::
### 配置项
@ -2237,7 +2239,7 @@ format = "via [🏎 $version](red bold)"
The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `.terraform` folder
- 当前目录包含 `.terraform` 目录
- Current directory contains a file with the `.tf` or `.hcl` extensions
### 配置项
@ -2247,7 +2249,7 @@ The `terraform` module shows the currently selected terraform workspace and vers
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
| `symbol` | `"💠 "` | A format string shown before the terraform workspace. |
| `style` | `"bold 105"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `terraform` module. |
| `disabled` | `false` | 禁用 `terraform` 组件。 |
### Variables
@ -2286,20 +2288,20 @@ 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.
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`
:::
### 配置项
| Option | 默认值 | 描述 |
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- |
| `format` | `"at [$time]($style) "` | The format string for the module. |
| `use_12hr` | `false` | Enables 12 hour formatting |
| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `"bold yellow"` | The style for the module time |
| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 &lt; x &lt; 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
| `use_12hr` | `false` | 启用 12 小时格式 |
| `time_format` | 见下文解释 | 用来格式化时间显示的 [chrono 格式字符串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) |
| `style` | `"bold yellow"` | 显示时间的样式。 |
| `utc_time_offset` | `"local"` | 设置所用 UTC 偏移量。 Range from -24 &lt; x &lt; 24. 允许使用浮点数来得到 30/45 分钟的时区偏移。 |
| `disabled` | `true` | 禁用 `time` 组件。 |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
@ -2330,22 +2332,26 @@ time_range = "10:00:00-14:00:00"
The `username` module shows active user's 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
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### 配置项
| Option | 默认值 | 描述 |
| ------------- | ----------------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| ------------- | ----------------------- | ------------------- |
| `style_root` | `"bold red"` | 当前用户为 root 时使用的样式。 |
| `style_user` | `"bold yellow"` | 非 root 用户使用的样式。 |
| `format` | `"[$user]($style) in "` | 组件格式化模板。 |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| `show_always` | `false` | 总是显示 `username` 组件。 |
| `disabled` | `false` | 禁用 `username` 组件。 |
### Variables
@ -2437,7 +2443,7 @@ The order in which custom modules are shown can be individually set by including
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `描述` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |

View File

@ -125,6 +125,8 @@
### 开始安装
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. 安装 **starship** 二进制文件:
@ -138,17 +140,10 @@
```
##### 直接从 [crates.io](https://crates.io/) 获取源代码编译:
```sh
cargo install starship
```
#### 通过软件包管理器安装
##### 使用 [Homebrew](https://brew.sh/)
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. 将初始化脚本添加到您的 shell 的配置文件:
2. 将初始化脚本添加到您的 shell 的配置文件:
#### Bash
@ -218,7 +213,7 @@
## 🤝 贡献
我们一直在寻找贡献者!你都可以参与贡献 **不论你的技能如何**。 如果您希望快速为项目作出贡献,请尝试解决 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)。
我们一直在寻找贡献者!你都可以参与贡献 ** 不论你的技能如何 **。 如果您希望快速为项目作出贡献,请尝试解决 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)。
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```

View File

@ -82,7 +82,7 @@ starship_precmd_user_func="set_win_title"
其中 `<color>` 是指定顏色用的(下面解釋)。 `fg:<color>``<color>` 目前做一樣的事情,不過未來可能會改變。 單詞在字串中的順序不重要。
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. 未來可能會將 `none` 與其他符號一起使用的情形視為是一種錯誤。
一個顏色指定符號可以是下列其中之一:

View File

@ -304,15 +304,15 @@ symbol = "🅰 "
### 選項
| Option | 預設 | 說明 |
| -------------------- | --------------------------------- | --------------------------------------------------- |
| -------------------- | --------------------------------- | -------------------------- |
| `full_symbol` | `""` | 當電池充飽時顯示的符號。 |
| `charging_symbol` | `""` | 當電池正在充電時顯示的符號。 |
| `discharging_symbol` | `""` | 當電池正在放電時顯示的符號。 |
| `unknown_symbol` | `""` | The symbol shown when the battery state is unknown. |
| `empty_symbol` | `""` | The symbol shown when the battery state is empty. |
| `unknown_symbol` | `""` | 當電池狀態不明時顯示的符號。 |
| `empty_symbol` | `""` | 當電池沒電時顯示的符號。 |
| `format` | `"[$symbol$percentage]($style) "` | The format for the module. |
| `display` | [連結](#battery-display) | Display threshold and style for the module. |
| `disabled` | `false` | Disables the `battery` module. |
| `display` | [連結](#battery-display) | 顯示的門檻與模組的風格。 |
| `disabled` | `false` | 停用 `battery` 模組。 |
### 範例
@ -328,7 +328,7 @@ discharging_symbol = "💀"
### 電池顯示
The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. 預設如下:
`display` 設定是用來定義甚麼時候電池指示會顯示出來 (threshold),以及它長甚麼樣子 (style)。 如果沒有提供 `display` 預設如下:
```toml
[[battery.display]]
@ -338,12 +338,12 @@ style = "bold red"
#### 選項
The `display` option is an array of the following table.
`display` 選項是一個下列表格的陣列。
| Option | 說明 |
| ----------- | ----------------------------------------------- |
| `threshold` | The upper bound for the display option. |
| `style` | The style used if the display option is in use. |
| ----------- | ----------- |
| `threshold` | 顯示選項的上界。 |
| `style` | 顯示選項使用時的風格。 |
#### 範例
@ -362,9 +362,9 @@ style = "bold yellow"
## 字元
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
`character` 模組在你的文字輸入處旁顯示一個字元 (通常是箭頭)。
The character will tell you whether the last command was successful or not. It can do this in two ways:
這個字元會告訴你最後的指令是成功還是失敗。 It can do this in two ways:
- changing color (`red`/`green`)
- changing shape (``/`✖`)
@ -379,7 +379,7 @@ By default it only changes color. If you also want to change it's shape take a l
| `success_symbol` | `"[](bold green)"` | The format string used before the text input if the previous command succeeded. |
| `error_symbol` | `"[](bold red)"` | The format string used before the text input if the previous command failed. |
| `vicmd_symbol` | `"[](bold green)"` | The format string used before the text input if the shell is in vim normal mode. |
| `disabled` | `false` | Disables the `character` module. |
| `disabled` | `false` | 停用 `character` 模組。 |
### Variables
@ -446,25 +446,25 @@ The `cmake` module shows the currently installed version of CMake if any of the
## 指令持續時間
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
`cmd_duration` 模組顯示最後一個指令執行所花費的時間。 這個模組只會在指令花費超過兩秒或是有設定 `min_time` 時,超過設定值時出現。
::: warning Do not hook the DEBUG trap in Bash
::: warning 不要在 Bash 中設置 DEBUG trap
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
如果你在 `bash` 中使用 Starship不要在執行 `eval $(starship init $0)` 之後設置 `DEBUG` trap不然這個模組**會**壞掉。
:::
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
想使用類似 preexec 功能的 Bash 使用者可以 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只要在 `eval $(starship init $0)` 之前簡單地定義 `preexec_functions``precmd_functions` 兩個陣列,然後就可以照常進行。
### 選項
| Option | 預設 | 說明 |
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
| -------------------- | ----------------------------- | ----------------------------------------------------- |
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
| `show_milliseconds` | `false` | 顯示時間除了以秒為單位外,亦以毫秒顯示 |
| `format` | `"took [$duration]($style) "` | The format for the module. |
| `style` | `"bold yellow"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `cmd_duration` module. |
| `disabled` | `false` | 停用 `cmd_duration` 模組。 |
| `show_notifications` | `false` | Show desktop notifications when command completes. |
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
@ -495,7 +495,7 @@ format = "underwent [$duration](bold yellow)"
## Conda
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
如果有設定 `$CONDA_DEFAULT_ENV` 時,`conda` 模組顯示現在 conda 的環境。
::: tip
@ -506,13 +506,13 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
### 選項
| Option | 預設 | 說明 |
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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` | `"🅒 "` | The symbol used before the environment name. |
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | 如果環境變數由所`conda create -p [path]`產生時,環境變數的資料夾需要截斷的數目。 `0` 表示不截斷 也請參考 [`directory`](#directory)模組 |
| `symbol` | `"🅒 "` | 環境名稱前使用的符號。 |
| `style` | `"bold green"` | 這個模組的風格。 |
| `format` | `"via [$symbol$environment]($style) "` | The format for the module. |
| `ignore_base` | `true` | Ignores `base` environment when activated. |
| `disabled` | `false` | Disables the `conda` module. |
| `disabled` | `false` | 停用 `conda` 模組。 |
### Variables
@ -535,7 +535,7 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
The `crystal` module shows the currently installed version of Crystal. 這個模組在下列其中一個條件達成時顯示:
`crystal` 模組顯示現在所安裝的Crystal版本 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中含有一個 `shard.yml` 檔案
- 現在資料夾中含有一個`.cr`檔案
@ -606,33 +606,33 @@ format = "via [🔰 $version](bold red) "
## 資料夾
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`
### 選項
| Option | 預設 | 說明 |
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- |
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
| ------------------- | -------------------------------------------------- | ----------------------------------------------------- |
| `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 |
| `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 |
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. |
| `style` | `"bold cyan"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `directory` module. |
| `disabled` | `false` | 停用 `directory` 模組。 |
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
<details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
<summary>這個模組有些進階設定選項可以控制顯示資料夾。</summary>
| Advanced Option | 預設 | 說明 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| --------------------------- | ------ | ------------------------------------------------ |
| `substitutions` | | A table of substitutions to be made to the path. |
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. |
| `fish_style_pwd_dir_length` | `0` | 當使用 fish shell 的 pwd 路徑邏輯時使用的字元數量。 |
| `use_logical_path` | `true` | 顯示 shell (`PWD`) 提供的邏輯路徑,而不是 OS 的路徑。 |
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD.
@ -700,7 +700,7 @@ format = "via [🐋 $context](blue bold)"
## 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 or more of the following files are present in the current directory:
@ -716,19 +716,19 @@ This module will only be shown in your prompt when one or more of the following
You'll also need the .NET Core SDK installed in order to use it correctly.
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` 選項來停用這個功能。
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
### 選項
| Option | 預設 | 說明 |
| ----------- | --------------------------------------- | -------------------------------------------------------- |
| ----------- | --------------------------------------- | ---------------------------- |
| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
| `symbol` | `"•NET "` | 在顯示 dotnet 版本之前用的符號。 |
| `heuristic` | `true` | 使用更快速的版本偵測法來保持 starship 的速度。 |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `dotnet` module. |
| `disabled` | `false` | 停用 `dotnet` 模組。 |
### Variables
@ -827,7 +827,7 @@ format = "via [ $version](cyan bold) "
## 環境變數
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` 選項。
@ -835,12 +835,12 @@ The `env_var` module displays the current value of a selected environment variab
### 選項
| Option | 預設 | 說明 |
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
| `symbol` | | The symbol used before displaying the variable value. |
| `variable` | | The environment variable to be displayed. |
| `default` | | The default value to be displayed when the selected variable is not defined. |
| ---------- | ------------------------------ | -------------------------- |
| `symbol` | | 顯示在變數數值之前的符號。 |
| `variable` | | 要顯示的環境變數。 |
| `default` | | 在選擇的變數值沒有定義時,顯示的預設值。 |
| `format` | `"with [$env_value]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `env_var` module. |
| `disabled` | `false` | 停用 `env_var` 模組。 |
### Variables
@ -959,20 +959,20 @@ asia-northeast1 = "an1"
## Git 分支
The `git_branch` module shows the active branch of the repo in your current directory.
`git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
### 選項
| Option | 預設 | 說明 |
| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
| -------------------- | -------------------------------- | ------------------------------------------------------------------------------------ |
| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
| `format` | `"on [$symbol$branch]($style) "` | The format for the module. Use `"$branch"` to refer to the current branch name. |
| `symbol` | `" "` | A format string representing the symbol of git branch. |
| `style` | `"bold purple"` | 這個模組的風格。 |
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. |
| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 You can use `""` for no symbol. |
| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. |
| `disabled` | `false` | Disables the `git_branch` module. |
| `disabled` | `false` | 停用 `git_branch` 模組。 |
### Variables
@ -1034,7 +1034,7 @@ tag_symbol = "🔖 "
## 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),也會一併顯示出來。
### 選項
@ -1049,7 +1049,7 @@ The `git_state` module will show in directories which are part of a git reposito
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
| `style` | `"bold yellow"` | 這個模組的風格。 |
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. |
| `disabled` | `false` | Disables the `git_state` module. |
| `disabled` | `false` | 停用 `git_state` 模組。 |
### Variables
@ -1074,14 +1074,14 @@ cherry_pick = "[🍒 PICKING](bold red)"
## Git Status
The `git_status` module shows symbols representing the state of the repo in your current directory.
`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
### 選項
| Option | 預設 | 說明 |
| ------------ | ----------------------------------------------- | ----------------------------------- |
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
| `conflicted` | `"="` | This branch has merge conflicts. |
| `conflicted` | `"="` | 這個分支有合併衝突。 |
| `ahead` | `"⇡"` | The format of `ahead` |
| `behind` | `"⇣"` | The format of `behind` |
| `diverged` | `"⇕"` | The format of `diverged` |
@ -1092,7 +1092,7 @@ The `git_status` module shows symbols representing the state of the repo in your
| `renamed` | `"»"` | The format of `renamed` |
| `deleted` | `"✘"` | The format of `deleted` |
| `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `git_status` module. |
| `disabled` | `false` | 停用 `git_status` 模組。 |
### Variables
@ -1157,7 +1157,7 @@ behind = "⇣${count}"
## Golang
The `golang` module shows the currently installed version of Golang. 這個模組在下列其中一個條件達成時顯示:
`golang` 模組顯示現在安裝的 Golang 版本。 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中含有一個 `go.mod` 檔案
- 現在資料夾中含有一個 `go.sum` 檔案
@ -1175,7 +1175,7 @@ The `golang` module shows the currently installed version of Golang. 這個模
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"🐹 "` | A format string representing the symbol of Go. |
| `style` | `"bold cyan"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `golang` module. |
| `disabled` | `false` | 停用 `golang` 模組。 |
### Variables
@ -1233,17 +1233,17 @@ format = "via [⎈ $version](bold white) "
## 主機名稱
The `hostname` module shows the system hostname.
`hostname` 模組顯示系統的主機名稱。
### 選項
| Option | 預設 | 說明 |
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
| ---------- | --------------------------- | ---------------------------------------------------------- |
| `ssh_only` | `true` | 只在連接到一個 SSH session 時顯示主機名稱。 |
| `trim_at` | `"."` | 擷取出主機名稱的斷點,以第一個符合的為準。 `"."` 會讓它停在第一個點的符號。 `""` 會停用任何的截斷功能。 |
| `format` | `"[$hostname]($style) in "` | The format for the module. |
| `style` | `"bold dimmed green"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `hostname` module. |
| `disabled` | `false` | 停用 `hostname` 模組。 |
### Variables
@ -1268,7 +1268,7 @@ disabled = false
## Java
The `java` module shows the currently installed version of Java. 這個模組在下列其中一個條件達成時顯示:
`java` 模組顯示現在安裝的 Java 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
@ -1280,7 +1280,7 @@ The `java` module shows the currently installed version of Java. 這個模組在
| `format` | `"via [${symbol}${version}]($style) "` | The format for the module. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `java` module. |
| `disabled` | `false` | 停用 `java` 模組。 |
### Variables
@ -1303,17 +1303,17 @@ symbol = "🌟 "
## 工作
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists.
`jobs` 模組顯示現在正在執行中的工作。 這個模組只會在有背景工作正在執行時顯示。 這個模組會在工作數量超過一個,或者有設定 `threshold` 時且數量超過設定值時,顯示工作的數量。
### 選項
| Option | 預設 | 說明 |
| ----------- | ----------------------------- | ------------------------------------------------ |
| `threshold` | `1` | Show number of jobs if exceeded. |
| `threshold` | `1` | 在超過指定值時顯示工作數量。 |
| `format` | `"[$symbol$number]($style) "` | The format for the module. |
| `symbol` | `"✦"` | A format string representing the number of jobs. |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `jobs` module. |
| `disabled` | `false` | 停用 `jobs` 模組。 |
### Variables
@ -1420,7 +1420,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`
:::
@ -1457,15 +1457,15 @@ disabled = false
"dev.local.cluster.k8s" = "dev"
```
## Line Break
## 換行
The `line_break` module separates the prompt into two lines.
`line_break` 模組將提示字元分成兩行。
### 選項
| Option | 預設 | 說明 |
| ---------- | ------- | ------------------------------------------------------------------ |
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
| ---------- | ------- | ----------------------------- |
| `disabled` | `false` | 停用 `line_break` 模組,讓提示字元變成一行。 |
### 範例
@ -1513,27 +1513,27 @@ The `lua` module shows the currently installed version of Lua. 這個模組在
format = "via [🌕 $version](bold blue) "
```
## Memory Usage
## 記憶體使用量
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`
:::
### 選項
| Option | 預設 | 說明 |
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
| ----------- | --------------------------------------------- | -------------------------- |
| `threshold` | `75` | 將記憶體使用量隱藏,除非使用量超過指定值。 |
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
| `symbol` | `"🐏"` | 顯示在記憶體使用量之前的符號。 |
| `style` | `"bold dimmed white"` | 這個模組的風格。 |
| `disabled` | `true` | Disables the `memory_usage` module. |
| `disabled` | `true` | 停用 `memory_usage` 模組。 |
### Variables
@ -1572,7 +1572,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| `style` | `"bold purple"` | 這個模組的風格。 |
| `format` | `"on [$symbol$branch]($style) "` | The format for the module. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 |
| `disabled` | `true` | Disables the `hg_branch` module. |
### Variables
@ -1636,7 +1636,7 @@ symbol = "🎣 "
## Nix-shell
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
`nix_shell` 模組顯示 nix-shell 環境。 這個模組會在 nix-shell 環境中顯示。
### 選項
@ -1647,7 +1647,7 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
| `style` | `"bold blue"` | 這個模組的風格。 |
| `impure_msg` | `"impure"` | A format string shown when the shell is impure. |
| `pure_msg` | `"pure"` | A format string shown when the shell is pure. |
| `disabled` | `false` | Disables the `nix_shell` module. |
| `disabled` | `false` | 停用 `nix_shell` 模組。 |
### Variables
@ -1674,11 +1674,11 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. 這個模組在下列其中一個條件達成時顯示:
`nodejs` 模組顯示現在安裝的 NodeJS 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `package.json` file
- 現在資料夾中包含一個 `package.json` 檔案
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory
- 現在資料夾中包含一個 `node_modules` 資料夾
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
- The current directory contains a file with the `.ts` extension
@ -1689,7 +1689,7 @@ The `nodejs` module shows the currently installed version of NodeJS. 這個模
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
| `style` | `"bold green"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `nodejs` module. |
| `disabled` | `false` | 停用 `nodejs` 模組。 |
| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. |
###  Variables
@ -1785,13 +1785,13 @@ style = "bold yellow"
symbol = "☁️ "
```
## Package Version
## 套件版本
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 這個模組目前支援 `npm`、`cargo`、`poetry`、`composer`、`gradle`、`julia`、`mix`, 跟 `helm` 套件
- **npm** The `npm` package version is extracted from the `package.json` present in the current directory
- **cargo** The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
- **poetry** The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
- **npm** `npm` 套件的版本是從現在資料夾中的 `package.json` 之中擷取出來的
- **cargo** `cargo` 套件的版本是從現在資料夾中的 `Cargo.toml` 之中擷取出來的
- **poetry** `poetry` 套件的版本是從現在資料夾中的 `pyproject.toml` 之中擷取出來的
- **composer** The `composer` package version is extracted from the `composer.json` present in the current directory
- **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
@ -1805,12 +1805,12 @@ The `package` module is shown when the current directory is the repository for a
### 選項
| Option | 預設 | 說明 |
| ----------------- | ---------------------------------- | ---------------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
| ----------------- | --------------------------------- | --------------------------------------------------------- |
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"📦 "` | 顯示在套件的版本之前的符號。 |
| `style` | `"bold 208"` | 這個模組的風格。 |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | Disables the `package` module. |
| `disabled` | `false` | 停用 `package` 模組。 |
### Variables
@ -1946,13 +1946,13 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- 目前資料夾中有一個 `.python-version` 檔案
- 目前資料夾中有一個 `requirements.txt` 檔案
- 目前資料夾中有一個 `pyproject.toml` 檔案
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- 目前資料夾中有一個 `Pipfile` 檔案
- 目前資料夾中有一個 `tox.ini` 檔案
- 現在資料夾中包含一個 `setup.py` 檔案
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
@ -1963,11 +1963,11 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. |
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
| `style` | `"yellow bold"` | 這個模組的風格。 |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 |
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
| `disabled` | `false` | Disables the `python` module. |
| `disabled` | `false` | 停用 `python` 模組。 |
::: tip
@ -2008,11 +2008,11 @@ python_binary = "python3"
## Ruby
The `ruby` module shows the currently installed version of Ruby. 這個模組在下列其中一個條件達成時顯示:
`ruby` 模組顯示現在安裝的 Ruby 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `Gemfile` file
- 目前資料夾中有一個 `Gemfile` 檔案
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file
- 目前資料夾中有一個 `.rb` 檔案
### 選項
@ -2021,7 +2021,7 @@ The `ruby` module shows the currently installed version of Ruby. 這個模組在
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `ruby` module. |
| `disabled` | `false` | 停用 `ruby` 模組。 |
### Variables
@ -2044,10 +2044,10 @@ symbol = "🔺 "
## Rust
The `rust` module shows the currently installed version of Rust. 這個模組在下列其中一個條件達成時顯示:
`rust` 模組顯示現在安裝的 Rust 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `Cargo.toml` file
- The current directory contains a file with the `.rs` extension
- 目前資料夾中有一個 `Cargo.toml` 檔案
- 現在資料夾中包含一個檔案具有 `.rs` 副檔名
### 選項
@ -2056,7 +2056,7 @@ The `rust` module shows the currently installed version of Rust. 這個模組在
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `rust` module. |
| `disabled` | `false` | 停用 `rust` 模組。 |
### Variables
@ -2151,7 +2151,9 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. :::
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
:::
### 選項
@ -2286,20 +2288,20 @@ 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`
:::
### 選項
| Option | 預設 | 說明 |
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- |
| `format` | `"at [$time]($style) "` | The format string for the module. |
| `use_12hr` | `false` | Enables 12 hour formatting |
| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `"bold yellow"` | The style for the module time |
| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 &lt; x &lt; 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
| `use_12hr` | `false` | 啟用 12 小時格式。 |
| `time_format` | 請看下列 | 用來顯示時間的 [chrono 格式字串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)。 |
| `style` | `"bold yellow"` | 這個模組的時間的風格。 |
| `utc_time_offset` | `"local"` | 設定相對於 UTC 的時差。 Range from -24 &lt; x &lt; 24. 允許使用浮點數來表示 30/45 分鐘時差的時區。 |
| `disabled` | `true` | 停用 `time` 模組。 |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
@ -2308,7 +2310,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| 變數 | 範例 | 說明 |
| --------- | ---------- | ----------------------------------- |
| time | `13:08:10` | The current time. |
| 時間 | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
@ -2326,26 +2328,30 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Username
## 使用者名稱
The `username` module shows active user's 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
::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. :::
::: tip
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
:::
### 選項
| Option | 預設 | 說明 |
| ------------- | ----------------------- | ------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root. |
| `style_user` | `"bold yellow"` | The style used for non-root users. |
| ------------- | ----------------------- | -------------------------- |
| `style_root` | `"bold red"` | 使用者為 root 時使用的風格。 |
| `style_user` | `"bold yellow"` | 非 root 使用者時使用的風格。 |
| `format` | `"[$user]($style) in "` | The format for the module. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| `show_always` | `false` | 總是顯示 `username` 模組。 |
| `disabled` | `false` | 停用 `username` 模組。 |
### Variables
@ -2437,7 +2443,7 @@ The order in which custom modules are shown can be individually set by including
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | [See below](#custom-command-shell) |
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `說明` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
| `files` | `[]` | The files that will be searched in the working directory for a match. |
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |

View File

@ -125,6 +125,8 @@
### 入門
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. 安裝 **starship** 執行檔:
@ -138,17 +140,10 @@
```
##### From source on [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Install via Package Manager
##### With [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -161,7 +156,7 @@
scoop install starship
```
1. 將初始化腳本 (script) 加入你的 shell 的設定檔:
2. 將初始化腳本 (script) 加入你的 shell 的設定檔:
#### Bash

View File

@ -0,0 +1,46 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
```sh
home-manager switch
```