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

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

This commit is contained in:
Matan Kushner 2020-04-06 14:48:26 -04:00 committed by GitHub
parent e94d5439ce
commit b01b498b9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 1437 additions and 828 deletions

View File

@ -98,6 +98,7 @@ prompt_order = [
"git_state", "git_state",
"git_status", "git_status",
"hg_branch", "hg_branch",
"docker_context",
"package", "package",
"dotnet", "dotnet",
"elixir", "elixir",
@ -105,6 +106,7 @@ prompt_order = [
"golang", "golang",
"haskell", "haskell",
"java", "java",
"julia",
"nodejs", "nodejs",
"php", "php",
"python", "python",
@ -130,6 +132,8 @@ prompt_order = [
Das `aws`-Modul zeigt das aktuelle AWS-Profil an. Dies basiert auf den Umgebungsvariablen: `AWS_REGION`, `AWS_DEFAULT_REGION`, `AWS_PROFILE` und der `~/.aws/config` Datei. Das `aws`-Modul zeigt das aktuelle AWS-Profil an. Dies basiert auf den Umgebungsvariablen: `AWS_REGION`, `AWS_DEFAULT_REGION`, `AWS_PROFILE` und der `~/.aws/config` Datei.
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
### Optionen ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | Standardwert | Beschreibung |
@ -318,7 +322,7 @@ style = "dimmed green"
The `crystal` module shows the currently installed version of Crystal. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: The `crystal` module shows the currently installed version of Crystal. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- The current directory contains a `shard.yml` file - Das aktuelle Verzeichnis enthält eine `shard.yml`-Datei
- The current directory contains a `.cr` file - The current directory contains a `.cr` file
### Optionen ### Optionen
@ -339,9 +343,9 @@ symbol = "✨ "
style = "bold blue" style = "bold blue"
``` ```
## Directory ## 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. 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.
@ -351,14 +355,14 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| Variable | Standardwert | Beschreibung | | Variable | 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. | | `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
| `prefix` | `"in "` | Prefix to display immediately before the directory. | | `prefix` | `"in "` | Präfix der vor dem Verzeichnis angezeigt wird. |
| `style` | `"bold cyan"` | Stil für dieses Modul. | | `style` | `"bold cyan"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `directory` module. | | `disabled` | `false` | Deaktiviert das `directory`-Modul. |
<details> <details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary> <summary>Dieses Modul hat einige erweiterte Konfigurationsoptionen, welche die Darstellung von Verzeichnissen steuern.</summary>
| Variable | Standardwert | Beschreibung | | Variable | Standardwert | Beschreibung |
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------- | | --------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
@ -378,6 +382,28 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
truncation_length = 8 truncation_length = 8
``` ```
## Docker Context
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`.
### Optionen
| Variable | Standardwert | Beschreibung |
| ----------------- | ------------- | --------------------------------------------------------------------------------------- |
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context . |
| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
| `style` | `"bold blue"` | Stil für dieses Modul. |
| `disabled` | `true` | Disables the `docker_context` module. |
### Beispiel
```toml
# ~/.config/starship.toml
[docker_context]
symbol = "🐋 "
```
## Dotnet ## 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. 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.
@ -388,12 +414,12 @@ Internally, this module uses its own mechanism for version detection. Typically
### Optionen ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | Standardwert | Beschreibung |
| ----------- | ------------- | -------------------------------------------------------- | | ----------- | ------------- | ------------------------------------------------------------------ |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | | `symbol` | `"•NET "` | Symbol das vor der dotnet-Version angezeigt wird. |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. | | `heuristic` | `true` | Schnelle Versionserkennung nutzen um Starship bedienbar zu halten. |
| `style` | `"bold blue"` | Stil für dieses Modul. | | `style` | `"bold blue"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `dotnet` module. | | `disabled` | `false` | Deaktiviert das `dotnet`-Modul. |
### Beispiel ### Beispiel
@ -410,7 +436,7 @@ heuristic = false
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- The current directory contains a `mix.exs` file. - Das aktuelle Verzeichnis enthält eine `mix.exs`-Datei.
### Optionen ### Optionen
@ -432,8 +458,9 @@ symbol = "🔮 "
The `elm` module shows the currently installed version of Elm. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: The `elm` module shows the currently installed version of Elm. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- The current directory contains a `elm.json` file - Das aktuelle Verzeichnis enthält eine `elm.json`-Datei
- The current directory contains a `elm-package.json` file - Das aktuelle Verzeichnis enthält eine `elm-package.json`-Datei
- The current directory contains a `.elm-version` file
- The current directory contains a `elm-stuff` folder - The current directory contains a `elm-stuff` folder
- The current directory contains a `*.elm` files - The current directory contains a `*.elm` files
@ -455,7 +482,7 @@ The `elm` module shows the currently installed version of Elm. Das Modul wird nu
symbol = " " symbol = " "
``` ```
## Environment Variable ## Umgebungsvariablen
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met: 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:
@ -464,15 +491,15 @@ The `env_var` module displays the current value of a selected environment variab
### Optionen ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | Standardwert | Beschreibung |
| ---------- | ---------------- | ---------------------------------------------------------------------------- | | ---------- | ---------------- | ---------------------------------------------------------------------------------------- |
| `symbol` | | The symbol used before displaying the variable value. | | `symbol` | | Das Symbol, das vor der Anzeige der Variable verwendet wird. |
| `variable` | | The environment variable to be displayed. | | `variable` | | Die anzuzeigende Umgebungsvariable. |
| `default` | | The default value to be displayed when the selected variable is not defined. | | `default` | | Der Standardwert, der angezeigt wird, wenn die ausgewählte Variable nicht definiert ist. |
| `prefix` | `""` | Prefix to display immediately before the variable value. | | `prefix` | `""` | Präfix der vor der Variable angezeigt wird. |
| `suffix` | `""` | Suffix to display immediately after the variable value. | | `suffix` | `""` | Suffix der nach der Variable angezeigt wird. |
| `style` | `"dimmed black"` | Stil für dieses Modul. | | `style` | `"dimmed black"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `env_var` module. | | `disabled` | `false` | Deaktiviert das `env_var`-Modul. |
### Beispiel ### Beispiel
@ -484,19 +511,19 @@ variable = "SHELL"
default = "unknown shell" default = "unknown shell"
``` ```
## Git Branch ## 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 ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | Standardwert | Beschreibung |
| ------------------- | --------------- | ------------------------------------------------------------------------------------- | | ------------------- | --------------- | ------------------------------------------------------------------------------------------------------ |
| `symbol` | `" "` | The symbol used before the branch name of the repo in your current directory. | | `symbol` | `" "` | Das Symbol, das vor dem Branchnamen des Git-Repositorys in Ihrem aktuellen Verzeichnis angezeigt wird. |
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes | | `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` | `"…"` | The symbol used to indicate a branch name was truncated. You can use "" for no symbol |
| `style` | `"bold purple"` | Stil für dieses Modul. | | `style` | `"bold purple"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `git_branch` module. | | `disabled` | `false` | Deaktiviert das `git_branch`-Modul. |
### Beispiel ### Beispiel
@ -533,7 +560,7 @@ The `git_commit` module shows the current commit hash of the repo in your curren
commit_hash_length = 4 commit_hash_length = 4
``` ```
## Git State ## Git-Zustand
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. 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.
@ -550,7 +577,7 @@ The `git_state` module will show in directories which are part of a git reposito
| `am_or_rebase` | `"AM/REBASE"` | The text displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. | | `am_or_rebase` | `"AM/REBASE"` | The text displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
| `progress_divider` | `"/"` | The symbol or text which will separate the current and total progress amounts. (e.g., `" of "`, for `"3 of 10"`) | | `progress_divider` | `"/"` | The symbol or text which will separate the current and total progress amounts. (e.g., `" of "`, for `"3 of 10"`) |
| `style` | `"bold yellow"` | Stil für dieses Modul. | | `style` | `"bold yellow"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `git_state` module. | | `disabled` | `false` | Deaktiviert das `git_state`-Modul. |
### Beispiel ### Beispiel
@ -562,7 +589,7 @@ progress_divider = " of "
cherry_pick = "🍒 PICKING" cherry_pick = "🍒 PICKING"
``` ```
## Git Status ## Git-Status
The `git_status` module shows symbols representing the state of the repo in your current directory. The `git_status` module shows symbols representing the state of the repo in your current directory.
@ -591,7 +618,7 @@ The `git_status` module shows symbols representing the state of the repo in your
| `prefix` | `[` | Prefix to display immediately before git status. | | `prefix` | `[` | Prefix to display immediately before git status. |
| `suffix` | `]` | Suffix to display immediately after git status. | | `suffix` | `]` | Suffix to display immediately after git status. |
| `style` | `"bold red"` | Stil für dieses Modul. | | `style` | `"bold red"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `git_status` module. | | `disabled` | `false` | Deaktiviert das `git_status`-Modul. |
#### Git Status Counts #### Git Status Counts
@ -623,23 +650,24 @@ deleted = "🗑"
## Golang ## Golang
The `golang` module shows the currently installed version of Golang. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: Das `golang`-Modul zeigt die aktuell installierte Version von Golang. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- The current directory contains a `go.mod` file - Das aktuelle Verzeichnis enthält eine `go.mod`-Datei
- The current directory contains a `go.sum` file - Das aktuelle Verzeichnis enthält eine `go.sum`-Datei
- The current directory contains a `glide.yaml` file - Das aktuelle Verzeichnis enthält eine `glide.yaml`-Datei
- The current directory contains a `Gopkg.yml` file - Das aktuelle Verzeichnis enthält eine `Gopkg.yml`-Datei
- The current directory contains a `Gopkg.lock` file - Das aktuelle Verzeichnis enthält eine `Gopkg.lock`-Datei
- The current directory contains a `Godeps` directory - The current directory contains a `.go-version` file
- The current directory contains a file with the `.go` extension - Das aktuelle Verzeichnis enthält ein `Godeps`-Verzeichnis
- Das aktuelle Verzeichnis enthält eine Datei mit der `.go`-Erweiterung
### Optionen ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | Standardwert | Beschreibung |
| ---------- | ------------- | -------------------------------------------------------- | | ---------- | ------------- | ------------------------------------------------- |
| `symbol` | `"🐹 "` | The symbol used before displaying the version of Golang. | | `symbol` | `"🐹 "` | Symbol das vor der Golang-Version angezeigt wird. |
| `style` | `"bold cyan"` | Stil für dieses Modul. | | `style` | `"bold cyan"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `golang` module. | | `disabled` | `false` | Deaktiviert das `golang`-Modul. |
### Beispiel ### Beispiel
@ -653,7 +681,7 @@ symbol = "🏎💨 "
The `haskell` module shows the currently installed version of Haskell Stack version. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: The `haskell` module shows the currently installed version of Haskell Stack version. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- The current directory contains a `stack.yaml` file - Das aktuelle Verzeichnis enthält eine `stack.yaml`-Datei
### Optionen ### Optionen
@ -703,18 +731,18 @@ disabled = false
## Java ## Java
The `java` module shows the currently installed version of Java. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: Das `java` Modul zeigt die derzeit installierte Version von Java an. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- The current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file - The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension - The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension
### Optionen ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | Standardwert | Beschreibung |
| ---------- | -------------- | ------------------------------------------------------ | | ---------- | -------------- | ----------------------------------------------- |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. | | `symbol` | `"☕ "` | Symbol das vor der Java-Version angezeigt wird. |
| `style` | `"dimmed red"` | Stil für dieses Modul. | | `style` | `"dimmed red"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `java` module. | | `disabled` | `false` | Deaktiviert das `Java`-Modul. |
### Beispiel ### Beispiel
@ -731,12 +759,12 @@ The `jobs` module shows the current number of jobs running. The module will be s
### Optionen ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | Standardwert | Beschreibung |
| ----------- | ------------- | ----------------------------------------------------- | | ----------- | ------------- | -------------------------------------------------------------------------------- |
| `symbol` | `"✦"` | The symbol used before displaying the number of jobs. | | `symbol` | `"✦"` | Symbol das vor der Anzahl der Jobs angezeigt wird. |
| `threshold` | `1` | Show number of jobs if exceeded. | | `threshold` | `1` | Zeigt die Anzahl der Jobs wenn der angegebene Schwellenwert überschritten wurde. |
| `style` | `"bold blue"` | Stil für dieses Modul. | | `style` | `"bold blue"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | Deaktiviert das `jobs`-Modul. |
### Beispiel ### Beispiel
@ -748,6 +776,30 @@ symbol = "+ "
threshold = 4 threshold = 4
``` ```
## Julia
The `julia` module shows the currently installed version of Julia. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- The current directory contains a `Project.toml` file
- The current directory contains a `Manifest.toml` file
- The current directory contains a file with the `.jl` extension
### Optionen
| Variable | Standardwert | Beschreibung |
| ---------- | --------------- | ------------------------------------------------------- |
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
| `style` | `"bold purple"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `julia` module. |
### Beispiel
```toml
# ~/.config/starship.toml
[julia]
symbol = "👸 "
```
## Kubernetes ## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
@ -760,11 +812,12 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
### Optionen ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | Standardwert | Beschreibung |
| ---------- | ------------- | --------------------------------------------------- | | ----------------- | ------------- | ------------------------------------------------------ |
| `symbol` | `"☸ "` | The symbol used before displaying the Cluster info. | | `symbol` | `"☸ "` | Symbol das vor der Cluster-Information angezeigt wird. |
| `style` | `"bold blue"` | Stil für dieses Modul. | | `context_aliases` | | Table of context aliases to display |
| `disabled` | `true` | Disables the `kubernetes` module | | `style` | `"bold blue"` | Stil für dieses Modul. |
| `disabled` | `true` | Deaktiviert das `kubernetes`-Modul |
### Beispiel ### Beispiel
@ -775,17 +828,19 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
symbol = "⛵ " symbol = "⛵ "
style = "dimmed green" style = "dimmed green"
disabled = false disabled = false
[kubernetes.context_aliases]
"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 ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | 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 ### Beispiel
@ -796,11 +851,11 @@ The `line_break` module separates the prompt into two lines.
disabled = true disabled = true
``` ```
## 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.
::: tip ::: tip
@ -810,15 +865,15 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
### Optionen ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | Standardwert | Beschreibung |
| ----------------- | --------------------- | ------------------------------------------------------------- | | ----------------- | --------------------- | -------------------------------------------------------------------------- |
| `show_percentage` | `false` | Display memory usage as a percentage of the available memory. | | `show_percentage` | `false` | Zeigt die Speicherauslastung als Prozentsatz des verfügbaren Speichers an. |
| `show_swap` | `true` | Display swap usage if total swap is non-zero. | | `show_swap` | `true` | Swap-Nutzung anzeigen, wenn die Gesamtsumme des swaps nicht Null ist. |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | | `threshold` | `75` | Speicherauslastung ausblenden, wenn sie unter diesem Prozentsatz ist. |
| `symbol` | `"🐏 "` | The symbol used before displaying the memory usage. | | `symbol` | `"🐏 "` | Symbol das vor der Speicherauslastung angezeigt wird. |
| `separator` | `" | "` | The symbol or text that will seperate the ram and swap usage. | | `separator` | `" | "` | Symbol oder Text, der ram und swap-Nutzung trennt. |
| `style` | `"bold dimmed white"` | Stil für dieses Modul. | | `style` | `"bold dimmed white"` | Stil für dieses Modul. |
| `disabled` | `true` | Disables the `memory_usage` module. | | `disabled` | `true` | Deaktiviert das `memory_usage`-Modul. |
### Beispiel ### Beispiel
@ -860,19 +915,19 @@ truncation_length = 4
truncation_symbol = "" truncation_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 ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | Standardwert | Beschreibung |
| ------------ | ------------ | ---------------------------------- | | ------------ | ------------ | ---------------------------------- |
| `use_name` | `false` | Display the name of the nix-shell. | | `use_name` | `false` | Namen der nix-Shell anzeigen. |
| `impure_msg` | `"impure"` | Customize the "impure" msg. | | `impure_msg` | `"impure"` | Passt die "impure"-Nachricht an. |
| `pure_msg` | `"pure"` | Customize the "pure" msg. | | `pure_msg` | `"pure"` | Passt die "pure"-Nachricht an. |
| `style` | `"bold red"` | Stil für dieses Modul. | | `style` | `"bold red"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `nix_shell` module. | | `disabled` | `false` | Deaktiviert das `nix_shell`-Modul. |
### Beispiel ### Beispiel
@ -891,6 +946,7 @@ pure_msg = "pure shell"
Das `nodejs` Modul zeigt die derzeit installierte Version von NodeJS. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: Das `nodejs` Modul zeigt die derzeit installierte Version von NodeJS. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- Das aktuelle Verzeichnis enthält eine `package.json`-Datei - Das aktuelle Verzeichnis enthält eine `package.json`-Datei
- The current directory contains a `.node-version` file
- Das aktuelle Verzeichnis enthält ein `node_modules`-Verzeichnis - Das aktuelle Verzeichnis enthält ein `node_modules`-Verzeichnis
- Das aktuelle Verzeichnis enthält eine Datei mit der `.js`-Erweiterung - Das aktuelle Verzeichnis enthält eine Datei mit der `.js`-Erweiterung
@ -920,6 +976,7 @@ Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository
- **poetry** Die `poetry` Paketversion wird aus der `pyproject.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 - **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 - **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
> ⚠️ Die angezeigte Version ist die des Pakets, dessen Quellcode im Verzeichnis liegt, nicht die des Paketmanagers. > ⚠️ Die angezeigte Version ist die des Pakets, dessen Quellcode im Verzeichnis liegt, nicht die des Paketmanagers.
@ -945,11 +1002,12 @@ symbol = "🎁 "
Das `php`-Modul zeigt die aktuell installierte Version von PHP. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: Das `php`-Modul zeigt die aktuell installierte Version von PHP. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- Das aktuelle Verzeichnis enthält eine `composer.json`-Datei - Das aktuelle Verzeichnis enthält eine `composer.json`-Datei
- The current directory contains a `.php-version` file
- Das aktuelle Verzeichnis enthält eine `.php`-Datei - Das aktuelle Verzeichnis enthält eine `.php`-Datei
### Optionen ### Optionen
| Variable | Standardwert | Beschreibung | | Variable | Standartwert | Beschreibung |
| ---------- | ------------ | ---------------------------------------------- | | ---------- | ------------ | ---------------------------------------------- |
| `symbol` | `"🐘 "` | Symbol das vor der PHP-Version angezeigt wird. | | `symbol` | `"🐘 "` | Symbol das vor der PHP-Version angezeigt wird. |
| `style` | `"bold red"` | Stil für dieses Modul. | | `style` | `"bold red"` | Stil für dieses Modul. |
@ -1008,11 +1066,12 @@ pyenv_prefix = "foo "
Das `ruby` Modul zeigt die derzeit installierte Version von Ruby an. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: Das `ruby` Modul zeigt die derzeit installierte Version von Ruby an. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- Das aktuelle Verzeichnis enthält eine `Gemfile`-Datei - Das aktuelle Verzeichnis enthält eine `Gemfile`-Datei
- The current directory contains a `.ruby-version` file
- Das aktuelle Verzeichnis enthält eine `.rb`-Datei - Das aktuelle Verzeichnis enthält eine `.rb`-Datei
### Optionen ### Optionen
| Variable | Standartwert | Beschreibung | | Variable | Standardwert | Beschreibung |
| ---------- | ------------ | ----------------------------------------------- | | ---------- | ------------ | ----------------------------------------------- |
| `symbol` | `"💎 "` | Symbol das vor der Ruby-Version angezeigt wird. | | `symbol` | `"💎 "` | Symbol das vor der Ruby-Version angezeigt wird. |
| `style` | `"bold red"` | Stil für dieses Modul. | | `style` | `"bold red"` | Stil für dieses Modul. |

View File

@ -220,9 +220,37 @@ Wir laden Leute **aller Erfahrungsstufen** herzlich ein mitzumachen! Falls du di
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. 👋 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. 👋
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
#### Individuals
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/2/website"><img src="https://opencollective.com/starship/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/3/website"><img src="https://opencollective.com/starship/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/4/website"><img src="https://opencollective.com/starship/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/5/website"><img src="https://opencollective.com/starship/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/6/website"><img src="https://opencollective.com/starship/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/7/website"><img src="https://opencollective.com/starship/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
## 💭 Inspiriert durch ## 💭 Inspiriert durch
Checkt bitte diese älteren Projekte, die das Entstehen von Starhip inspiriert haben. 🙏 Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Ein ZSH-Prompt für Astronauten. - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Ein ZSH-Prompt für Astronauten.
@ -232,9 +260,9 @@ Checkt bitte diese älteren Projekte, die das Entstehen von Starhip inspiriert h
<p align="center"> <p align="center">
<br> <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 rocket icon">
</p> </p>
## 📝 Lizenz ## 📝 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-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.

View File

@ -98,6 +98,7 @@ prompt_order = [
"git_state", "git_state",
"git_status", "git_status",
"hg_branch", "hg_branch",
"docker_context",
"package", "package",
"dotnet", "dotnet",
"elixir", "elixir",
@ -105,6 +106,7 @@ prompt_order = [
"golang", "golang",
"haskell", "haskell",
"java", "java",
"julia",
"nodejs", "nodejs",
"php", "php",
"python", "python",
@ -130,6 +132,8 @@ prompt_order = [
The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file.
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
### Options ### Options
| Variable | Default | Description | | Variable | Default | Description |
@ -378,6 +382,28 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
truncation_length = 8 truncation_length = 8
``` ```
## Docker Context
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`.
### Options
| Variable | Default | Description |
| ----------------- | ------------- | --------------------------------------------------------------------------------------- |
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context . |
| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `true` | Disables the `docker_context` module. |
### Example
```toml
# ~/.config/starship.toml
[docker_context]
symbol = "🐋 "
```
## Dotnet ## 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. 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.
@ -434,6 +460,7 @@ The `elm` module shows the currently installed version of Elm. The module will b
- The current directory contains a `elm.json` file - The current directory contains a `elm.json` file
- The current directory contains a `elm-package.json` file - The current directory contains a `elm-package.json` file
- The current directory contains a `.elm-version` file
- The current directory contains a `elm-stuff` folder - The current directory contains a `elm-stuff` folder
- The current directory contains a `*.elm` files - The current directory contains a `*.elm` files
@ -630,6 +657,7 @@ The `golang` module shows the currently installed version of Golang. The module
- The current directory contains a `glide.yaml` file - The current directory contains a `glide.yaml` file
- The current directory contains a `Gopkg.yml` file - The current directory contains a `Gopkg.yml` file
- The current directory contains a `Gopkg.lock` file - The current directory contains a `Gopkg.lock` file
- The current directory contains a `.go-version` file
- The current directory contains a `Godeps` directory - The current directory contains a `Godeps` directory
- The current directory contains a file with the `.go` extension - The current directory contains a file with the `.go` extension
@ -705,7 +733,7 @@ disabled = false
The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met: The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file - The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension - The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension
### Options ### Options
@ -748,6 +776,30 @@ symbol = "+ "
threshold = 4 threshold = 4
``` ```
## Julia
The `julia` module shows the currently installed version of Julia. The module will be shown if any of the following conditions are met:
- The current directory contains a `Project.toml` file
- The current directory contains a `Manifest.toml` file
- The current directory contains a file with the `.jl` extension
### Options
| Variable | Default | Description |
| ---------- | --------------- | ------------------------------------------------------- |
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
| `style` | `"bold purple"` | The style for the module. |
| `disabled` | `false` | Disables the `julia` module. |
### Example
```toml
# ~/.config/starship.toml
[julia]
symbol = "👸 "
```
## Kubernetes ## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
@ -760,11 +812,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options ### Options
| Variable | Default | Description | | Variable | Default | Description |
| ---------- | ------------- | --------------------------------------------------- | | ----------------- | ------------- | --------------------------------------------------- |
| `symbol` | `"☸ "` | The symbol used before displaying the Cluster info. | | `symbol` | `"☸ "` | The symbol used before displaying the Cluster info. |
| `style` | `"bold blue"` | The style for the module. | | `context_aliases` | | Table of context aliases to display |
| `disabled` | `true` | Disables the `kubernetes` module | | `style` | `"bold blue"` | The style for the module. |
| `disabled` | `true` | Disables the `kubernetes` module |
### Example ### Example
@ -775,6 +828,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
symbol = "⛵ " symbol = "⛵ "
style = "dimmed green" style = "dimmed green"
disabled = false disabled = false
[kubernetes.context_aliases]
"dev.local.cluster.k8s" = "dev"
``` ```
## Line Break ## Line Break
@ -891,6 +946,7 @@ pure_msg = "pure shell"
The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met: The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met:
- The current directory contains a `package.json` file - The current directory contains a `package.json` file
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory - The current directory contains a `node_modules` directory
- The current directory contains a file with the `.js` extension - The current directory contains a file with the `.js` extension
@ -920,6 +976,7 @@ The `package` module is shown when the current directory is the repository for a
- **poetry** The `poetry` package version is extracted from the `pyproject.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 - **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 - **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. > ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
@ -945,6 +1002,7 @@ symbol = "🎁 "
The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met:
- The current directory contains a `composer.json` file - The current directory contains a `composer.json` file
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file - The current directory contains a `.php` file
### Options ### Options
@ -1008,6 +1066,7 @@ pyenv_prefix = "foo "
The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met:
- The current directory contains a `Gemfile` file - The current directory contains a `Gemfile` file
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file - The current directory contains a `.rb` file
### Options ### Options

View File

@ -220,9 +220,37 @@
Si quiere ayudar a colaborar a starship, por favor mira a nuestra [Guía de Colaboradores](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) (Contributing Guide). Además, juntarse con nosotros en nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y di "¡hola!". 👋 Si quiere ayudar a colaborar a starship, por favor mira a nuestra [Guía de Colaboradores](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) (Contributing Guide). Además, juntarse con nosotros en nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y di "¡hola!". 👋
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
#### Individuals
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/2/website"><img src="https://opencollective.com/starship/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/3/website"><img src="https://opencollective.com/starship/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/4/website"><img src="https://opencollective.com/starship/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/5/website"><img src="https://opencollective.com/starship/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/6/website"><img src="https://opencollective.com/starship/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/7/website"><img src="https://opencollective.com/starship/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
## 💭 Inspiracíon ## 💭 Inspiracíon
Por favor, revisa estos trabajos previos que ayudaron a inspirar la creación de starship. 🙏 Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Una prompt Zsh para astronautas. - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Una prompt Zsh para astronautas.
@ -232,9 +260,9 @@ Por favor, revisa estos trabajos previos que ayudaron a inspirar la creación de
<p align="center"> <p align="center">
<br> <br>
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Icono de cohete de Starship"> <img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
</p> </p>
## 📝 Licencia ## 📝 Licencia
Derechos de autor © 2019-presente, [Colaboradores de Starship](https://github.com/starship/starship/graphs/contributors).<br />Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE). Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.

View File

@ -98,6 +98,7 @@ prompt_order = [
"git_state", "git_state",
"git_status", "git_status",
"hg_branch", "hg_branch",
"docker_context",
"package", "package",
"dotnet", "dotnet",
"elixir", "elixir",
@ -105,6 +106,7 @@ prompt_order = [
"golang", "golang",
"haskell", "haskell",
"java", "java",
"julia",
"nodejs", "nodejs",
"php", "php",
"python", "python",
@ -130,6 +132,8 @@ prompt_order = [
The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file.
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
### Options ### Options
| Variable | Default | Description | | Variable | Default | Description |
@ -316,7 +320,7 @@ style = "dimmed green"
## Crystal ## Crystal
The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: The `crystal` module shows the currently installed version of Crystal. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `shard.yml` file - The current directory contains a `shard.yml` file
- The current directory contains a `.cr` file - The current directory contains a `.cr` file
@ -378,6 +382,28 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
truncation_length = 8 truncation_length = 8
``` ```
## Docker Context
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`.
### Options
| Variable | Default | Description |
| ----------------- | ------------- | --------------------------------------------------------------------------------------- |
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context . |
| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `true` | Disables the `docker_context` module. |
### Exemple
```toml
# ~/.config/starship.toml
[docker_context]
symbol = "🐋 "
```
## Dotnet ## 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. 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.
@ -408,7 +434,7 @@ heuristic = false
## Elixir ## Elixir
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. The module will be shown if any of the following conditions are met: The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `mix.exs` file. - The current directory contains a `mix.exs` file.
@ -430,10 +456,11 @@ symbol = "🔮 "
## Elm ## Elm
The `elm` module shows the currently installed version of Elm. The module will be shown if any of the following conditions are met: The `elm` module shows the currently installed version of Elm. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `elm.json` file - The current directory contains a `elm.json` file
- The current directory contains a `elm-package.json` file - The current directory contains a `elm-package.json` file
- The current directory contains a `.elm-version` file
- The current directory contains a `elm-stuff` folder - The current directory contains a `elm-stuff` folder
- The current directory contains a `*.elm` files - The current directory contains a `*.elm` files
@ -623,13 +650,14 @@ deleted = "🗑"
## Golang ## Golang
The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met: The `golang` module shows the currently installed version of Golang. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `go.mod` file - The current directory contains a `go.mod` file
- The current directory contains a `go.sum` file - The current directory contains a `go.sum` file
- The current directory contains a `glide.yaml` file - The current directory contains a `glide.yaml` file
- The current directory contains a `Gopkg.yml` file - The current directory contains a `Gopkg.yml` file
- The current directory contains a `Gopkg.lock` file - The current directory contains a `Gopkg.lock` file
- The current directory contains a `.go-version` file
- The current directory contains a `Godeps` directory - The current directory contains a `Godeps` directory
- The current directory contains a file with the `.go` extension - The current directory contains a file with the `.go` extension
@ -651,7 +679,7 @@ symbol = "🏎💨 "
``` ```
## Haskell ## Haskell
The `haskell` module shows the currently installed version of Haskell Stack version. The module will be shown if any of the following conditions are met: The `haskell` module shows the currently installed version of Haskell Stack version. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `stack.yaml` file - The current directory contains a `stack.yaml` file
@ -703,9 +731,9 @@ disabled = false
## Java ## Java
The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met: The `java` module shows the currently installed version of Java. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file - The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension - The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension
### Options ### Options
@ -748,6 +776,30 @@ symbol = "+ "
threshold = 4 threshold = 4
``` ```
## Julia
The `julia` module shows the currently installed version of Julia. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `Project.toml` file
- The current directory contains a `Manifest.toml` file
- The current directory contains a file with the `.jl` extension
### Options
| Variable | Default | Description |
| ---------- | --------------- | ------------------------------------------------------- |
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
| `style` | `"bold purple"` | The style for the module. |
| `disabled` | `false` | Disables the `julia` module. |
### Exemple
```toml
# ~/.config/starship.toml
[julia]
symbol = "👸 "
```
## Kubernetes ## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
@ -760,11 +812,12 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
### Options ### Options
| Variable | Default | Description | | Variable | Default | Description |
| ---------- | ------------- | --------------------------------------------------- | | ----------------- | ------------- | --------------------------------------------------- |
| `symbol` | `"☸ "` | The symbol used before displaying the Cluster info. | | `symbol` | `"☸ "` | The symbol used before displaying the Cluster info. |
| `style` | `"bold blue"` | The style for the module. | | `context_aliases` | | Table of context aliases to display |
| `disabled` | `true` | Disables the `kubernetes` module | | `style` | `"bold blue"` | The style for the module. |
| `disabled` | `true` | Disables the `kubernetes` module |
### Exemple ### Exemple
@ -775,6 +828,8 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
symbol = "⛵ " symbol = "⛵ "
style = "dimmed green" style = "dimmed green"
disabled = false disabled = false
[kubernetes.context_aliases]
"dev.local.cluster.k8s" = "dev"
``` ```
## Line Break ## Line Break
@ -888,9 +943,10 @@ pure_msg = "pure shell"
## NodeJS ## NodeJS
The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met: The `nodejs` module shows the currently installed version of NodeJS. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `package.json` file - The current directory contains a `package.json` file
- The current directory contains a `.node-version` file
- The current directory contains a `node_modules` directory - The current directory contains a `node_modules` directory
- The current directory contains a file with the `.js` extension - The current directory contains a file with the `.js` extension
@ -920,6 +976,7 @@ The `package` module is shown when the current directory is the repository for a
- **poetry** The `poetry` package version is extracted from the `pyproject.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 - **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 - **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. > ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
@ -942,9 +999,10 @@ symbol = "🎁 "
## PHP ## PHP
The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: The `php` module shows the currently installed version of PHP. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `composer.json` file - The current directory contains a `composer.json` file
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file - The current directory contains a `.php` file
### Options ### Options
@ -972,7 +1030,7 @@ 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` and show the current Python virtual environment if one is activated. Otherwise, it will display the version number from `python --version` and show the current Python virtual environment if one is activated.
The module will be shown if any of the following conditions are met: Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `.python-version` file - The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file - The current directory contains a `requirements.txt` file
@ -1005,9 +1063,10 @@ pyenv_prefix = "foo "
## Ruby ## Ruby
The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: The `ruby` module shows the currently installed version of Ruby. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `Gemfile` file - The current directory contains a `Gemfile` file
- The current directory contains a `.ruby-version` file
- The current directory contains a `.rb` file - The current directory contains a `.rb` file
### Options ### Options
@ -1029,7 +1088,7 @@ symbol = "🔺 "
## Rust ## Rust
The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: The `rust` module shows the currently installed version of Rust. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `Cargo.toml` file - The current directory contains a `Cargo.toml` file
- The current directory contains a file with the `.rs` extension - The current directory contains a file with the `.rs` extension
@ -1059,7 +1118,7 @@ The `singularity` module shows the current singularity image, if inside a contai
### Options ### Options
| Variable | Default | Description | | Variable | Défault | Description |
| ---------- | -------------------- | ------------------------------------------------ | | ---------- | -------------------- | ------------------------------------------------ |
| `label` | `""` | Prefix before the image name display. | | `label` | `""` | Prefix before the image name display. |
| `prefix` | `"["` | Prefix to display immediately before image name. | | `prefix` | `"["` | Prefix to display immediately before image name. |
@ -1079,14 +1138,14 @@ symbol = "📦 "
## Terraform ## Terraform
The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. The module will be shown if any of the following conditions are met: The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. Le module est affiché si l'une des ces conditions est remplie :
- The current directory contains a `.terraform` folder - The current directory contains a `.terraform` folder
- Current directory contains a file with the `.tf` extension - Current directory contains a file with the `.tf` extension
### Options ### Options
| Variable | Default | Description | | Variable | Défaut | Description |
| -------------- | ------------ | ----------------------------------------------------------- | | -------------- | ------------ | ----------------------------------------------------------- |
| `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. | | `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. |
| `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. | | `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. |
@ -1114,7 +1173,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
### Options ### Options
| Variable | Défault | Description | | Variable | Default | Description |
| ----------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | Activer le format 12h | | `use_12hr` | `false` | Activer le format 12h |
| `format` | voir plus bas | Le [format chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilisé pour formater l'heure. | | `format` | voir plus bas | Le [format chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilisé pour formater l'heure. |
@ -1146,9 +1205,9 @@ Le module `username` affiche le nom d'utilisateur de l'utilisateur actif. Le mod
### Options ### Options
| Variable | Défaut | Description | | Variable | Default | Description |
| ------------- | --------------- | ------------------------------------------------ | | ------------- | --------------- | ------------------------------------------------ |
| `style_root` | `"bold red"` | Le style utilisé quand l'utilisateur est root. | | `style_root` | `"bold green"` | Le style utilisé quand l'utilisateur est root. |
| `style_user` | `"bold yellow"` | Le style utilisé pour les utilisateurs non-root. | | `style_user` | `"bold yellow"` | Le style utilisé pour les utilisateurs non-root. |
| `show_always` | `false` | Toujours afficher le module `username`. | | `show_always` | `false` | Toujours afficher le module `username`. |
| `disabled` | `false` | Désactiver le module `username`. | | `disabled` | `false` | Désactiver le module `username`. |

View File

@ -220,9 +220,37 @@ Nous sommes toujours à la recherche de contributeurs de **tous les niveaux de c
Si vous êtes intéressé à aider à contribuer à Starship, veuillez jeter un coup d'oeil à notre [Guide de contribution](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Aussi, n'hésitez pas à vous rendre sur notre [serveur Discord](https://discord.gg/8Jzqu3T) pour dire bonjour. 👋 Si vous êtes intéressé à aider à contribuer à Starship, veuillez jeter un coup d'oeil à notre [Guide de contribution](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Aussi, n'hésitez pas à vous rendre sur notre [serveur Discord](https://discord.gg/8Jzqu3T) pour dire bonjour. 👋
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
#### Individuals
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/2/website"><img src="https://opencollective.com/starship/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/3/website"><img src="https://opencollective.com/starship/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/4/website"><img src="https://opencollective.com/starship/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/5/website"><img src="https://opencollective.com/starship/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/6/website"><img src="https://opencollective.com/starship/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/7/website"><img src="https://opencollective.com/starship/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
## 💭Inspiré par ## 💭Inspiré par
Voyez ces travaux précédents qui ont contribué à inspirer la création de vaisseau. 🙏 Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un ZSH prompt pour les astronautes. - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un ZSH prompt pour les astronautes.
@ -232,9 +260,9 @@ Voyez ces travaux précédents qui ont contribué à inspirer la création de va
<p align="center"> <p align="center">
<br> <br>
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Icône de fusée de Starship"> <img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
</p> </p>
## 📝 License ## 📝 License
Copyright © 2019-présent, [Contributeurs Starship](https://github.com/starship/starship/graphs/contributors).<br /> Ce projet est sous licence[ISC](https://github.com/starship/starship/blob/master/LICENSE). Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.

View File

@ -98,6 +98,7 @@ prompt_order = [
"git_state", "git_state",
"git_status", "git_status",
"hg_branch", "hg_branch",
"docker_context",
"package", "package",
"dotnet", "dotnet",
"elixir", "elixir",
@ -105,6 +106,7 @@ prompt_order = [
"golang", "golang",
"haskell", "haskell",
"java", "java",
"julia",
"nodejs", "nodejs",
"php", "php",
"python", "python",
@ -130,6 +132,8 @@ prompt_order = [
`aws` モジュールは現在のAWSプロファイルが表示されます。 これは `~/.aws/config` に記述されている `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` 環境変数に基づいています。 `aws` モジュールは現在のAWSプロファイルが表示されます。 これは `~/.aws/config` に記述されている `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` 環境変数に基づいています。
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
@ -360,10 +364,10 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた
<details> <details>
<summary>このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。</summary> <summary>このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。</summary>
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------- | | --------------------------- | ------ | -------------------------------------------- |
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | | `fish_style_pwd_dir_length` | `0` | fish shellのpwdパスロジックを適用するときに使用する文字数です。 |
| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | | `use_logical_path` | `true` | OSからのパスの代わりに、シェル(`PWD`) によって提供される論理パスを表示します。 |
`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`. `fish_style_pwd_dir_length` 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`.
@ -378,22 +382,44 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた
truncation_length = 8 truncation_length = 8
``` ```
## Dotnet ## Docker Context
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. 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`.
This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly.
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.
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ----------- | ------------- | -------------------------------------------------------- | | ----------------- | ------------- | --------------------------------------------------------------------------------------- |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | | `symbol` | `"🐳 "` | The symbol used before displaying the Docker context . |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. | | `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
| `style` | `"bold blue"` | モジュールのスタイルです。 | | `style` | `"bold blue"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `dotnet` module. | | `disabled` | `true` | Disables the `docker_context` module. |
### 設定例
```toml
# ~/.config/starship.toml
[docker_context]
symbol = "🐋 "
```
## Dotnet
`dotnet` モジュールはカレントディレクトリに関係する.NET Core SDKのバージョンを表示します。 もし SDKは現在のディレクトリに固定されているのであれば、その固定されたバージョンが表示されます。 それ以外の場合、モジュール SDKの最新のインストールバージョンを示します。
このモジュールは、カレントディレクトリに次のファイルのいずれかが存在する場合にのみプロンプトに表示されます。: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj` 正しく使用するには、.NET Coreコマンドラインツールもインストールする必要があります。
内部的に、このモジュールは自身のバージョン検知のメカニズムを利用します。 `dotnet --version` を実行するより2倍速く実行できますが、.NET project一般的でないディレクトリlayoutの場合は間違ったバージョンが示されてしまうことがあります。 速度よりも精度が重要な場合は、次の方法でメカニズムを無効にできます。 モジュールオプションで`heuristic = false `を設定します。
### オプション
| 変数 | デフォルト | 説明 |
| ----------- | ------------- | ------------------------------------ |
| `symbol` | `•NET "` | dotnetのバージョンを表示する前に使用される記号です。 |
| `heuristic` | `true` | より高速なバージョン検出を使用して、starshipの動作を維持します。 |
| `style` | `"bold blue"` | モジュールのスタイルです。 |
| `disabled` | `false` | `dotnet`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -410,7 +436,7 @@ heuristic = false
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 次の条件のいずれかが満たされると、モジュールが表示されます。 The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `mix.exs` file. - カレントディレクトリに`mix.exs`ファイルが含まれている.
### オプション ### オプション
@ -430,20 +456,21 @@ symbol = "🔮 "
## Elm ## Elm
The `elm` module shows the currently installed version of Elm. 次の条件のいずれかが満たされると、モジュールが表示されます。 `elm`モジュールは、現在インストールされているElmのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `elm.json` file - カレントディレクトリに`elm.json`ファイルが含まれている
- The current directory contains a `elm-package.json` file - カレントディレクトリに`elm-package.json`ファイルが含まれている
- The current directory contains a `elm-stuff` folder - The current directory contains a `.elm-version` file
- The current directory contains a `*.elm` files - カレントディレクトリに`elm-stuff`フォルダが含まれている
- カレントディレクトリに`*.elm`ファイルが含まれている
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ---------- | ------------- | ----------------------------------------------------- | | ---------- | ------------- | -------------------------- |
| `symbol` | `"🌳 "` | The symbol used before displaying the version of Elm. | | `symbol` | `"🌳 "` | Elmのバージョンを表示する前に使用される記号です。 |
| `style` | `"bold cyan"` | モジュールのスタイルです。 | | `style` | `"bold cyan"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `elm` module. | | `disabled` | `false` | `elm`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -455,24 +482,24 @@ The `elm` module shows the currently installed version of Elm. 次の条件の
symbol = " " symbol = " "
``` ```
## Environment Variable ## 環境変数
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met: `env_var`モジュールは、選択された環境変数の現在の値を表示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The `variable` configuration option matches an existing environment variable - `variable`オプションが、既存の環境変数と一致する
- The `variable` configuration option is not defined, but the `default` configuration option is - `variable`オプションが定義されておらず、`default`オプションが定義されている
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ---------- | ---------------- | ---------------------------------------------------------------------------- | | ---------- | ---------------- | ------------------------------------- |
| `symbol` | | The symbol used before displaying the variable value. | | `symbol` | | 環境変数を表示する前に使用される記号です。 |
| `variable` | | The environment variable to be displayed. | | `variable` | | 表示される環境変数です。 |
| `default` | | The default value to be displayed when the selected variable is not defined. | | `default` | | 上のvariableが定義されていない場合に表示されるデフォルトの値です。 |
| `prefix` | `""` | Prefix to display immediately before the variable value. | | `prefix` | `""` | 変数の直前に表示するprefixです。 |
| `suffix` | `""` | Suffix to display immediately after the variable value. | | `suffix` | `""` | 変数の直後に表示するsuffixです。 |
| `style` | `"dimmed black"` | モジュールのスタイルです。 | | `style` | `"dimmed black"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `env_var` module. | | `disabled` | `false` | `env_var`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -484,19 +511,19 @@ variable = "SHELL"
default = "unknown shell" default = "unknown shell"
``` ```
## Git Branch ## Git ブランチ
The `git_branch` module shows the active branch of the repo in your current directory. `git_branch`モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを表示します。
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ------------------- | --------------- | ------------------------------------------------------------------------------------- | | ------------------- | --------------- | ------------------------------------------- |
| `symbol` | `" "` | The symbol used before the branch name of the repo in your current directory. | | `symbol` | `" "` | 現在のディレクトリのリポジトリのブランチ名の前に使用されるシンボルです。 |
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes | | `truncation_length` | `2^63 - 1` | gitブランチをX書記素に切り捨てます。 |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use "" for no symbol | | `truncation_symbol` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 記号なしに「」も使用できます。 |
| `style` | `"bold purple"` | モジュールのスタイルです。 | | `style` | `"bold purple"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `git_branch` module. | | `disabled` | `false` | `git_branch`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -509,20 +536,20 @@ truncation_length = 4
truncation_symbol = "" truncation_symbol = ""
``` ```
## Git Commit ## Git コミット
The `git_commit` module shows the current commit hash of the repo in your current directory. `git_commit`モジュールは、現在のディレクトリにあるリポジトリの現在のコミットハッシュを表示します。
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| -------------------- | -------------- | ----------------------------------------------------- | | -------------------- | -------------- | -------------------------------------- |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. | | `commit_hash_length` | `7` | 表示されるgitコミットハッシュの長さです。 |
| `prefix` | `"("` | Prefix to display immediately before git commit. | | `prefix` | `"("` | このモジュールの先頭に表示される文字列です。 |
| `suffix` | `")"` | Suffix to display immediately after git commit. | | `suffix` | `")"` | このモジュールの末尾に表示される文字列です。 |
| `style` | `"bold green"` | モジュールのスタイルです。 | | `style` | `"bold green"` | モジュールのスタイルです。 |
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state | | `only_detached` | `true` | 切り離されたHEAD状態のときのみgit commit hashを表示します |
| `disabled` | `false` | Disables the `git_commit` module. | | `disabled` | `false` | `git_commit`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -530,27 +557,27 @@ The `git_commit` module shows the current commit hash of the repo in your curren
# ~/.config/starship.toml # ~/.config/starship.toml
[git_commit] [git_commit]
commit_hash_length = 4 truncation_length = 4
``` ```
## Git State ## 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)はその情報も表示されます。
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ------------------ | ------------------ | ---------------------------------------------------------------------------------------------------------------- | | ------------------ | ------------------ | -------------------------------------------------------- |
| `rebase` | `"REBASING"` | The text displayed when a `rebase` is in progress. | | `rebase` | `"REBASING"` | `rebase`進行中に表示されるテキストです。 |
| `merge` | `"MERGING"` | The text displayed when a `merge` is in progress. | | `merge` | `"MERGING"` | `merge`進行中に表示されるテキストです。 |
| `revert` | `"REVERTING"` | The text displayed when a `revert` is in progress. | | `revert` | `"REVERTING"` | `revert`進行中に表示されるテキストです。 |
| `cherry_pick` | `"CHERRY-PICKING"` | The text displayed when a `cherry-pick` is in progress. | | `cherry_pick` | `"CHERRY-PICKING"` | `cherry-pick`進行中に表示されるテキストです。 |
| `bisect` | `"BISECTING"` | The text displayed when a `bisect` is in progress. | | `bisect` | `"BISECTING"` | `disect`進行中に表示されるテキストです。 |
| `am` | `"AM"` | The text displayed when an `apply-mailbox` (`git am`) is in progress. | | `am` | `"AM"` | `apply-mailbox` (`git am`) の進行中に表示されるテキストです。 |
| `am_or_rebase` | `"AM/REBASE"` | The text displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. | | `am_or_rebase` | `"AM/REBASE"` | あいまいな`apply-mailbox`または`rebase`が進行中のときに表示されるテキストです。 |
| `progress_divider` | `"/"` | The symbol or text which will separate the current and total progress amounts. (e.g., `" of "`, for `"3 of 10"`) | | `progress_divider` | `"/"` | 現在の進行量と合計進行量を分ける記号またはテキストです。 (例: `" of "` `"3 of 10"`) |
| `style` | `"bold yellow"` | モジュールのスタイルです。 | | `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `git_state` module. | | `disabled` | `false` | `git_state`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -562,43 +589,43 @@ progress_divider = " of "
cherry_pick = "🍒 PICKING" cherry_pick = "🍒 PICKING"
``` ```
## Git Status ## Git の状態
The `git_status` module shows symbols representing the state of the repo in your current directory. `git_status`モジュールは、現在のディレクトリのリポジトリの状態を表すシンボルを表示します。
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ------------------ | -------------------------- | ------------------------------------------------------- | | ------------------ | -------------------------- | ------------------------------- |
| `conflicted` | `"="` | This branch has merge conflicts. | | `conflicted` | `"="` | このブランチにはマージの競合があります。 |
| `conflicted_count` | [link](#git-status-counts) | Show and style the number of conflicts. | | `conflicted_count` | [link](#git-status-counts) | 競合の数の表示およびスタイル設定します。 |
| `ahead` | `"⇡"` | This branch is ahead of the branch being tracked. | | `ahead` | `"⇡"` | このブランチは、追跡されるブランチよりも先にあります。 |
| `behind` | `"⇣"` | This branch is behind of the branch being tracked. | | `behind` | `"⇣"` | このブランチは、追跡されているブランチの背後にあります。 |
| `diverged` | `"⇕"` | This branch has diverged from the branch being tracked. | | `diverged` | `"⇕"` | このブランチは、追跡されているブランチから分岐しています。 |
| `untracked` | `"?"` | There are untracked files in the working directory. | | `untracked` | `"?"` | 作業ディレクトリに追跡されていないファイルがあります。 |
| `untracked_count` | [link](#git-status-counts) | Show and style the number of untracked files. | | `untracked_count` | [link](#git-status-counts) | 追跡されていないファイルの数を表示およびスタイル設定します。 |
| `stashed` | `"$"` | A stash exists for the local repository. | | `stashed` | `"$"` | ローカルリポジトリ用のスタッシュが存在します。 |
| `stashed_count` | [link](#git-status-counts) | Show and style the number of stashes. | | `stashed_count` | [link](#git-status-counts) | スタッシュの数の表示およびスタイル設定します。 |
| `modified` | `"!"` | There are file modifications in the working directory. | | `modified` | `"!"` | 作業ディレクトリにファイルの変更があります。 |
| `modified_count` | [link](#git-status-counts) | Show and style the number of modified files. | | `modified_count` | [link](#git-status-counts) | 変更されたファイルの数を表示およびスタイル設定します。 |
| `staged` | `"+"` | A new file has been added to the staging area. | | `staged` | `"+"` | 新しいファイルがステージング領域に追加されました。 |
| `staged_count` | [link](#git-status-counts) | Show and style the number of files staged files. | | `staged_count` | [link](#git-status-counts) | ステージングされたファイルの数を表示およびスタイル設定します。 |
| `renamed` | `"»"` | A renamed file has been added to the staging area. | | `renamed` | `"»"` | 名前が変更されたファイルがステージング領域に追加されました。 |
| `renamed_count` | [link](#git-status-counts) | Show and style the number of renamed files. | | `renamed_count` | [link](#git-status-counts) | 名前を変更したファイルの数を表示およびスタイル設定します。 |
| `deleted` | `"✘"` | A file's deletion has been added to the staging area. | | `deleted` | `"✘"` | ファイルの削除がステージング領域に追加されました。 |
| `deleted_count` | [link](#git-status-counts) | Show and style the number of deleted files. | | `deleted_count` | [link](#git-status-counts) | 削除されたファイルの数を表示およびスタイルします。 |
| `show_sync_count` | `false` | Show ahead/behind count of the branch being tracked. | | `show_sync_count` | `false` | 追跡されているブランチの先行/後方カウントを表示します。 |
| `prefix` | `[` | Prefix to display immediately before git status. | | `prefix` | `[` | このモジュールの先頭に表示される文字列です。 |
| `suffix` | `]` | Suffix to display immediately after git status. | | `suffix` | `]` | このモジュールの末尾に表示される文字列です。 |
| `style` | `"bold red"` | モジュールのスタイルです。 | | `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `git_status` module. | | `disabled` | `false` | `git_status`モジュールを無効にします。 |
#### Git Statusのカウント #### Git Statusのカウント
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| --------- | ------- | ------------------------------------------------------ | | --------- | ------- | --------------------------------- |
| `enabled` | `false` | Show the number of files | | `enabled` | `false` | ファイルの数を表示します。 |
| `style` | | Optionally style the count differently than the module | | `style` | | オプションで、モジュールとは異なるカウントのスタイルを設定します。 |
### 設定例 ### 設定例
@ -623,23 +650,24 @@ deleted = "🗑"
## Golang ## Golang
The `golang` module shows the currently installed version of Golang. 次の条件のいずれかが満たされると、モジュールが表示されます。 `golang`モジュールは、現在インストールされているGolangのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `go.mod` file - カレントディレクトリに`go.mod`ファイルが含まれている
- The current directory contains a `go.sum` file - カレントディレクトリに`go.sum`ファイルが含まれている
- The current directory contains a `glide.yaml` file - カレントディレクトリに`glide.yaml`ファイルが含まれている
- The current directory contains a `Gopkg.yml` file - カレントディレクトリに`Gopkg.yml`ファイルが含まれている
- The current directory contains a `Gopkg.lock` file - カレントディレクトリに`Gopkg.lock`ファイルが含まれている
- The current directory contains a `Godeps` directory - The current directory contains a `.go-version` file
- The current directory contains a file with the `.go` extension - カレントディレクトリに`Godeps`ファイルが含まれている
- カレントディレクトリに`.go`の拡張子のファイルが含まれている
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ---------- | ------------- | -------------------------------------------------------- | | ---------- | ------------- | ----------------------------- |
| `symbol` | `"🐹 "` | The symbol used before displaying the version of Golang. | | `symbol` | `"🐹 "` | Golangのバージョンを表示する前に使用される記号です。 |
| `style` | `"bold cyan"` | モジュールのスタイルです。 | | `style` | `"bold cyan"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `golang` module. | | `disabled` | `false` | `golang`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -653,7 +681,7 @@ symbol = "🏎💨 "
The `haskell` module shows the currently installed version of Haskell Stack version. 次の条件のいずれかが満たされると、モジュールが表示されます。 The `haskell` module shows the currently installed version of Haskell Stack version. 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `stack.yaml` file - カレントディレクトリに`stack.yaml`ファイルが含まれている
### オプション ### オプション
@ -703,18 +731,18 @@ disabled = false
## Java ## Java
The `java` module shows the currently installed version of Java. 次の条件のいずれかが満たされると、モジュールが表示されます。 `java`モジュールは、現在インストールされているJavaのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file - The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension - カレントディレクトリに拡張子が`.java`, `.class`, `.gradle`, もしくは`.jar`のファイルが含まれている
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ---------- | -------------- | ------------------------------------------------------ | | ---------- | -------------- | --------------------------- |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. | | `symbol` | `"☕ "` | Javaのバージョンを表示する前に使用される記号です。 |
| `style` | `"dimmed red"` | モジュールのスタイルです。 | | `style` | `"dimmed red"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `java` module. | | `disabled` | `false` | `Java`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -725,18 +753,18 @@ The `java` module shows the currently installed version of Java. 次の条件の
symbol = "🌟 " 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`に指定した値以上にジョブがある場合は実行中のジョブの数を表示します。
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ----------- | ------------- | ----------------------------------------------------- | | ----------- | ------------- | ---------------------- |
| `symbol` | `"✦"` | The symbol used before displaying the number of jobs. | | `symbol` | `"✦"` | ジョブの数を表示する前に使用される記号です。 |
| `threshold` | `1` | Show number of jobs if exceeded. | | `threshold` | `1` | 超過した場合、ジョブの数を表示します。 |
| `style` | `"bold blue"` | モジュールのスタイルです。 | | `style` | `"bold blue"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | `jobs`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -748,9 +776,33 @@ symbol = "+ "
threshold = 4 threshold = 4
``` ```
## Julia
The `julia` module shows the currently installed version of Julia. 次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `Project.toml` file
- The current directory contains a `Manifest.toml` file
- The current directory contains a file with the `.jl` extension
### オプション
| 変数 | デフォルト | 説明 |
| ---------- | --------------- | ------------------------------------------------------- |
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
| `style` | `"bold purple"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `julia` module. |
### 設定例
```toml
# ~/.config/starship.toml
[julia]
symbol = "👸 "
```
## Kubernetes ## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. 現在のKubernetesコンテキスト名と、設定されている場合は、kubeconfigファイルに基づいてネームスペースを表示します。 ネームスペースはkubconfigで設定されている必要があります。それは `kubectl config set-context starship-cluster --namespace astronaut` のようなコマンドで設定することができます。 `$KUBECONFIG` 環境変数が設定されている場合、モジュールはそれを使用します `~/.kube/config` は使用しません。
::: tip ::: tip
@ -760,11 +812,12 @@ Displays the current Kubernetes context name and, if set, the namespace from the
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ---------- | ------------- | --------------------------------------------------- | | ----------------- | ------------- | ----------------------------------- |
| `symbol` | `"☸ "` | The symbol used before displaying the Cluster info. | | `symbol` | `"☸ "` | クラスタ情報を表示する前に使用される記号です。 |
| `style` | `"bold blue"` | モジュールのスタイルです。 | | `context_aliases` | | Table of context aliases to display |
| `disabled` | `true` | Disables the `kubernetes` module | | `style` | `"bold blue"` | モジュールのスタイルです。 |
| `disabled` | `true` | `Kubernetes`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -775,17 +828,19 @@ Displays the current Kubernetes context name and, if set, the namespace from the
symbol = "⛵ " symbol = "⛵ "
style = "dimmed green" style = "dimmed green"
disabled = false disabled = false
[kubernetes.context_aliases]
"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行にします。 |
### 設定例 ### 設定例
@ -796,11 +851,11 @@ The `line_break` module separates the prompt into two lines.
disabled = true disabled = true
``` ```
## Memory Usage ## メモリ使用量
The `memory_usage` module shows current system memory and swap usage. `memory_usage`モジュールは、現在のシステムメモリとスワップ使用量を示します。
By default the swap usage is displayed if the total system swap is non-zero. デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。
::: tip ::: tip
@ -810,15 +865,15 @@ By default the swap usage is displayed if the total system swap is non-zero.
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ----------------- | --------------------- | ------------------------------------------------------------- | | ----------------- | --------------------- | ----------------------------- |
| `show_percentage` | `false` | Display memory usage as a percentage of the available memory. | | `show_percentage` | `false` | メモリ使用量を割合で表示します。 |
| `show_swap` | `true` | Display swap usage if total swap is non-zero. | | `show_swap` | `true` | 合計スワップがゼロ以外の場合、スワップ使用量を表示します。 |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | | `threshold` | `75` | この閾値を超えない限り、メモリ使用率は表示されません。 |
| `symbol` | `"🐏 "` | The symbol used before displaying the memory usage. | | `symbol` | `"🐏 "` | メモリ使用率を表示する前に使用される記号です。 |
| `separator` | `" | "` | The symbol or text that will seperate the ram and swap usage. | | `separator` | `" | "` | RAMとスワップの使用を分離する記号またはテキストです。 |
| `style` | `"bold dimmed white"` | モジュールのスタイルです。 | | `style` | `"bold dimmed white"` | モジュールのスタイルです。 |
| `disabled` | `true` | Disables the `memory_usage` module. | | `disabled` | `true` | `memory_usage`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -835,9 +890,9 @@ separator = "/"
style = "bold dimmed green" style = "bold dimmed green"
``` ```
## Mercurial Branch ## Mercurial ブランチ
The `hg_branch` module shows the active branch of the repo in your current directory. ` hg_branch `モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを示します。
### オプション ### オプション
@ -845,7 +900,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| ------------------- | --------------- | -------------------------------------------------------------------------------------------- | | ------------------- | --------------- | -------------------------------------------------------------------------------------------- |
| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | | `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | | `truncation_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` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 |
| `style` | `"bold purple"` | モジュールのスタイルです。 | | `style` | `"bold purple"` | モジュールのスタイルです。 |
| `disabled` | `true` | Disables the `hg_branch` module. | | `disabled` | `true` | Disables the `hg_branch` module. |
@ -862,17 +917,17 @@ truncation_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. `nix_shell`モジュールは、nix-shell環境を示しています。 このモジュールは、nixシェル環境内にあるときに表示されます。
### オプション ### オプション
| 変数 | デフォルト | 説明 | | 変数 | デフォルト | 説明 |
| ------------ | ------------ | ---------------------------------- | | ------------ | ------------ | ------------------------ |
| `use_name` | `false` | Display the name of the nix-shell. | | `use_name` | `false` | nix-shellの名前を表示します。 |
| `impure_msg` | `"impure"` | Customize the "impure" msg. | | `impure_msg` | `"impure"` | impureメッセージをカスタマイズします。 |
| `pure_msg` | `"pure"` | Customize the "pure" msg. | | `pure_msg` | `"pure"` | pureメッセージをカスタマイズします。 |
| `style` | `"bold red"` | モジュールのスタイルです。 | | `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `nix_shell` module. | | `disabled` | `false` | `nix_shell`モジュールを無効にします。 |
### 設定例 ### 設定例
@ -891,6 +946,7 @@ pure_msg = "pure shell"
`nodejs`モジュールは、現在インストールされているNodeJSのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。 `nodejs`モジュールは、現在インストールされているNodeJSのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`package.json`ファイルが含まれている - カレントディレクトリに`package.json`ファイルが含まれている
- The current directory contains a `.node-version` file
- カレントディレクトリに`node_modules`ディレクトリが含まれている - カレントディレクトリに`node_modules`ディレクトリが含まれている
- カレントディレクトリに`.js`の拡張子のファイルが含まれている - カレントディレクトリに`.js`の拡張子のファイルが含まれている
@ -920,6 +976,7 @@ symbol = "🤖 "
- **poetry** `poetry`パッケージバージョンは、現在のディレクトリにある`pyproject.toml`から抽出されます - **poetry** `poetry`パッケージバージョンは、現在のディレクトリにある`pyproject.toml`から抽出されます
- **composer** `composer`パッケージバージョンは、現在のディレクトリにある`composer.json`から抽出されます - **composer** `composer`パッケージバージョンは、現在のディレクトリにある`composer.json`から抽出されます
- **gradle** The `gradle` package version is extracted from the `build.gradle` present - **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
> ⚠️ 表示されるバージョンは、パッケージマネージャーではなく、ソースコードが現在のディレクトリにあるパッケージのバージョンです。 > ⚠️ 表示されるバージョンは、パッケージマネージャーではなく、ソースコードが現在のディレクトリにあるパッケージのバージョンです。
@ -945,6 +1002,7 @@ symbol = "🎁 "
`php`モジュールは、現在インストールされているPHPのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。 `php`モジュールは、現在インストールされているPHPのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`composer.json`ファイルが含まれている - カレントディレクトリに`composer.json`ファイルが含まれている
- The current directory contains a `.php-version` file
- カレントディレクトリに`.php`の拡張子のファイルが含まれている - カレントディレクトリに`.php`の拡張子のファイルが含まれている
### オプション ### オプション
@ -1008,6 +1066,7 @@ pyenv_prefix = "foo "
`ruby`モジュールは、現在インストールされているRubyのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。 `ruby`モジュールは、現在インストールされているRubyのバージョンを示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`Gemfile`ファイルが含まれている - カレントディレクトリに`Gemfile`ファイルが含まれている
- The current directory contains a `.ruby-version` file
- カレントディレクトリに`.rb`の拡張子のファイルが含まれている - カレントディレクトリに`.rb`の拡張子のファイルが含まれている
### オプション ### オプション

View File

@ -220,9 +220,37 @@
もしあなたが Starship への貢献に興味がある場合は、我々の[貢献ガイド](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)をご覧ください。 また、気軽に我々の[Discord サーバー](https://discord.gg/8Jzqu3T)へ顔を出してください。 👋 もしあなたが Starship への貢献に興味がある場合は、我々の[貢献ガイド](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)をご覧ください。 また、気軽に我々の[Discord サーバー](https://discord.gg/8Jzqu3T)へ顔を出してください。 👋
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
#### Individuals
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/2/website"><img src="https://opencollective.com/starship/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/3/website"><img src="https://opencollective.com/starship/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/4/website"><img src="https://opencollective.com/starship/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/5/website"><img src="https://opencollective.com/starship/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/6/website"><img src="https://opencollective.com/starship/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/7/website"><img src="https://opencollective.com/starship/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
## 💭影響を受けたプロダクト ## 💭影響を受けたプロダクト
よければStarship の作成に影響を与えた、これまでのプロジェクトをチェックしてください 🙏 Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 宇宙飛行士のための ZSH プロンプト。 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 宇宙飛行士のための ZSH プロンプト。
@ -237,4 +265,4 @@
## 📝 ライセンス ## 📝 ライセンス
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> このプロジェクトは [ISC](https://github.com/starship/starship/blob/master/LICENSE) でライセンスされています。 Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.

View File

@ -98,6 +98,7 @@ prompt_order = [
"git_state", "git_state",
"git_status", "git_status",
"hg_branch", "hg_branch",
"docker_context",
"package", "package",
"dotnet", "dotnet",
"elixir", "elixir",
@ -105,6 +106,7 @@ prompt_order = [
"golang", "golang",
"haskell", "haskell",
"java", "java",
"julia",
"nodejs", "nodejs",
"php", "php",
"python", "python",
@ -130,6 +132,8 @@ prompt_order = [
Модуль `aws` показывает текущий регион и профиль AWS. Основано на `AWS_REGION`, `AWS_DEFAULT_REGION`, и `AWS_PROFILE` переменных окружения и файле`~/.aws/config`. Модуль `aws` показывает текущий регион и профиль AWS. Основано на `AWS_REGION`, `AWS_DEFAULT_REGION`, и `AWS_PROFILE` переменных окружения и файле`~/.aws/config`.
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
@ -316,18 +320,18 @@ style = "dimmed green"
## Crystal ## Crystal
The `crystal` module shows the currently installed version of Crystal. Модуль будет показан, если любое из следующих условий соблюдено: Модуль `crystal` показывает установленную версию Crystal. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `shard.yml` file - Текущий каталог содержит файл `shard.yml`
- The current directory contains a `.cr` file - Текущий каталог содержит файл `.cr`
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ---------- | ------------ | --------------------------------------------------------- | | ---------- | ------------ | ------------------------------------------------------- |
| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | | `symbol` | `"🔮 "` | Символ, используемый перед отображением версии crystal. |
| `style` | `"bold red"` | Стиль модуля. | | `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `crystal` module. | | `disabled` | `false` | Отключает модуль `crystal`. |
### Пример ### Пример
@ -339,31 +343,31 @@ symbol = "✨ "
style = "bold blue" style = "bold blue"
``` ```
## 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` является корневым репозиторием, и в опции установлено `1`. Вы увидите `~/D/N/nixpkgs/pkgs`, а до этого было бы `nixpkgs/pkgs`.
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ------------------- | ------------- | -------------------------------------------------------------------------------- | | ------------------- | ------------- | ---------------------------------------------------------------------------- |
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | | `truncation_length` | `3` | Количество родительских папок, к которым должен быть усечен текущий каталог. |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | | `truncate_to_repo` | `true` | Следует или нет обрезать до корня репозитория git, в котором вы находитесь. |
| `prefix` | `"in "` | Prefix to display immediately before the directory. | | `prefix` | `"in "` | Префикс, отображаемый перед папкой. |
| `style` | `"bold cyan"` | Стиль модуля. | | `style` | `"bold cyan"` | Стиль модуля. |
| `disabled` | `false` | Disables the `directory` module. | | `disabled` | `false` | Отключает модуль `directory`. |
<details> <details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary> <summary>Этот модуль имеет несколько расширенных опций конфигурации, которые контролируют отображение каталога.</summary>
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------- | | --------------------------- | ------------ | --------------------------------------------------------------------------------- |
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | | `fish_style_pwd_dir_length` | `0` | Количество символов, используемых при использовании логики создания пути из fish. |
| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | | `use_logical_path` | `true` | Отображает логический путь от оболочки (`PWD`) вместо пути от ОС. |
`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`. `fish_style_pwd_dir_length` 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`.
@ -378,22 +382,44 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
truncation_length = 8 truncation_length = 8
``` ```
## Dotnet ## Docker Context
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. 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`.
This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly.
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.
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ----------- | ------------- | -------------------------------------------------------- | | ----------------- | ------------- | --------------------------------------------------------------------------------------- |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | | `symbol` | `"🐳 "` | The symbol used before displaying the Docker context . |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. | | `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
| `style` | `"bold blue"` | Стиль модуля. | | `style` | `"bold blue"` | Стиль модуля. |
| `disabled` | `false` | Disables the `dotnet` module. | | `disabled` | `true` | Disables the `docker_context` module. |
### Пример
```toml
# ~/.config/starship.toml
[docker_context]
symbol = "🐋 "
```
## Dotnet
Модуль `dotnet` показывает соответствующую версию .NET Core SDK для текущего каталога. Если SDK был закреплен в текущей директории, будет показана закрепленная версия. В противном случае модуль отображает последнюю установленную версию SDK.
Этот модуль будет показан только, когда один из следующих файлов присутствует в текущей директории: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. Также, для правильного использования, нужны инструменты командной строки .NET Core.
Внутренне этот модуль использует свой собственный механизм определения версий. Обычно он в два раза быстрее, чем `dotnet --version`, но он может показывать неправильную версию, если ваш .NET проект имеет необычный формат каталога. Если точность важнее, чем скорость, вы можете отключить механизм опцией `heuristic = false` в настройках модуля.
### Опции
| Переменная | По умолчанию | Описание |
| ----------- | ------------- | ----------------------------------------------------------------- |
| `symbol` | `"•NET "` | Символ перед отображением текущей версии dotnet. |
| `heuristic` | `true` | Использовать быстрое определение версии, для сохранения скорости. |
| `style` | `"bold blue"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `dotnet`. |
### Пример ### Пример
@ -410,7 +436,7 @@ heuristic = false
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. Модуль будет показан, если любое из следующих условий соблюдено: The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `mix.exs` file. - Текущий каталог содержит файл `mix.exs`.
### Опции ### Опции
@ -432,8 +458,9 @@ symbol = "🔮 "
The `elm` module shows the currently installed version of Elm. Модуль будет показан, если любое из следующих условий соблюдено: The `elm` module shows the currently installed version of Elm. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `elm.json` file - Текущий каталог содержит файл `elm.json`
- The current directory contains a `elm-package.json` file - Текущий каталог содержит файл `elm-package.json`
- The current directory contains a `.elm-version` file
- The current directory contains a `elm-stuff` folder - The current directory contains a `elm-stuff` folder
- The current directory contains a `*.elm` files - The current directory contains a `*.elm` files
@ -455,24 +482,24 @@ The `elm` module shows the currently installed version of Elm. Модуль бу
symbol = " " symbol = " "
``` ```
## Environment Variable ## Переменная Окружения
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met: Модуль `env_var` отображает текущее значение выбранной переменной окружения. Модуль будет показан только в том случае, если любое из следующих условий соблюдено:
- The `variable` configuration option matches an existing environment variable - Опция `variable` соответствует существующей переменной среды
- The `variable` configuration option is not defined, but the `default` configuration option is - Опция `variable` не определена, но определена опция `default`
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ---------- | ---------------- | ---------------------------------------------------------------------------- | | ---------- | ---------------- | ------------------------------------------------------------------ |
| `symbol` | | The symbol used before displaying the variable value. | | `symbol` | | Символ, используемый перед отображением значения переменной. |
| `variable` | | The environment variable to be displayed. | | `variable` | | Отображаемая переменная окружения. |
| `default` | | The default value to be displayed when the selected variable is not defined. | | `default` | | Значение отображаемое, когда выбранная переменная не определена. |
| `prefix` | `""` | Prefix to display immediately before the variable value. | | `prefix` | `""` | Префикс, отображаемый, непосредственно перед значением переменной. |
| `suffix` | `""` | Suffix to display immediately after the variable value. | | `suffix` | `""` | Префикс, отображаемый, непосредственно после значением переменной. |
| `style` | `"dimmed black"` | Стиль модуля. | | `style` | `"dimmed black"` | Стиль модуля. |
| `disabled` | `false` | Disables the `env_var` module. | | `disabled` | `false` | Отключает модуль `env_var`. |
### Пример ### Пример
@ -484,19 +511,19 @@ variable = "SHELL"
default = "unknown shell" default = "unknown shell"
``` ```
## Git Branch ## Ветвь Git
The `git_branch` module shows the active branch of the repo in your current directory. Модуль `git_branch` показывает активную ветку репозитория в вашем текущей директории.
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ------------------- | --------------- | ------------------------------------------------------------------------------------- | | ------------------- | --------------- | --------------------------------------------------------------------------------------------------------------- |
| `symbol` | `" "` | The symbol used before the branch name of the repo in your current directory. | | `symbol` | `" "` | Символ, используемый перед именем ветки репозитория в вашей текущей директории. |
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes | | `truncation_length` | `2^63 - 1` | Отрезает ветку git до X графемов |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use "" for no symbol | | `truncation_symbol` | `"…"` | Символ, используемый для обозначения усечения названия ветки. Вы можете использовать "", чтобы не видеть символ |
| `style` | `"bold purple"` | Стиль модуля. | | `style` | `"bold purple"` | Стиль модуля. |
| `disabled` | `false` | Disables the `git_branch` module. | | `disabled` | `false` | Отключает модуль `git_branch`. |
### Пример ### Пример
@ -509,20 +536,20 @@ truncation_length = 4
truncation_symbol = "" truncation_symbol = ""
``` ```
## Git Commit ## Коммит Git
The `git_commit` module shows the current commit hash of the repo in your current directory. Модуль `git_commit` показывает хэш текущего коммита репозитория в вашем текущем каталоге.
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| -------------------- | -------------- | ----------------------------------------------------- | | -------------------- | -------------- | ----------------------------------------------------- |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. | | `commit_hash_length` | `7` | Длина отображаемого хэша коммита git. |
| `prefix` | `"("` | Prefix to display immediately before git commit. | | `prefix` | `"("` | Префикс, отображаемый сразу после коммита. |
| `suffix` | `")"` | Suffix to display immediately after git commit. | | `suffix` | `")"` | Суффикс, отображаемый сразу после коммита git. |
| `style` | `"bold green"` | Стиль модуля. | | `style` | `"bold green"` | Стиль модуля. |
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state | | `only_detached` | `true` | Only show git commit hash when in detached HEAD state |
| `disabled` | `false` | Disables the `git_commit` module. | | `disabled` | `false` | Отключает модуль `git_commit`. |
### Пример ### Пример
@ -533,24 +560,24 @@ The `git_commit` module shows the current commit hash of the repo in your curren
commit_hash_length = 4 commit_hash_length = 4
``` ```
## Git State ## Состояние 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), эта информация также будет показана.
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ------------------ | ------------------ | ---------------------------------------------------------------------------------------------------------------- | | ------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------- |
| `rebase` | `"REBASING"` | The text displayed when a `rebase` is in progress. | | `rebase` | `"REBASING"` | Текст, отображаемый в процессе операции `rebase`. |
| `merge` | `"MERGING"` | The text displayed when a `merge` is in progress. | | `merge` | `"MERGING"` | Текст, отображаемый в процессе операции `merge`. |
| `revert` | `"REVERTING"` | The text displayed when a `revert` is in progress. | | `revert` | `"REVERTING"` | Текст, отображаемый в процессе операции `revert`. |
| `cherry_pick` | `"CHERRY-PICKING"` | The text displayed when a `cherry-pick` is in progress. | | `cherry_pick` | `"CHERRY-PICKING"` | Текст, отображаемый в процессе операции `cherry-pick`. |
| `bisect` | `"BISECTING"` | The text displayed when a `bisect` is in progress. | | `bisect` | `"BISECTING"` | Текст, отображаемый в процессе операции `bisect`. |
| `am` | `"AM"` | The text displayed when an `apply-mailbox` (`git am`) is in progress. | | `am` | `"AM"` | Текст, отображаемый в процессе операции `apply-mailbox` (`git am`). |
| `am_or_rebase` | `"AM/REBASE"` | The text displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. | | `am_or_rebase` | `"AM/REBASE"` | Текст, отображаемый, когда выполняется неоднозначный процесс `apply-mailbox` или `rebase`. |
| `progress_divider` | `"/"` | The symbol or text which will separate the current and total progress amounts. (e.g., `" of "`, for `"3 of 10"`) | | `progress_divider` | `"/"` | Символ или текст, который будет разделять текущую и общую сумму прогресса. (напр., `" из "`, для `"3 из 10"`) |
| `style` | `"bold yellow"` | Стиль модуля. | | `style` | `"bold yellow"` | Стиль модуля. |
| `disabled` | `false` | Disables the `git_state` module. | | `disabled` | `false` | Отключает модуль `git_state`. |
### Пример ### Пример
@ -562,43 +589,43 @@ progress_divider = " of "
cherry_pick = "🍒 PICKING" cherry_pick = "🍒 PICKING"
``` ```
## Git Status ## Статус Git
The `git_status` module shows symbols representing the state of the repo in your current directory. Модуль `git_status` отображает символы, представляющие состояние репозитория в вашей текущей директории.
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ------------------ | ---------------------------- | ------------------------------------------------------- | | ------------------ | ---------------------------- | ---------------------------------------------------------------- |
| `conflicted` | `"="` | This branch has merge conflicts. | | `conflicted` | `"="` | Эта ветка имеет конфликты слияния. |
| `conflicted_count` | [ссылка](#git-status-counts) | Show and style the number of conflicts. | | `conflicted_count` | [ссылка](#git-status-counts) | Оформленно показывать количество конфликтов. |
| `ahead` | `"⇡"` | This branch is ahead of the branch being tracked. | | `ahead` | `"⇡"` | Эта ветка впереди отслеживаемой ветви. |
| `behind` | `"⇣"` | This branch is behind of the branch being tracked. | | `behind` | `"⇣"` | Эта ветка позади отслеживаемой ветви. |
| `diverged` | `"⇕"` | This branch has diverged from the branch being tracked. | | `diverged` | `"⇕"` | Эта ветка расходится от отслеживаемой ветки. |
| `untracked` | `"?"` | There are untracked files in the working directory. | | `untracked` | `"?"` | В рабочей директории есть неотслеженные файлы. |
| `untracked_count` | [ссылка](#git-status-counts) | Show and style the number of untracked files. | | `untracked_count` | [ссылка](#git-status-counts) | Показывать в стиле количество неотслеженных файлов. |
| `stashed` | `"$"` | A stash exists for the local repository. | | `stashed` | `"$"` | Для локального репозитория существует тайник. |
| `stashed_count` | [ссылка](#git-status-counts) | Show and style the number of stashes. | | `stashed_count` | [ссылка](#git-status-counts) | Оформленно показывать количество тайников. |
| `modified` | `"!"` | There are file modifications in the working directory. | | `modified` | `"!"` | В рабочем директории есть изменения файлов. |
| `modified_count` | [ссылка](#git-status-counts) | Show and style the number of modified files. | | `modified_count` | [ссылка](#git-status-counts) | Оформленно показывать количество измененных файлов. |
| `staged` | `"+"` | A new file has been added to the staging area. | | `staged` | `"+"` | В промежуточную область добавлен новый файл. |
| `staged_count` | [ссылка](#git-status-counts) | Show and style the number of files staged files. | | `staged_count` | [ссылка](#git-status-counts) | Оформленно показывать количество файлов в промежуточной области. |
| `renamed` | `"»"` | A renamed file has been added to the staging area. | | `renamed` | `"»"` | В промежуточную область добавлен переименованный файл. |
| `renamed_count` | [ссылка](#git-status-counts) | Show and style the number of renamed files. | | `renamed_count` | [ссылка](#git-status-counts) | Оформленно показывать количество переименованных файлов. |
| `deleted` | `"✘"` | A file's deletion has been added to the staging area. | | `deleted` | `"✘"` | Удаление файла было добавлено в промежуточную область. |
| `deleted_count` | [ссылка](#git-status-counts) | Show and style the number of deleted files. | | `deleted_count` | [ссылка](#git-status-counts) | Оформленно показывать количество удаленных файлов. |
| `show_sync_count` | `false` | Show ahead/behind count of the branch being tracked. | | `show_sync_count` | `false` | Показывать счетчик впереди/позади для отслеживаемой ветки. |
| `prefix` | `[` | Prefix to display immediately before git status. | | `prefix` | `[` | Префикс для отображения сразу перед статусом git. |
| `suffix` | `]` | Suffix to display immediately after git status. | | `suffix` | `]` | Суффикс, отображаемый сразу после статуса git. |
| `style` | `"bold red"` | Стиль модуля. | | `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `git_status` module. | | `disabled` | `false` | Отключает модуль `git_status`. |
#### Счетчик статуса Git #### Счетчик статуса Git
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ---------- | ------------ | ------------------------------------------------------ | | ---------- | ------------ | ------------------------------------------------------- |
| `enabled` | `false` | Show the number of files | | `enabled` | `false` | Показать количество файлов |
| `style` | | Optionally style the count differently than the module | | `style` | | При желании, можно оформлять счетчик не так, как модуль |
### Пример ### Пример
@ -623,23 +650,24 @@ deleted = "🗑"
## Golang ## Golang
The `golang` module shows the currently installed version of Golang. Модуль будет показан, если любое из следующих условий соблюдено: Модуль `golang` показывает установленную версию Golang. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `go.mod` file - Текущий каталог содержит файл `go.mod`
- The current directory contains a `go.sum` file - Текущий каталог содержит файл `go.sum`
- The current directory contains a `glide.yaml` file - Текущий каталог содержит файл `glide.yaml`
- The current directory contains a `Gopkg.yml` file - Текущий каталог содержит файл `Gopkg.yml`
- The current directory contains a `Gopkg.lock` file - Текущий каталог содержит файл `Gopkg.lock`
- The current directory contains a `Godeps` directory - The current directory contains a `.go-version` file
- The current directory contains a file with the `.go` extension - Текущий каталог содержит папку `Godeps`
- Текущий каталог содержит файл с расширением `.go`
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ---------- | ------------- | -------------------------------------------------------- | | ---------- | ------------- | ------------------------------------------------------ |
| `symbol` | `"🐹 "` | The symbol used before displaying the version of Golang. | | `symbol` | `"🐹 "` | Символ, используемый перед отображением версии Golang. |
| `style` | `"bold cyan"` | Стиль модуля. | | `style` | `"bold cyan"` | Стиль модуля. |
| `disabled` | `false` | Disables the `golang` module. | | `disabled` | `false` | Отключает модуль `golang`. |
### Пример ### Пример
@ -651,17 +679,17 @@ symbol = "🏎💨 "
``` ```
## Haskell ## Haskell
The `haskell` module shows the currently installed version of Haskell Stack version. Модуль будет показан, если любое из следующих условий соблюдено: Модуль `haskell` показывает установленную версию Haskell Stack. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `stack.yaml` file - Текущий каталог содержит файл `stack.yaml`
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ---------- | ------------ | --------------------------------------------------------- | | ---------- | ------------ | ------------------------------------------------- |
| `symbol` | `"λ "` | The symbol used before displaying the version of Haskell. | | `symbol` | `"λ "` | Символ перед отображением текущей версии Haskell. |
| `style` | `"bold red"` | Стиль модуля. | | `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `haskell` module. | | `disabled` | `false` | Отключает модуль `haskell`. |
### Пример ### Пример
@ -703,18 +731,18 @@ disabled = false
## Java ## Java
The `java` module shows the currently installed version of Java. Модуль будет показан, если любое из следующих условий соблюдено: Модуль `java` показывает установленную версию Java. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file - The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension - The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ---------- | -------------- | ------------------------------------------------------ | | ---------- | -------------- | ---------------------------------------------------- |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. | | `symbol` | `"☕ "` | Символ, используемый перед отображением версии Java. |
| `style` | `"dimmed red"` | Стиль модуля. | | `style` | `"dimmed red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `java` module. | | `disabled` | `false` | Отключает модуль `java`. |
### Пример ### Пример
@ -725,18 +753,18 @@ The `java` module shows the currently installed version of Java. Модуль б
symbol = "🌟 " 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`, если оно существует.
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ----------- | ------------- | ----------------------------------------------------- | | ----------- | ------------- | --------------------------------------------------------- |
| `symbol` | `"✦"` | The symbol used before displaying the number of jobs. | | `symbol` | `"✦"` | Символ, используемый перед отображением количества задач. |
| `threshold` | `1` | Show number of jobs if exceeded. | | `threshold` | `1` | Показывать количество задач, если превышено. |
| `style` | `"bold blue"` | Стиль модуля. | | `style` | `"bold blue"` | Стиль модуля. |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | Отключает модуль `jobs`. |
### Пример ### Пример
@ -748,9 +776,33 @@ symbol = "+ "
threshold = 4 threshold = 4
``` ```
## Julia
The `julia` module shows the currently installed version of Julia. Модуль будет показан, если любое из следующих условий соблюдено:
- The current directory contains a `Project.toml` file
- The current directory contains a `Manifest.toml` file
- The current directory contains a file with the `.jl` extension
### Опции
| Переменная | По умолчанию | Описание |
| ---------- | --------------- | ------------------------------------------------------- |
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
| `style` | `"bold purple"` | Стиль модуля. |
| `disabled` | `false` | Disables the `julia` module. |
### Пример
```toml
# ~/.config/starship.toml
[julia]
symbol = "👸 "
```
## Kubernetes ## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. Отображает текущее контекстное имя Kubernetes и, если применено, пространство имён из файла kubeconfig. Пространство имен дожно быть задано в файле kubeconfig, это делается через `kubectl config set-context starship-cluster --namespace astronaut`. Если переменная окружения `$KUBECONFIG` установлена, модуль будет использовать это, в противном случае будет использовать `~/.kube/config`.
::: tip Подсказка ::: tip Подсказка
@ -760,11 +812,12 @@ Displays the current Kubernetes context name and, if set, the namespace from the
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ---------- | ------------- | --------------------------------------------------- | | ----------------- | ------------- | ------------------------------------------------------------- |
| `symbol` | `"☸ "` | The symbol used before displaying the Cluster info. | | `symbol` | `"☸ "` | Символ, используемый перед отображением информации о Cluster. |
| `style` | `"bold blue"` | Стиль модуля. | | `context_aliases` | | Table of context aliases to display |
| `disabled` | `true` | Disables the `kubernetes` module | | `style` | `"bold blue"` | Стиль модуля. |
| `disabled` | `true` | Отключает модуль `kubernetes` |
### Пример ### Пример
@ -775,17 +828,19 @@ Displays the current Kubernetes context name and, if set, the namespace from the
symbol = "⛵ " symbol = "⛵ "
style = "dimmed green" style = "dimmed green"
disabled = false disabled = false
[kubernetes.context_aliases]
"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`, отображая командную строку в одну строку. |
### Пример ### Пример
@ -796,11 +851,11 @@ The `line_break` module separates the prompt into two lines.
disabled = true disabled = true
``` ```
## Memory Usage ## Использование памяти
The `memory_usage` module shows current system memory and swap usage. Модуль `memory_usage` отображает текущую системную память и использование подкачки.
By default the swap usage is displayed if the total system swap is non-zero. По умолчанию использование подкачки отображается, если общая сумма подкачки системы не равна нулю.
::: tip Подсказка ::: tip Подсказка
@ -810,15 +865,15 @@ By default the swap usage is displayed if the total system swap is non-zero.
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ----------------- | --------------------- | ------------------------------------------------------------- | | ----------------- | --------------------- | --------------------------------------------------------------------------- |
| `show_percentage` | `false` | Display memory usage as a percentage of the available memory. | | `show_percentage` | `false` | Отображать использование памяти в процентах от доступной памяти. |
| `show_swap` | `true` | Display swap usage if total swap is non-zero. | | `show_swap` | `true` | Отображать использование подкачки, если общая сумма подкачки не равна нулю. |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | | `threshold` | `75` | Скрывать использование памяти, если она не превышает этот процент. |
| `symbol` | `"🐏 "` | The symbol used before displaying the memory usage. | | `symbol` | `"🐏 "` | Символ, используемый перед отображением использования памяти. |
| `separator` | `" | "` | The symbol or text that will seperate the ram and swap usage. | | `separator` | `" | "` | Символ или текст, который отделит использование памяти и подкачки. |
| `style` | `"bold dimmed white"` | Стиль модуля. | | `style` | `"bold dimmed white"` | Стиль модуля. |
| `disabled` | `true` | Disables the `memory_usage` module. | | `disabled` | `true` | Отключает модуль `memory_usage`. |
### Пример ### Пример
@ -835,19 +890,19 @@ separator = "/"
style = "bold dimmed green" 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 или именем ветки репозитория в текущем каталоге. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | | `truncation_length` | `2^63 - 1` | Обрезает имя ветки hg до X графемов |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | | `truncation_symbol` | `"…"` | Символ, используемый для обозначения усечения названия ветки. |
| `style` | `"bold purple"` | Стиль модуля. | | `style` | `"bold purple"` | Стиль модуля. |
| `disabled` | `true` | Disables the `hg_branch` module. | | `disabled` | `true` | Отключает модуль `hg_branch`. |
### Пример ### Пример
@ -862,17 +917,17 @@ truncation_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. Модуль `nix_shell` показывает окружение nix-shell. Модуль будет показываться внутри среды nix-shell.
### Опции ### Опции
| Переменная | По умолчанию | Описание | | Переменная | По умолчанию | Описание |
| ------------ | ------------ | ---------------------------------- | | ------------ | ------------ | ----------------------------- |
| `use_name` | `false` | Display the name of the nix-shell. | | `use_name` | `false` | Отображать имя nix-shell. |
| `impure_msg` | `"impure"` | Customize the "impure" msg. | | `impure_msg` | `"impure"` | Настройте сообщение "impure". |
| `pure_msg` | `"pure"` | Customize the "pure" msg. | | `pure_msg` | `"pure"` | Настройте сообщение "pure". |
| `style` | `"bold red"` | Стиль модуля. | | `style` | `"bold red"` | Стиль модуля. |
| `disabled` | `false` | Disables the `nix_shell` module. | | `disabled` | `false` | Отключает модуль `nix_shell`. |
### Пример ### Пример
@ -891,6 +946,7 @@ pure_msg = "pure shell"
Модуль `nodejs` показывает установленную версию NodeJS. Модуль будет показан, если любое из следующих условий соблюдено: Модуль `nodejs` показывает установленную версию NodeJS. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий каталог содержит файл `package.json` - Текущий каталог содержит файл `package.json`
- The current directory contains a `.node-version` file
- Текущий каталог содержит каталог `node_modules` - Текущий каталог содержит каталог `node_modules`
- Текущий каталог содержит файл с расширением `.js` - Текущий каталог содержит файл с расширением `.js`
@ -920,6 +976,7 @@ symbol = "🤖 "
- **poetry** Версия пакета `poetry` из файла `pyproject.toml` в текущем каталоге - **poetry** Версия пакета `poetry` из файла `pyproject.toml` в текущем каталоге
- **composer** Версия пакета `composer` из `composer.json` в текущем каталоге - **composer** Версия пакета `composer` из `composer.json` в текущем каталоге
- **gradle** Версия пакета `gradle` извлечена из `build.gradle` - **gradle** Версия пакета `gradle` извлечена из `build.gradle`
- **julia** - The package version is extracted from the `Project.toml` present
> ⚠ Показана версия пакета, исходный код которого находится в текущем каталоге, а не в менеджере пакетов. > ⚠ Показана версия пакета, исходный код которого находится в текущем каталоге, а не в менеджере пакетов.
@ -945,6 +1002,7 @@ symbol = "🎁 "
Модуль `php` показывает установленную версию PHP. Модуль будет показан, если любое из следующих условий соблюдено: Модуль `php` показывает установленную версию PHP. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий каталог содержит файл `composer.json` - Текущий каталог содержит файл `composer.json`
- The current directory contains a `.php-version` file
- Текущий каталог содержит файл `.php` - Текущий каталог содержит файл `.php`
### Опции ### Опции
@ -968,7 +1026,7 @@ symbol = "🔹 "
Модуль `python` показывает установленную версию Python. Модуль `python` показывает установленную версию Python.
Если переменной `pyenv_version_name` установлено значение `true`, на экране появится версия pyenv. Если `pyenv_version_name` установлено значение `true`, на экране появится имя версии pyenv.
Иначе на экране будет показан номер версии из `python --version` и будет отображено текущее виртуального окружения Python, если активировано. Иначе на экране будет показан номер версии из `python --version` и будет отображено текущее виртуального окружения Python, если активировано.
@ -1008,6 +1066,7 @@ pyenv_prefix = "foo "
Модуль `ruby` показывает установленную версию Ruby. Модуль будет показан, если любое из следующих условий соблюдено: Модуль `ruby` показывает установленную версию Ruby. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий каталог содержит файл `Gemfile` - Текущий каталог содержит файл `Gemfile`
- The current directory contains a `.ruby-version` file
- Текущий каталог содержит файл `.rb` - Текущий каталог содержит файл `.rb`
### Опции ### Опции
@ -1137,7 +1196,7 @@ utc_time_offset = "-5"
## Имя пользователя ## Имя пользователя
Модуль `username` показывает имя активного пользователя. Модуль будет показан, если любое из следующих условий соблюдено: Модуль `username` показывает имя текущего пользователя. Модуль будет показан, если любое из следующих условий соблюдено:
- Текущий пользователь - root - Текущий пользователь - root
- Текущий пользователь отличается от залогиненного - Текущий пользователь отличается от залогиненного

View File

@ -220,9 +220,37 @@
Если вы хотите помочь в создании Starship, пожалуйста, ознакомьтесь с нашим [Руководством по содействию](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Кроме того, заходите на наш [Discord сервер](https://discord.gg/8Jzqu3T) и поздоровайтесь. 👋 Если вы хотите помочь в создании Starship, пожалуйста, ознакомьтесь с нашим [Руководством по содействию](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Кроме того, заходите на наш [Discord сервер](https://discord.gg/8Jzqu3T) и поздоровайтесь. 👋
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
#### Individuals
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/2/website"><img src="https://opencollective.com/starship/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/3/website"><img src="https://opencollective.com/starship/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/4/website"><img src="https://opencollective.com/starship/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/5/website"><img src="https://opencollective.com/starship/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/6/website"><img src="https://opencollective.com/starship/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/7/website"><img src="https://opencollective.com/starship/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
## 💭 Вдохновления ## 💭 Вдохновления
Пожалуйста, ознакомьтесь с этими предыдущими работами, которые помогли вдохновить создание Starship. 🙏 Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - командная строка ZSH для астронавтов. - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - командная строка ZSH для астронавтов.
@ -232,9 +260,9 @@
<p align="center"> <p align="center">
<br> <br>
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Иконка ракеты Starship"> <img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
</p> </p>
## 📝 Лицензия ## 📝 Лицензия
Авторское право © 2019-настоящее, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> Этот проект лицензирован под лицензией [ISC](https://github.com/starship/starship/blob/master/LICENSE). Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.

View File

@ -98,6 +98,7 @@ prompt_order = [
"git_state", "git_state",
"git_status", "git_status",
"hg_branch", "hg_branch",
"docker_context",
"package", "package",
"dotnet", "dotnet",
"elixir", "elixir",
@ -105,6 +106,7 @@ prompt_order = [
"golang", "golang",
"haskell", "haskell",
"java", "java",
"julia",
"nodejs", "nodejs",
"php", "php",
"python", "python",
@ -130,6 +132,8 @@ prompt_order = [
`aws` 组件显示当前 AWS 主机所在区域与配置信息。 各组件基于 `AWS_REGION``AWS_DEFAULT_REGION` 和 `AWS_PROFILE` 环境变量与 `~/.aws/config` 文件。 `aws` 组件显示当前 AWS 主机所在区域与配置信息。 各组件基于 `AWS_REGION``AWS_DEFAULT_REGION` 和 `AWS_PROFILE` 环境变量与 `~/.aws/config` 文件。
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
@ -193,7 +197,7 @@ discharging_symbol = "💀"
### Battery 组件的显示 ### Battery 组件的显示
`display` 选项用于定义电池指示器的显示阈值threshold和显示效果style。 如果 `display` 没有设置, 默认配置如下所示 `display` 选项用于定义电池指示器的显示阈值threshold和显示效果style。 如果 `display` 没有设置, 默认设置如下
```toml ```toml
[[battery.display]] [[battery.display]]
@ -316,9 +320,9 @@ style = "dimmed green"
## Crystal ## Crystal
The `crystal` module shows the currently installed version of Crystal. 此组件只有满足以下条件之一时才会被显示: The `crystal` module shows the currently installed version of Crystal. 此组件将在符合以下任意条件时显示:
- The current directory contains a `shard.yml` file - 当前目录包含一个 `shard.yml` 文件
- The current directory contains a `.cr` file - The current directory contains a `.cr` file
### 配置项 ### 配置项
@ -341,29 +345,29 @@ style = "bold blue"
## Directory ## 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`
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ------------------- | ------------- | -------------------------------------------------------------------------------- | | ------------------- | ------------- | ------------------------ |
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | | `truncation_length` | `3` | 当前目录路径被截断后最多保留的父目录数量。 |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | | `truncate_to_repo` | `true` | 是否只截断到您当前处于的 git 仓库根目录下。 |
| `prefix` | `"in "` | Prefix to display immediately before the directory. | | `prefix` | `"in "` | 直接在显示路径前显示的前缀。 |
| `style` | `"bold cyan"` | 此组件的样式。 | | `style` | `"bold cyan"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `directory` module. | | `disabled` | `false` | 禁用 `directory` 组件。 |
<details> <details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary> <summary>此组件有几个高级配置选项来控制当前目录路径的显示方式。</summary>
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------- | | --------------------------- | ------ | ------------------------------------- |
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | | `fish_style_pwd_dir_length` | `0` | 使用 fish shell 当前目录路径逻辑时每个省略目录名使用的字符数。 |
| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | | `use_logical_path` | `true` | 显示由 shell 提供的逻辑路径(`PWD`)而不是 OS 提供的路径。 |
`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` 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`.
@ -378,22 +382,44 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
truncation_length = 8 truncation_length = 8
``` ```
## Dotnet ## Docker Context
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. 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`.
This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly.
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.
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ----------- | ------------- | -------------------------------------------------------- | | ----------------- | ------------- | --------------------------------------------------------------------------------------- |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | | `symbol` | `"🐳 "` | The symbol used before displaying the Docker context . |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. | | `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
| `style` | `"bold blue"` | 此组件的样式。 | | `style` | `"bold blue"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `dotnet` module. | | `disabled` | `true` | Disables the `docker_context` module. |
### 示例
```toml
# ~/.config/starship.toml
[docker_context]
symbol = "🐋 "
```
## Dotnet
`dotnet` 模块显示与当前目录下使用的 .NET Core SDK 相关联的版本。 如果当前目录已被绑定了一个版本的 SDK则显示被帮定的版本。 否则此组件将显示最新安装的 SDK 版本。
此组件只会在以下文件之一出现在当前目录中时显示:`global.json``project.json``*.sln``*.csproj``*.fsproj``*.xproj`。 为了正确使用此组件,您还需要安装 .NET Core 命令行工具。
在内部,此组件使用自己的版本检测机制。 一般来说此组件是直接执行 `dotnet --version` 的两倍快,但当你的 .NET 项目使用了不常见的目录布局时此组件可能显示一个错误的版本。 如果相比于速度您更需要正确的版本号,您可以在组件设置中设置 `heuristic = false` 来禁用该机制。
### 配置项
| 字段 | 默认值 | 描述 |
| ----------- | ------------- | ------------------------------ |
| `symbol` | `"•NET "` | 这个字段的内容会显示在当前 .NET 版本之前。 |
| `heuristic` | `true` | 使用更快的版本探测机制以保证 starship 的运行速度。 |
| `style` | `"bold blue"` | 此组件的样式。 |
| `disabled` | `false` | 禁用 `dotnet` 组件。 |
### 示例 ### 示例
@ -410,7 +436,7 @@ heuristic = false
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 此组件只有满足以下条件之一时才会被显示: The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 此组件只有满足以下条件之一时才会被显示:
- The current directory contains a `mix.exs` file. - 当前目录包含一个 `mix.exs` 文件.
### 配置项 ### 配置项
@ -430,10 +456,11 @@ symbol = "🔮 "
## Elm ## Elm
The `elm` module shows the currently installed version of Elm. 此组件只有满足以下条件之一时才会被显示: The `elm` module shows the currently installed version of Elm. 此组件将在符合以下任意条件时显示:
- The current directory contains a `elm.json` file - 当前目录包含一个 `elm.json` 文件
- The current directory contains a `elm-package.json` file - 当前目录包含 `elm-package.json` 文件
- The current directory contains a `.elm-version` file
- The current directory contains a `elm-stuff` folder - The current directory contains a `elm-stuff` folder
- The current directory contains a `*.elm` files - The current directory contains a `*.elm` files
@ -457,22 +484,22 @@ symbol = " "
## Environment Variable ## 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` 组件显示选定的环境变量的当前值。 此组件只有满足以下条件之一时才会被显示:
- The `variable` configuration option matches an existing environment variable - 设置的 `variable` 是一个已存在的环境变量
- The `variable` configuration option is not defined, but the `default` configuration option is - 未定义 `variable`,但定义了 `default`
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ---------- | ---------------- | ---------------------------------------------------------------------------- | | ---------- | ---------------- | ------------------- |
| `symbol` | | The symbol used before displaying the variable value. | | `symbol` | | 这个字段的内容会显示在环境变量值之前。 |
| `variable` | | The environment variable to be displayed. | | `variable` | | 要显示的环境变量。 |
| `default` | | The default value to be displayed when the selected variable is not defined. | | `default` | | 所选变量未定义时显示的默认值。 |
| `prefix` | `""` | Prefix to display immediately before the variable value. | | `prefix` | `""` | 直接在显示环境变量值前显示的前缀。 |
| `suffix` | `""` | Suffix to display immediately after the variable value. | | `suffix` | `""` | 直接在显示环境变量值后显示的后缀。 |
| `style` | `"dimmed black"` | 此组件的样式。 | | `style` | `"dimmed black"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `env_var` module. | | `disabled` | `false` | 禁用 `env_var` 组件。 |
### 示例 ### 示例
@ -486,17 +513,17 @@ default = "unknown shell"
## Git Branch ## Git Branch
The `git_branch` module shows the active branch of the repo in your current directory. `git_branch` 组件显示当前目录的 git 仓库的活动分支。
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ------------------- | --------------- | ------------------------------------------------------------------------------------- | | ------------------- | --------------- | ------------------------------------- |
| `symbol` | `" "` | The symbol used before the branch name of the repo in your current directory. | | `symbol` | `" "` | 该字段的内容显示于当前仓库活动分支名之前。 |
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes | | `truncation_length` | `2^63 - 1` | 将显示的分支名截断到该数量的字素graphemes |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use "" for no symbol | | `truncation_symbol` | `"…"` | 此字段的内容用来表示分支名称被截断。 您可以使用 "" 以不显示任何符号。 |
| `style` | `"bold purple"` | 此组件的样式。 | | `style` | `"bold purple"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `git_branch` module. | | `disabled` | `false` | 禁用 `git_branch` 组件。 |
### 示例 ### 示例
@ -511,18 +538,18 @@ truncation_symbol = ""
## Git Commit ## Git Commit
The `git_commit` module shows the current commit hash of the repo in your current directory. `git_commit` 组件显示当前目录的 git 仓库的当前提交的哈希值。
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| -------------------- | -------------- | ----------------------------------------------------- | | -------------------- | -------------- | ----------------------------------------------------- |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. | | `commit_hash_length` | `7` | 显示的 git 提交哈希值的长度。 |
| `prefix` | `"("` | Prefix to display immediately before git commit. | | `prefix` | `"("` | 直接在 git 提交哈希值前显示的前缀。 |
| `suffix` | `")"` | Suffix to display immediately after git commit. | | `suffix` | `")"` | 直接在 git 提交哈希值后显示的后缀。 |
| `style` | `"bold green"` | 此组件的样式。 | | `style` | `"bold green"` | 此组件的样式。 |
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state | | `only_detached` | `true` | Only show git commit hash when in detached HEAD state |
| `disabled` | `false` | Disables the `git_commit` module. | | `disabled` | `false` | 禁用 `git_commit` 组件。 |
### 示例 ### 示例
@ -535,22 +562,22 @@ commit_hash_length = 4
## Git State ## 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如果存在则也会被显示。
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ------------------ | ------------------ | ---------------------------------------------------------------------------------------------------------------- | | ------------------ | ------------------ | ----------------------------------------------------- |
| `rebase` | `"REBASING"` | The text displayed when a `rebase` is in progress. | | `rebase` | `"REBASING"` | `rebase` 时显示的文本。 |
| `merge` | `"MERGING"` | The text displayed when a `merge` is in progress. | | `merge` | `"MERGING"` | `merge` 时显示的文本。 |
| `revert` | `"REVERTING"` | The text displayed when a `revert` is in progress. | | `revert` | `"REVERTING"` | `revert` 时显示的文本。 |
| `cherry_pick` | `"CHERRY-PICKING"` | The text displayed when a `cherry-pick` is in progress. | | `cherry_pick` | `"CHERRY-PICKING"` | `cherry-pick` 时显示的文本。 |
| `bisect` | `"BISECTING"` | The text displayed when a `bisect` is in progress. | | `bisect` | `"BISECTING"` | `bisect` 时显示的文本。 |
| `am` | `"AM"` | The text displayed when an `apply-mailbox` (`git am`) is in progress. | | `am` | `"AM"` | 正在执行 `apply-mailbox``git am`)时显示的文本。 |
| `am_or_rebase` | `"AM/REBASE"` | The text displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. | | `am_or_rebase` | `"AM/REBASE"` | 当无法分辨正在执行的是 `apply-mailbox` 还是 `rebase` 时显示的文本。 |
| `progress_divider` | `"/"` | The symbol or text which will separate the current and total progress amounts. (e.g., `" of "`, for `"3 of 10"`) | | `progress_divider` | `"/"` | 将当前进度与总进度分开的符号或文本。 (例如,设置为 `" of "` 时效果是 `"3 of 10"` |
| `style` | `"bold yellow"` | 此组件的样式。 | | `style` | `"bold yellow"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `git_state` module. | | `disabled` | `false` | 禁用 `git_state` 模块 |
### 示例 ### 示例
@ -564,41 +591,41 @@ cherry_pick = "🍒 PICKING"
## Git Status ## Git Status
The `git_status` module shows symbols representing the state of the repo in your current directory. `git_status`组件通过相应的符号显示您当前目录中 git 仓库的状态。
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ------------------ | ------------------------- | ------------------------------------------------------- | | ------------------ | ------------------------- | ---------------------------- |
| `conflicted` | `"="` | This branch has merge conflicts. | | `conflicted` | `"="` | 这个分支有合并冲突。 |
| `conflicted_count` | [见下文](#git-status-counts) | Show and style the number of conflicts. | | `conflicted_count` | [见下文](#git-status-counts) | 显示冲突数量,设置冲突数量的显示样式。 |
| `ahead` | `"⇡"` | This branch is ahead of the branch being tracked. | | `ahead` | `"⇡"` | 这个分支领先于正在跟踪的分支。 |
| `behind` | `"⇣"` | This branch is behind of the branch being tracked. | | `behind` | `"⇣"` | 这个分支落后于正在跟踪的分支。 |
| `diverged` | `"⇕"` | This branch has diverged from the branch being tracked. | | `diverged` | `"⇕"` | 这个分支与正在跟踪的分支有分歧。 |
| `untracked` | `"?"` | There are untracked files in the working directory. | | `untracked` | `"?"` | 工作目录中有未跟踪的文件。 |
| `untracked_count` | [见下文](#git-status-counts) | Show and style the number of untracked files. | | `untracked_count` | [见下文](#git-status-counts) | 显示未跟踪文件的数量,设置该数量的显示样式。 |
| `stashed` | `"$"` | A stash exists for the local repository. | | `stashed` | `"$"` | 本地 git 仓库中存在一个 stash 快照。 |
| `stashed_count` | [见下文](#git-status-counts) | Show and style the number of stashes. | | `stashed_count` | [见下文](#git-status-counts) | 显示 stash 快照数量,设置快照数量的显示样式。 |
| `modified` | `"!"` | There are file modifications in the working directory. | | `modified` | `"!"` | 工作目录中有文件修改。 |
| `modified_count` | [见下文](#git-status-counts) | Show and style the number of modified files. | | `modified_count` | [见下文](#git-status-counts) | 显示修改文件的数量,设置该数量的显示样式。 |
| `staged` | `"+"` | A new file has been added to the staging area. | | `staged` | `"+"` | 一个新文件被添加到了暂存区staging area |
| `staged_count` | [见下文](#git-status-counts) | Show and style the number of files staged files. | | `staged_count` | [见下文](#git-status-counts) | 显示暂存区中文件数量,设置该数量的显示样式。 |
| `renamed` | `"»"` | A renamed file has been added to the staging area. | | `renamed` | `"»"` | 一个重命名的文件被添加到了暂存区。 |
| `renamed_count` | [见下文](#git-status-counts) | Show and style the number of renamed files. | | `renamed_count` | [见下文](#git-status-counts) | 显示重命名文件的数量,设置该数量的显示样式。 |
| `deleted` | `"✘"` | A file's deletion has been added to the staging area. | | `deleted` | `"✘"` | 一个文件的删除记录被添加到了暂存区。 |
| `deleted_count` | [见下文](#git-status-counts) | Show and style the number of deleted files. | | `deleted_count` | [见下文](#git-status-counts) | 显示文件删除记录的数量,设置该数量的显示样式。 |
| `show_sync_count` | `false` | Show ahead/behind count of the branch being tracked. | | `show_sync_count` | `false` | 显示领先/落后正在跟踪的分支的提交数。 |
| `prefix` | `[` | Prefix to display immediately before git status. | | `prefix` | `[` | 直接在 git 状态前显示的前缀。 |
| `suffix` | `]` | Suffix to display immediately after git status. | | `suffix` | `]` | 直接在 git 状态后显示的后缀。 |
| `style` | `"bold red"` | 此组件的样式。 | | `style` | `"bold red"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `git_status` module. | | `disabled` | `false` | 禁用 `git_status` 组件。 |
#### Git Status 中的计数值 #### Git Status 中的计数值
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| --------- | ------- | ------------------------------------------------------ | | --------- | ------- | ------------------------------- |
| `enabled` | `false` | Show the number of files | | `enabled` | `false` | 显示相应的文件数量 |
| `style` | | Optionally style the count differently than the module | | `style` | | 可选字段,使计数值的显示风格不同于 git_status 组件 |
### 示例 ### 示例
@ -623,23 +650,24 @@ deleted = "🗑"
## Golang ## Golang
The `golang` module shows the currently installed version of Golang. 此组件只有满足以下条件之一时才会被显示: `golang` 组件显示当前安装的 Golang 版本。 此组件将在符合以下任意条件时显示:
- The current directory contains a `go.mod` file - 当前目录包含 `go.mod` 文件
- The current directory contains a `go.sum` file - 当前目录包含 `go.sum` 文件
- The current directory contains a `glide.yaml` file - 当前目录包含 `glide.yaml` 文件
- The current directory contains a `Gopkg.yml` file - 当前目录包含 `Gopkg.yml` 文件
- The current directory contains a `Gopkg.lock` file - 当前目录包含 `Gopkg.lock` 文件
- The current directory contains a `Godeps` directory - The current directory contains a `.go-version` file
- The current directory contains a file with the `.go` extension - 当前目录包含 `Godeps` 目录
- 当前目录包含一个使用 `.go` 扩展名的文件
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ---------- | ------------- | -------------------------------------------------------- | | ---------- | ------------- | -------------------------- |
| `symbol` | `"🐹 "` | The symbol used before displaying the version of Golang. | | `symbol` | `"🐹 "` | 这个字段的内容会显示在当前 Golang 版本之前。 |
| `style` | `"bold cyan"` | 此组件的样式。 | | `style` | `"bold cyan"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `golang` module. | | `disabled` | `false` | 禁用 `golang` 组件。 |
### 示例 ### 示例
@ -651,17 +679,17 @@ symbol = "🏎💨 "
``` ```
## Haskell ## Haskell
The `haskell` module shows the currently installed version of Haskell Stack version. 此组件只有满足以下条件之一时才会被显示: `haskell` 组件显示当前安装的 Haskell Stack 版本。 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `stack.yaml` file - 当前目录包含 `stack.yaml` 文件
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ---------- | ------------ | --------------------------------------------------------- | | ---------- | ------------ | --------------------------- |
| `symbol` | `"λ "` | The symbol used before displaying the version of Haskell. | | `symbol` | `"λ "` | 这个字段的内容会显示在当前 Haskell 版本之前。 |
| `style` | `"bold red"` | 此组件的样式。 | | `style` | `"bold red"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `haskell` module. | | `disabled` | `false` | 禁用 `haskell` 组件。 |
### 示例 ### 示例
@ -703,18 +731,18 @@ disabled = false
## Java ## Java
The `java` module shows the currently installed version of Java. 此组件只有满足以下条件之一时才会被显示: `java` 组件显示当前安装的 Java 版本。 此组件将在符合以下任意条件之一时显示:
- The current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file - The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension - 当前目录包含一个扩展名为 `.java``.class``.gradle` 或 `.jar` 的文件
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ---------- | -------------- | ------------------------------------------------------ | | ---------- | -------------- | ------------------------ |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. | | `symbol` | `"☕ "` | 这个字段的内容会显示在当前 Java 版本之前。 |
| `style` | `"dimmed red"` | 此组件的样式。 | | `style` | `"dimmed red"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `java` module. | | `disabled` | `false` | 禁用 `java` 组件。 |
### 示例 ### 示例
@ -727,16 +755,16 @@ symbol = "🌟 "
## Jobs ## 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` 字段,则使用它作为显示作业数量的下限。
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ----------- | ------------- | ----------------------------------------------------- | | ----------- | ------------- | -------------------- |
| `symbol` | `"✦"` | The symbol used before displaying the number of jobs. | | `symbol` | `"✦"` | 这个字段的内容会显示在当前作业数量之前。 |
| `threshold` | `1` | Show number of jobs if exceeded. | | `threshold` | `1` | 如果超过此字段的值,显示任务数量。 |
| `style` | `"bold blue"` | 此组件的样式。 | | `style` | `"bold blue"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | 禁用 `jobs` 组件。 |
### 示例 ### 示例
@ -748,9 +776,33 @@ symbol = "+ "
threshold = 4 threshold = 4
``` ```
## Julia
The `julia` module shows the currently installed version of Julia. 此组件将在符合以下任意条件时显示:
- The current directory contains a `Project.toml` file
- The current directory contains a `Manifest.toml` file
- The current directory contains a file with the `.jl` extension
### 配置项
| 字段 | 默认值 | 描述 |
| ---------- | --------------- | ------------------------------------------------------- |
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
| `style` | `"bold purple"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `julia` module. |
### 示例
```toml
# ~/.config/starship.toml
[julia]
symbol = "👸 "
```
## Kubernetes ## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. 显示当前的 Kubernetes 上下文名以及,如果有相关设置,则显示来自 kubeconig 文件的命名空间。 命名空间需要在 kubeconfig 文件中设置,这可以通过 `kubectl config set-context starship-cluster --namespace astronaut` 完成。 如果设置了环境变量 `$KUBECONFIG`,此组件将使用该值,否则会使用 `~/.kube/config`
::: tip ::: tip
@ -760,11 +812,12 @@ Displays the current Kubernetes context name and, if set, the namespace from the
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ---------- | ------------- | --------------------------------------------------- | | ----------------- | ------------- | ----------------------------------- |
| `symbol` | `"☸ "` | The symbol used before displaying the Cluster info. | | `symbol` | `"☸ "` | 这个字段的内容会显示在当前集群信息之前。 |
| `style` | `"bold blue"` | 此组件的样式。 | | `context_aliases` | | Table of context aliases to display |
| `disabled` | `true` | Disables the `kubernetes` module | | `style` | `"bold blue"` | 此组件的样式。 |
| `disabled` | `true` | 禁用 `kubernetes` 组件。 |
### 示例 ### 示例
@ -775,17 +828,19 @@ Displays the current Kubernetes context name and, if set, the namespace from the
symbol = "⛵ " symbol = "⛵ "
style = "dimmed green" style = "dimmed green"
disabled = false disabled = false
[kubernetes.context_aliases]
"dev.local.cluster.k8s" = "dev"
``` ```
## Line Break ## 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` 组件,使提示成为单行。 |
### 示例 ### 示例
@ -798,9 +853,9 @@ disabled = true
## Memory Usage ## 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 ::: tip
@ -810,15 +865,15 @@ By default the swap usage is displayed if the total system swap is non-zero.
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ----------------- | --------------------- | ------------------------------------------------------------- | | ----------------- | --------------------- | -------------------------- |
| `show_percentage` | `false` | Display memory usage as a percentage of the available memory. | | `show_percentage` | `false` | 用可用内存的百分比来显示内存使用情况。 |
| `show_swap` | `true` | Display swap usage if total swap is non-zero. | | `show_swap` | `true` | 如果总交换区使用量为非零,则显示交换区使用情况。 |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | | `threshold` | `75` | 隐藏内存使用情况,除非它超过这个百分比。 |
| `symbol` | `"🐏 "` | The symbol used before displaying the memory usage. | | `symbol` | `"🐏 "` | 这个字段的内容会显示在当前内存使用情况之前。 |
| `separator` | `" | "` | The symbol or text that will seperate the ram and swap usage. | | `separator` | `" | "` | 此字段所设置的符号或文本会分隔内存和交换区使用情况。 |
| `style` | `"bold dimmed white"` | 此组件的样式。 | | `style` | `"bold dimmed white"` | 此组件的样式。 |
| `disabled` | `true` | Disables the `memory_usage` module. | | `disabled` | `true` | 禁用 `memory_usage` 模块 |
### 示例 ### 示例
@ -837,17 +892,17 @@ style = "bold dimmed green"
## Mercurial Branch ## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory. `hg_branch` 组件显示当前目录的 hg 仓库的活动分支。
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ------------------- | --------------- | -------------------------------------------------------------------------------------------- | | ------------------- | --------------- | ------------------------------- |
| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | | `symbol` | `" "` | 该字段的内容显示于当前仓库的 hg 书签或活动分支名之前。 |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | | `truncation_length` | `2^63 - 1` | 将显示的 hg 分支名截断到该数量的字素graphemes |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | | `truncation_symbol` | `"…"` | 此字段的内容用来表示分支名称被截断。 |
| `style` | `"bold purple"` | 此组件的样式。 | | `style` | `"bold purple"` | 此组件的样式。 |
| `disabled` | `true` | Disables the `hg_branch` module. | | `disabled` | `true` | 禁用 `hg_branch` 组件。 |
### 示例 ### 示例
@ -862,17 +917,17 @@ truncation_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. `nix_shell` 组件显示 nix-shell 环境。 当处于一个 nix-shell 环境中时,此组件会被显示。
### 配置项 ### 配置项
| 字段 | 默认值 | 描述 | | 字段 | 默认值 | 描述 |
| ------------ | ------------ | ---------------------------------- | | ------------ | ------------ | ------------------ |
| `use_name` | `false` | Display the name of the nix-shell. | | `use_name` | `false` | 显示 nix-shell 的名称。 |
| `impure_msg` | `"impure"` | Customize the "impure" msg. | | `impure_msg` | `"impure"` | 自定义“impure”消息。 |
| `pure_msg` | `"pure"` | Customize the "pure" msg. | | `pure_msg` | `"pure"` | 自定义“pure”消息。 |
| `style` | `"bold red"` | 此组件的样式。 | | `style` | `"bold red"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `nix_shell` module. | | `disabled` | `false` | 禁用 `nix_shell` 组件。 |
### 示例 ### 示例
@ -888,9 +943,10 @@ pure_msg = "pure shell"
## NodeJS ## NodeJS
`nodejs` 组件显示当前安装的 NodeJS 版本。 此组件只有满足以下条件之一时才会被显示: `nodejs` 组件显示当前安装的 NodeJS 版本。 此组件将在符合以下任意条件时显示:
- 当前目录包含 `package.json` 文件 - 当前目录包含 `package.json` 文件
- The current directory contains a `.node-version` file
- 当前目录包含 `node_modules` 目录 - 当前目录包含 `node_modules` 目录
- 当前目录包含一个使用 `.js` 扩展名的文件 - 当前目录包含一个使用 `.js` 扩展名的文件
@ -920,6 +976,7 @@ symbol = "🤖 "
- **poetry** —— `poetry` 软件包版本从当前目录下的 `pyproject.toml` 中得到 - **poetry** —— `poetry` 软件包版本从当前目录下的 `pyproject.toml` 中得到
- **composer** —— `composer` 软件包版本从当前目录下的 `composer.json` 中得到 - **composer** —— `composer` 软件包版本从当前目录下的 `composer.json` 中得到
- **gradle** The `gradle` package version is extracted from the `build.gradle` present - **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
> ⚠ 此组件显示的是源代码在当前目录中的软件包的版本,而不是包管理器的版本。 > ⚠ 此组件显示的是源代码在当前目录中的软件包的版本,而不是包管理器的版本。
@ -942,9 +999,10 @@ symbol = "🎁 "
## PHP ## PHP
`php` 组件显示当前安装的 PHP 版本。 此组件只有满足以下条件之一时才会被显示: `php` 组件显示当前安装的 PHP 版本。 此组件将在符合以下任意条件时显示:
- 当前目录包含一个 `composer.json` 文件 - 当前目录包含一个 `composer.json` 文件
- The current directory contains a `.php-version` file
- 当前目录包含一个 `.php` 文件 - 当前目录包含一个 `.php` 文件
### 配置项 ### 配置项
@ -972,7 +1030,7 @@ symbol = "🔹 "
否则,它将显示来自 `python --version` 的版本号,并显示当前的 Python 虚拟环境,如果激活了的话。 否则,它将显示来自 `python --version` 的版本号,并显示当前的 Python 虚拟环境,如果激活了的话。
此组件只有满足以下条件之一时才会被显示: 此组件将在符合以下任意条件之一时显示:
- 当前目录包含 `.python-version` 文件 - 当前目录包含 `.python-version` 文件
- 当前目录包含 `requirements.txt` 文件 - 当前目录包含 `requirements.txt` 文件
@ -1005,9 +1063,10 @@ pyenv_prefix = "foo "
## Ruby ## Ruby
`ruby` 组件显示当前安装的 Ruby 版本。 此组件只有满足以下条件之一时才会被显示: `ruby` 组件显示当前安装的 Ruby 版本。 此组件将在符合以下任意条件时显示:
- 当前目录包含 `Gemfile` 文件 - 当前目录包含 `Gemfile` 文件
- The current directory contains a `.ruby-version` file
- 当前目录包含 `.rb` 文件 - 当前目录包含 `.rb` 文件
### 配置项 ### 配置项
@ -1029,7 +1088,7 @@ symbol = "🔺 "
## Rust ## Rust
`rust` 组件显示当前安装的 Rust 版本。 此组件将在符合以下任意条件时显示: `rust` 组件显示当前安装的 Rust 版本。 此组件将在符合以下任意条件之一时显示:
- 当前目录包含 `Cargo.toml` 文件 - 当前目录包含 `Cargo.toml` 文件
- 当前目录包含一个使用 `.rs` 扩展名的文件 - 当前目录包含一个使用 `.rs` 扩展名的文件
@ -1079,7 +1138,7 @@ symbol = "📦 "
## Terraform ## Terraform
`terraform` 组件显示当前选定的 terraform 工作区和版本。 默认情况下不会显示 terraform 版本,因为当使用大量插件时,当前版本 terraform 查询版本号很慢。 此组件只有满足以下条件之一时才会被显示: `terraform` 组件显示当前选定的 terraform 工作区和版本。 默认情况下不会显示 terraform 版本,因为当使用大量插件时,当前版本 terraform 查询版本号很慢。 此组件将在符合以下任意条件时显示:
- 当前目录包含 `.terraform` 目录 - 当前目录包含 `.terraform` 目录
- 当前目录包含一个使用 `.tf` 扩展名的文件 - 当前目录包含一个使用 `.tf` 扩展名的文件
@ -1137,7 +1196,7 @@ utc_time_offset = "-5"
## Username ## Username
`username` 组件显示当前活跃的用户名。 此组件只有满足以下条件之一时才会被显示: `username` 组件显示当前活跃的用户名。 此组件将在符合以下任意条件之一时显示:
- 当前用户是 root - 当前用户是 root
- 当前用户与登录用户不相同 - 当前用户与登录用户不相同

View File

@ -220,9 +220,37 @@
如果您有兴趣贡献于 Starship请查看我们的[贡献指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)。 另外,你可以自由加入我们的 [Discord 服务器](https://discord.gg/8Jzqu3T) 。 👋 如果您有兴趣贡献于 Starship请查看我们的[贡献指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)。 另外,你可以自由加入我们的 [Discord 服务器](https://discord.gg/8Jzqu3T) 。 👋
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
#### Individuals
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/2/website"><img src="https://opencollective.com/starship/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/3/website"><img src="https://opencollective.com/starship/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/4/website"><img src="https://opencollective.com/starship/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/5/website"><img src="https://opencollective.com/starship/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/6/website"><img src="https://opencollective.com/starship/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/7/website"><img src="https://opencollective.com/starship/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
## 💭该项目受以下项目启发 ## 💭该项目受以下项目启发
请参考这些曾经为 Starship 提供启发的工程。 🙏 Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.

View File

@ -98,6 +98,7 @@ prompt_order = [
"git_state", "git_state",
"git_status", "git_status",
"hg_branch", "hg_branch",
"docker_context",
"package", "package",
"dotnet", "dotnet",
"elixir", "elixir",
@ -105,6 +106,7 @@ prompt_order = [
"golang", "golang",
"haskell", "haskell",
"java", "java",
"julia",
"nodejs", "nodejs",
"php", "php",
"python", "python",
@ -130,6 +132,8 @@ prompt_order = [
`aws` 模組顯示現在 AWS 的區域與概況。 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。 `aws` 模組顯示現在 AWS 的區域與概況。 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
@ -318,7 +322,7 @@ style = "dimmed green"
The `crystal` module shows the currently installed version of Crystal. 這個模組在下列其中一個條件達成時顯示: The `crystal` module shows the currently installed version of Crystal. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `shard.yml` file - 現在資料夾中含有一個 `shard.yml` 檔案
- The current directory contains a `.cr` file - The current directory contains a `.cr` file
### 選項 ### 選項
@ -339,31 +343,31 @@ symbol = "✨ "
style = "bold blue" style = "bold blue"
``` ```
## 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 風格的 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`
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ------------------- | ------------- | -------------------------------------------------------------------------------- | | ------------------- | ------------- | --------------------------------------------------- |
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | | `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | | `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 |
| `prefix` | `"in "` | Prefix to display immediately before the directory. | | `prefix` | `"in "` | Prefix to display immediately before the directory. |
| `style` | `"bold cyan"` | 這個模組的風格。 | | `style` | `"bold cyan"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `directory` module. | | `disabled` | `false` | 停用 `directory` 模組。 |
<details> <details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary> <summary>這個模組有些進階設定選項可以控制顯示資料夾。</summary>
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------- | | --------------------------- | ------ | ------------------------------------ |
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | | `fish_style_pwd_dir_length` | `0` | 當使用 fish shell 的 pwd 路徑邏輯時使用的字元數量。 |
| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | | `use_logical_path` | `true` | 顯示 shell (`PWD`) 提供的邏輯路徑,而不是 OS 的路徑。 |
`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` 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`.
@ -378,22 +382,44 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
truncation_length = 8 truncation_length = 8
``` ```
## Dotnet ## Docker Context
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. 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`.
This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly.
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.
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ----------- | ------------- | -------------------------------------------------------- | | ----------------- | ------------- | --------------------------------------------------------------------------------------- |
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | | `symbol` | `"🐳 "` | The symbol used before displaying the Docker context . |
| `heuristic` | `true` | Use faster version detection to keep starship snappy. | | `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
| `style` | `"bold blue"` | 這個模組的風格。 | | `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `dotnet` module. | | `disabled` | `true` | Disables the `docker_context` module. |
### 範例
```toml
# ~/.config/starship.toml
[docker_context]
symbol = "🐋 "
```
## Dotnet
`dotnet` 模組顯示現在資料夾使用的 .NET Core SDK 的版本。 如果這個資料夾已經選定一個 SDK則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。
這個模組只會在下列檔案出現在你的現在資料夾中時,顯示在你的提示字元:`global.json`、`project.json`、`*.sln`、`*.csproj`、`*.fsproj`、`*.xproj`。 你也會需要安裝 .NET Core 文字命令工具來正確使用這個模組。
這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。
### 選項
| 變數 | 預設 | 說明 |
| ----------- | ------------- | ---------------------------- |
| `symbol` | `"•NET "` | 在顯示 dotnet 版本之前用的符號。 |
| `heuristic` | `true` | 使用更快速的版本偵測法來保持 starship 的速度。 |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `dotnet` 模組。 |
### 範例 ### 範例
@ -410,7 +436,7 @@ heuristic = false
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 這個模組在下列其中一個條件達成時顯示: The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `mix.exs` file. - 現在資料夾中包含一個 `mix.exs` 檔案.
### 選項 ### 選項
@ -432,8 +458,9 @@ symbol = "🔮 "
The `elm` module shows the currently installed version of Elm. 這個模組在下列其中一個條件達成時顯示: The `elm` module shows the currently installed version of Elm. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `elm.json` file - 現在資料夾中包含一個 `elm.json` 檔案
- The current directory contains a `elm-package.json` file - 現在資料夾中包含一個 `elm-package.json` 檔案
- The current directory contains a `.elm-version` file
- The current directory contains a `elm-stuff` folder - The current directory contains a `elm-stuff` folder
- The current directory contains a `*.elm` files - The current directory contains a `*.elm` files
@ -455,24 +482,24 @@ The `elm` module shows the currently installed version of Elm. 這個模組在
symbol = " " symbol = " "
``` ```
## Environment Variable ## 環境變數
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met: `env_var`模組顯示一個選擇的環境變數的現在數值。 這個模組只在下列條件其中之一達到時顯示:
- The `variable` configuration option matches an existing environment variable - `variable` 設定選項符合一個存在的環境變數。
- The `variable` configuration option is not defined, but the `default` configuration option is - 沒有設定 `variable` 選項,但是有設定 `default` 選項。
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ---------- | ---------------- | ---------------------------------------------------------------------------- | | ---------- | ---------------- | -------------------- |
| `symbol` | | The symbol used before displaying the variable value. | | `symbol` | | 顯示在變數數值之前的符號。 |
| `variable` | | The environment variable to be displayed. | | `variable` | | 要顯示的環境變數。 |
| `default` | | The default value to be displayed when the selected variable is not defined. | | `default` | | 在選擇的變數值沒有定義時,顯示的預設值。 |
| `prefix` | `""` | Prefix to display immediately before the variable value. | | `prefix` | `""` | 在變數值正前方顯示的前綴。 |
| `suffix` | `""` | Suffix to display immediately after the variable value. | | `suffix` | `""` | 在變數值正後方顯示的後綴。 |
| `style` | `"dimmed black"` | 這個模組的風格。 | | `style` | `"dimmed black"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `env_var` module. | | `disabled` | `false` | 停用 `env_var` 模組。 |
### 範例 ### 範例
@ -484,19 +511,19 @@ variable = "SHELL"
default = "unknown shell" default = "unknown shell"
``` ```
## Git Branch ## Git 分支
The `git_branch` module shows the active branch of the repo in your current directory. `git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ------------------- | --------------- | ------------------------------------------------------------------------------------- | | ------------------- | --------------- | -------------------------------- |
| `symbol` | `" "` | The symbol used before the branch name of the repo in your current directory. | | `symbol` | `" "` | 在你現在資料夾之中的儲存庫的分支名稱前使用的符號。 |
| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes | | `truncation_length` | `2^63 - 1` | 裁減一個 git 分支到 X 字素 (grapheme)。 |
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use "" for no symbol | | `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 你可以用 "" 來表示不要顯示。 |
| `style` | `"bold purple"` | 這個模組的風格。 | | `style` | `"bold purple"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `git_branch` module. | | `disabled` | `false` | 停用 `git_branch` 模組。 |
### 範例 ### 範例
@ -535,22 +562,22 @@ commit_hash_length = 4
## Git State ## 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),也會一併顯示出來。
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ------------------ | ------------------ | ---------------------------------------------------------------------------------------------------------------- | | ------------------ | ------------------ | -------------------------------------------------- |
| `rebase` | `"REBASING"` | The text displayed when a `rebase` is in progress. | | `rebase` | `"REBASING"` | `rebase` 進行中顯示的文字。 |
| `merge` | `"MERGING"` | The text displayed when a `merge` is in progress. | | `merge` | `"MERGING"` | `merge` 進行中顯示的文字。 |
| `revert` | `"REVERTING"` | The text displayed when a `revert` is in progress. | | `revert` | `"REVERTING"` | `revert` 進行中顯示的文字。 |
| `cherry_pick` | `"CHERRY-PICKING"` | The text displayed when a `cherry-pick` is in progress. | | `cherry_pick` | `"CHERRY-PICKING"` | `cherry-pick` 進行中顯示的文字。 |
| `bisect` | `"BISECTING"` | The text displayed when a `bisect` is in progress. | | `bisect` | `"BISECTING"` | `bisect` 進行中顯示的文字。 |
| `am` | `"AM"` | The text displayed when an `apply-mailbox` (`git am`) is in progress. | | `am` | `"AM"` | `apply-mailbox` (`git am`) 進行中顯示的文字。 |
| `am_or_rebase` | `"AM/REBASE"` | The text displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. | | `am_or_rebase` | `"AM/REBASE"` | 當不容易分辨是 `apply-mailbox``rebase` 正在進行中時顯示的文字。 |
| `progress_divider` | `"/"` | The symbol or text which will separate the current and total progress amounts. (e.g., `" of "`, for `"3 of 10"`) | | `progress_divider` | `"/"` | 用來分開現在與總共進度量的符號。 (例如:`" of "` 會得到 `"3 of 10"` 的效果) |
| `style` | `"bold yellow"` | 這個模組的風格。 | | `style` | `"bold yellow"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `git_state` module. | | `disabled` | `false` | 停用 `git_state` 模組。 |
### 範例 ### 範例
@ -564,34 +591,34 @@ cherry_pick = "🍒 PICKING"
## Git Status ## Git Status
The `git_status` module shows symbols representing the state of the repo in your current directory. `git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ------------------ | ------------------------ | ------------------------------------------------------- | | ------------------ | ------------------------ | ------------------------------------------------ |
| `conflicted` | `"="` | This branch has merge conflicts. | | `conflicted` | `"="` | 這個分支有合併衝突。 |
| `conflicted_count` | [連結](#git-status-counts) | Show and style the number of conflicts. | | `conflicted_count` | [連結](#git-status-counts) | Show and style the number of conflicts. |
| `ahead` | `"⇡"` | This branch is ahead of the branch being tracked. | | `ahead` | `"⇡"` | 這個分支超前正在追蹤的分支。 |
| `behind` | `"⇣"` | This branch is behind of the branch being tracked. | | `behind` | `"⇣"` | 這個分支落後正在追蹤的分支。 |
| `diverged` | `"⇕"` | This branch has diverged from the branch being tracked. | | `diverged` | `"⇕"` | 這個分支偏離正在追蹤的分支。 |
| `untracked` | `"?"` | There are untracked files in the working directory. | | `untracked` | `"?"` | 工作資料夾中有沒有追蹤的檔案。 |
| `untracked_count` | [連結](#git-status-counts) | Show and style the number of untracked files. | | `untracked_count` | [連結](#git-status-counts) | Show and style the number of untracked files. |
| `stashed` | `"$"` | A stash exists for the local repository. | | `stashed` | `"$"` | 本地儲存庫有 stash。 |
| `stashed_count` | [連結](#git-status-counts) | Show and style the number of stashes. | | `stashed_count` | [連結](#git-status-counts) | Show and style the number of stashes. |
| `modified` | `"!"` | There are file modifications in the working directory. | | `modified` | `"!"` | 工作資料夾中有修改過的檔案。 |
| `modified_count` | [連結](#git-status-counts) | Show and style the number of modified files. | | `modified_count` | [連結](#git-status-counts) | Show and style the number of modified files. |
| `staged` | `"+"` | A new file has been added to the staging area. | | `staged` | `"+"` | 一個新檔案被加入了暫存區 (staging area)。 |
| `staged_count` | [連結](#git-status-counts) | Show and style the number of files staged files. | | `staged_count` | [連結](#git-status-counts) | Show and style the number of files staged files. |
| `renamed` | `"»"` | A renamed file has been added to the staging area. | | `renamed` | `"»"` | 一個被改名的檔案被加入了暫存區 (staging area)。 |
| `renamed_count` | [連結](#git-status-counts) | Show and style the number of renamed files. | | `renamed_count` | [連結](#git-status-counts) | Show and style the number of renamed files. |
| `deleted` | `"✘"` | A file's deletion has been added to the staging area. | | `deleted` | `"✘"` | 一個刪除檔案的動作被加入了暫存區 (staging area)。 |
| `deleted_count` | [連結](#git-status-counts) | Show and style the number of deleted files. | | `deleted_count` | [連結](#git-status-counts) | Show and style the number of deleted files. |
| `show_sync_count` | `false` | Show ahead/behind count of the branch being tracked. | | `show_sync_count` | `false` | 顯示超前/落後追蹤的分支的數量。 |
| `prefix` | `[` | Prefix to display immediately before git status. | | `prefix` | `[` | 在 git 狀態正前方顯示的前綴。 |
| `suffix` | `]` | Suffix to display immediately after git status. | | `suffix` | `]` | 在 git 狀態正後方顯示的後綴。 |
| `style` | `"bold red"` | 這個模組的風格。 | | `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `git_status` module. | | `disabled` | `false` | 停用 `git_status` 模組。 |
#### Git Status Counts #### Git Status Counts
@ -623,23 +650,24 @@ deleted = "🗑"
## Golang ## Golang
The `golang` module shows the currently installed version of Golang. 這個模組在下列其中一個條件達成時顯示: `golang` 模組顯示現在安裝的 Golang 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `go.mod` file - 現在資料夾中含有一個 `go.mod` 檔案
- The current directory contains a `go.sum` file - 現在資料夾中含有一個 `go.sum` 檔案
- The current directory contains a `glide.yaml` file - 現在資料夾中含有一個 `glide.yaml` 檔案
- The current directory contains a `Gopkg.yml` file - 現在資料夾中含有一個 `Gopkg.yml` 檔案
- The current directory contains a `Gopkg.lock` file - 現在資料夾中含有一個 `Gopkg.lock` 檔案
- The current directory contains a `Godeps` directory - The current directory contains a `.go-version` file
- The current directory contains a file with the `.go` extension - 現在資料夾中含有一個 `Godeps` 資料夾
- 現在資料夾中含有一個檔案具有 `.go` 副檔名
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ---------- | ------------- | -------------------------------------------------------- | | ---------- | ------------- | ------------------- |
| `symbol` | `"🐹 "` | The symbol used before displaying the version of Golang. | | `symbol` | `"🐹 "` | 顯示在 Golang 版本之前的符號。 |
| `style` | `"bold cyan"` | 這個模組的風格。 | | `style` | `"bold cyan"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `golang` module. | | `disabled` | `false` | 停用 `golang` 模組。 |
### 範例 ### 範例
@ -653,7 +681,7 @@ symbol = "🏎💨 "
The `haskell` module shows the currently installed version of Haskell Stack version. 這個模組在下列其中一個條件達成時顯示: The `haskell` module shows the currently installed version of Haskell Stack version. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `stack.yaml` file - 現在資料夾中包含一個 `stack.yaml` 檔案
### 選項 ### 選項
@ -703,18 +731,18 @@ disabled = false
## Java ## Java
The `java` module shows the currently installed version of Java. 這個模組在下列其中一個條件達成時顯示: `java` 模組顯示現在安裝的 Java 版本。 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file - The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file
- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension - The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ---------- | -------------- | ------------------------------------------------------ | | ---------- | -------------- | ----------------- |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. | | `symbol` | `"☕ "` | 顯示在 Java 版本之前的符號。 |
| `style` | `"dimmed red"` | 這個模組的風格。 | | `style` | `"dimmed red"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `java` module. | | `disabled` | `false` | 停用 `java` 模組。 |
### 範例 ### 範例
@ -725,18 +753,18 @@ The `java` module shows the currently installed version of Java. 這個模組在
symbol = "🌟 " 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` 模組顯示現在正在執行中的工作。 這個模組只會在有背景工作正在執行時顯示。 這個模組會在工作數量超過一個,或者有設定 `threshold` 時且數量超過設定值時,顯示工作的數量。
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ----------- | ------------- | ----------------------------------------------------- | | ----------- | ------------- | -------------- |
| `symbol` | `"✦"` | The symbol used before displaying the number of jobs. | | `symbol` | `"✦"` | 在顯示工作數量之前用的符號。 |
| `threshold` | `1` | Show number of jobs if exceeded. | | `threshold` | `1` | 在超過指定值時顯示工作數量。 |
| `style` | `"bold blue"` | 這個模組的風格。 | | `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `jobs` module. | | `disabled` | `false` | 停用 `jobs` 模組。 |
### 範例 ### 範例
@ -748,9 +776,33 @@ symbol = "+ "
threshold = 4 threshold = 4
``` ```
## Julia
The `julia` module shows the currently installed version of Julia. 這個模組在下列其中一個條件達成時顯示:
- The current directory contains a `Project.toml` file
- The current directory contains a `Manifest.toml` file
- The current directory contains a file with the `.jl` extension
### 選項
| 變數 | 預設 | 說明 |
| ---------- | --------------- | ------------------------------------------------------- |
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
| `style` | `"bold purple"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `julia` module. |
### 範例
```toml
# ~/.config/starship.toml
[julia]
symbol = "👸 "
```
## Kubernetes ## Kubernetes
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. 顯示現在 Kubernetes 主體名稱以及從 kubeconfig 檔案來的名稱空間 (如果有設定的話)。 The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 如果有設定 `$KUBECONFIG` 環境變數,這個模組就會使用設定值;如果沒有,它就會使用 `~/.kube/config`
::: tip ::: tip
@ -760,11 +812,12 @@ Displays the current Kubernetes context name and, if set, the namespace from the
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ---------- | ------------- | --------------------------------------------------- | | ----------------- | ------------- | ----------------------------------- |
| `symbol` | `"☸ "` | The symbol used before displaying the Cluster info. | | `symbol` | `"☸ "` | 顯示在叢集 (cluster) 資訊之前的符號。 |
| `style` | `"bold blue"` | 這個模組的風格。 | | `context_aliases` | | Table of context aliases to display |
| `disabled` | `true` | Disables the `kubernetes` module | | `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `true` | 停用 `kubernetes` 模組。 |
### 範例 ### 範例
@ -775,17 +828,19 @@ Displays the current Kubernetes context name and, if set, the namespace from the
symbol = "⛵ " symbol = "⛵ "
style = "dimmed green" style = "dimmed green"
disabled = false disabled = false
[kubernetes.context_aliases]
"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` 模組,讓提示字元變成一行。 |
### 範例 ### 範例
@ -796,11 +851,11 @@ The `line_break` module separates the prompt into two lines.
disabled = true disabled = true
``` ```
## 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 ::: tip
@ -812,13 +867,13 @@ By default the swap usage is displayed if the total system swap is non-zero.
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ----------------- | --------------------- | ------------------------------------------------------------- | | ----------------- | --------------------- | ------------------------------------------------------------- |
| `show_percentage` | `false` | Display memory usage as a percentage of the available memory. | | `show_percentage` | `false` | 以剩餘記憶體佔有的百分比的方式顯示記憶體使用狀況。 |
| `show_swap` | `true` | Display swap usage if total swap is non-zero. | | `show_swap` | `true` | 如果總 swap 使用量不為零的話,顯示 swap 使用量 |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | | `threshold` | `75` | 將記憶體使用量隱藏,除非使用量超過指定值。 |
| `symbol` | `"🐏 "` | The symbol used before displaying the memory usage. | | `symbol` | `"🐏 "` | 顯示在記憶體使用量之前的符號。 |
| `separator` | `" | "` | The symbol or text that will seperate the ram and swap usage. | | `separator` | `" | "` | The symbol or text that will seperate the ram and swap usage. |
| `style` | `"bold dimmed white"` | 這個模組的風格。 | | `style` | `"bold dimmed white"` | 這個模組的風格。 |
| `disabled` | `true` | Disables the `memory_usage` module. | | `disabled` | `true` | 停用 `memory_usage` 模組。 |
### 範例 ### 範例
@ -845,7 +900,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
| ------------------- | --------------- | -------------------------------------------------------------------------------------------- | | ------------------- | --------------- | -------------------------------------------------------------------------------------------- |
| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | | `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | | `truncation_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` | `"…"` | 用來指示分支名稱被縮減的符號。 |
| `style` | `"bold purple"` | 這個模組的風格。 | | `style` | `"bold purple"` | 這個模組的風格。 |
| `disabled` | `true` | Disables the `hg_branch` module. | | `disabled` | `true` | Disables the `hg_branch` module. |
@ -862,17 +917,17 @@ truncation_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. `nix_shell` 模組顯示 nix-shell 環境。 這個模組會在 nix-shell 環境中顯示。
### 選項 ### 選項
| 變數 | 預設 | 說明 | | 變數 | 預設 | 說明 |
| ------------ | ------------ | ---------------------------------- | | ------------ | ------------ | ------------------ |
| `use_name` | `false` | Display the name of the nix-shell. | | `use_name` | `false` | 顯示 nix-shell 的名稱。 |
| `impure_msg` | `"impure"` | Customize the "impure" msg. | | `impure_msg` | `"impure"` | 自定義「impure」訊息。 |
| `pure_msg` | `"pure"` | Customize the "pure" msg. | | `pure_msg` | `"pure"` | 自定義「pure」訊息。 |
| `style` | `"bold red"` | 這個模組的風格。 | | `style` | `"bold red"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `nix_shell` module. | | `disabled` | `false` | 停用 `nix_shell` 模組。 |
### 範例 ### 範例
@ -891,6 +946,7 @@ pure_msg = "pure shell"
`nodejs` 模組顯示現在安裝的 NodeJS 版本。 這個模組在下列其中一個條件達成時顯示: `nodejs` 模組顯示現在安裝的 NodeJS 版本。 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中包含一個 `package.json` 檔案 - 現在資料夾中包含一個 `package.json` 檔案
- The current directory contains a `.node-version` file
- 現在資料夾中包含一個 `node_modules` 資料夾 - 現在資料夾中包含一個 `node_modules` 資料夾
- 現在資料夾中包含一個檔案具有 `.js` 副檔名 - 現在資料夾中包含一個檔案具有 `.js` 副檔名
@ -920,6 +976,7 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並
- **poetry** `poetry` 套件的版本是從現在資料夾中的 `pyproject.toml` 之中擷取出來的 - **poetry** `poetry` 套件的版本是從現在資料夾中的 `pyproject.toml` 之中擷取出來的
- **composer** The `composer` package version is extracted from the `composer.json` 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 - **gradle** The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
> ⚠️ 顯示出來的版本是從你的現在資料夾之中擷取出來的,並非從套件管理員取得。 > ⚠️ 顯示出來的版本是從你的現在資料夾之中擷取出來的,並非從套件管理員取得。
@ -944,7 +1001,8 @@ symbol = "🎁 "
The `php` module shows the currently installed version of PHP. 這個模組在下列其中一個條件達成時顯示: The `php` module shows the currently installed version of PHP. 這個模組在下列其中一個條件達成時顯示:
- 現在資料夾中包含一個 `composer.json` 檔案 - 現在資料夾中含有一個 `composer.json` 檔案
- The current directory contains a `.php-version` file
- The current directory contains a `.php` file - The current directory contains a `.php` file
### 選項 ### 選項
@ -1008,6 +1066,7 @@ pyenv_prefix = "foo "
`ruby` 模組顯示現在安裝的 Ruby 版本。 這個模組在下列其中一個條件達成時顯示: `ruby` 模組顯示現在安裝的 Ruby 版本。 這個模組在下列其中一個條件達成時顯示:
- 目前資料夾中有一個 `Gemfile` 檔案 - 目前資料夾中有一個 `Gemfile` 檔案
- The current directory contains a `.ruby-version` file
- 目前資料夾中有一個 `.rb` 檔案 - 目前資料夾中有一個 `.rb` 檔案
### 選項 ### 選項

View File

@ -220,9 +220,37 @@
如果你對貢獻 Starship 有興趣,請看我們的 [貢獻指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) 。 另外,請不用客氣加入我們的 [Discord 伺服器](https://discord.gg/8Jzqu3T) 並來問候一下。 👋 如果你對貢獻 Starship 有興趣,請看我們的 [貢獻指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) 。 另外,請不用客氣加入我們的 [Discord 伺服器](https://discord.gg/8Jzqu3T) 並來問候一下。 👋
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
#### Individuals
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/2/website"><img src="https://opencollective.com/starship/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/3/website"><img src="https://opencollective.com/starship/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/4/website"><img src="https://opencollective.com/starship/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/5/website"><img src="https://opencollective.com/starship/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/6/website"><img src="https://opencollective.com/starship/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/7/website"><img src="https://opencollective.com/starship/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
## 💭 發想來自 ## 💭 發想來自
請看之前這些幫助我們創造 Starship 的前任作品。 🙏 Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 給太空人的 ZSH 提示。 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 給太空人的 ZSH 提示。
@ -237,4 +265,4 @@
## 📝 許可 ## 📝 許可
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> 這個專案使用 [ISC](https://github.com/starship/starship/blob/master/LICENSE) 許可。 Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.