mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-24 13:47:38 +00:00
docs(i18n): new Crowdin updates (#3012)
This commit is contained in:
parent
43feb6e4ec
commit
e29b2ddc91
@ -68,6 +68,33 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Style Strings
|
## Style Strings
|
||||||
|
|
||||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
@ -75,7 +75,7 @@ A text group is made up of two different parts.
|
|||||||
|
|
||||||
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
||||||
|
|
||||||
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part.
|
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@ -142,12 +142,14 @@ This is the list of prompt-wide configuration options.
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||||
|
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@ -179,6 +181,7 @@ format = """
|
|||||||
$username\
|
$username\
|
||||||
$hostname\
|
$hostname\
|
||||||
$shlvl\
|
$shlvl\
|
||||||
|
$singularity\
|
||||||
$kubernetes\
|
$kubernetes\
|
||||||
$directory\
|
$directory\
|
||||||
$vcsh\
|
$vcsh\
|
||||||
@ -191,6 +194,7 @@ $hg_branch\
|
|||||||
$docker_context\
|
$docker_context\
|
||||||
$package\
|
$package\
|
||||||
$cmake\
|
$cmake\
|
||||||
|
$cobol\
|
||||||
$dart\
|
$dart\
|
||||||
$deno\
|
$deno\
|
||||||
$dotnet\
|
$dotnet\
|
||||||
@ -202,6 +206,7 @@ $helm\
|
|||||||
$java\
|
$java\
|
||||||
$julia\
|
$julia\
|
||||||
$kotlin\
|
$kotlin\
|
||||||
|
$lua\
|
||||||
$nim\
|
$nim\
|
||||||
$nodejs\
|
$nodejs\
|
||||||
$ocaml\
|
$ocaml\
|
||||||
@ -209,6 +214,7 @@ $perl\
|
|||||||
$php\
|
$php\
|
||||||
$purescript\
|
$purescript\
|
||||||
$python\
|
$python\
|
||||||
|
$rlang\
|
||||||
$red\
|
$red\
|
||||||
$ruby\
|
$ruby\
|
||||||
$rust\
|
$rust\
|
||||||
@ -229,7 +235,6 @@ $crystal\
|
|||||||
$custom\
|
$custom\
|
||||||
$cmd_duration\
|
$cmd_duration\
|
||||||
$line_break\
|
$line_break\
|
||||||
$lua\
|
|
||||||
$jobs\
|
$jobs\
|
||||||
$battery\
|
$battery\
|
||||||
$time\
|
$time\
|
||||||
@ -238,6 +243,13 @@ $shell\
|
|||||||
$character"""
|
$character"""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Eg.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# Move the directory to the second line
|
||||||
|
format="$all$directory$character"
|
||||||
|
```
|
||||||
|
|
||||||
## AWS
|
## AWS
|
||||||
|
|
||||||
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. This module also shows an expiration timer when using temporary credentials.
|
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. This module also shows an expiration timer when using temporary credentials.
|
||||||
@ -479,6 +491,36 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
|||||||
|
|
||||||
\*: This variable can only be used as a part of a style string
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
|
## COBOL / GNUCOBOL
|
||||||
|
|
||||||
|
The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
|
- The current directory contains any files ending in `.cob` or `.COB`
|
||||||
|
- The current directory contains any files ending in `.cbl` or `.CBL`
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||||
|
| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. |
|
||||||
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
|
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||||
|
| `style` | `"bold blue"` | The style for the module. |
|
||||||
|
| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. |
|
||||||
|
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||||
|
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||||
|
| `disabled` | `false` | Disables the `cobol` module. |
|
||||||
|
|
||||||
|
### Variables
|
||||||
|
|
||||||
|
| Variable | Example | Description |
|
||||||
|
| --------- | ---------- | ------------------------------------ |
|
||||||
|
| version | `v3.1.2.0` | The version of `cobol` |
|
||||||
|
| symbol | | Mirrors the value of option `symbol` |
|
||||||
|
| style\* | | Mirrors the value of option `style` |
|
||||||
|
|
||||||
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
## Command Duration
|
## Command Duration
|
||||||
|
|
||||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||||
@ -530,7 +572,7 @@ format = "underwent [$duration](bold yellow)"
|
|||||||
|
|
||||||
## Conda
|
## Conda
|
||||||
|
|
||||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
|
|
||||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
|||||||
format = "via [e $version](bold red) "
|
format = "via [e $version](bold red) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Fill
|
||||||
|
|
||||||
|
The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules.
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| -------- | -------------- | --------------------------------- |
|
||||||
|
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||||
|
| `style` | `"bold black"` | The style for the module. |
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
format="AA $fill BB $fill CC"
|
||||||
|
|
||||||
|
[fill]
|
||||||
|
symbol = "-"
|
||||||
|
style = "bold green"
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt that looks like:
|
||||||
|
|
||||||
|
```
|
||||||
|
AA -------------------------------------------- BB -------------------------------------------- CC
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## Google Cloud (`gcloud`)
|
## Google Cloud (`gcloud`)
|
||||||
|
|
||||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||||
@ -1205,12 +1276,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||||
| `added_style` | `"bold green"` | The style for the added count. |
|
| `added_style` | `"bold green"` | The style for the added count. |
|
||||||
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
||||||
| `format` | `'[+$added]($added_style) [-$deleted]($deleted_style) '` | The format for the module. |
|
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
|
||||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||||
|
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
|
|
||||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
|||||||
behind = "⇣${count}"
|
behind = "⇣${count}"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Golang
|
## Go
|
||||||
|
|
||||||
The `golang` module shows the currently installed version of [Golang](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
The `golang` module shows the currently installed version of [Go](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- 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
|
||||||
@ -2041,18 +2113,18 @@ symbol = "☁️ "
|
|||||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||||
|
|
||||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
- [**Nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
- [**Poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
- [**Python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
- [**Composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
- [**Gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
- [**Julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||||
- [**mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
- [**Mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
||||||
- [**helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||||
- [**maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||||
- [**meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` 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.
|
||||||
|
|
||||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
|||||||
|
|
||||||
## R
|
## R
|
||||||
|
|
||||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- The current directory contains a file with the `.R` extension.
|
- The current directory contains a file with the `.R` extension.
|
||||||
- The current directory contains a file with the `.Rd` extension.
|
- The current directory contains a file with the `.Rd` extension.
|
||||||
@ -2539,7 +2611,7 @@ disabled = false
|
|||||||
|
|
||||||
## SHLVL
|
## SHLVL
|
||||||
|
|
||||||
The `shlvl` module shows the current `SHLVL` ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
|||||||
format = "via [⍱ $version](bold white) "
|
format = "via [⍱ $version](bold white) "
|
||||||
```
|
```
|
||||||
|
|
||||||
## VLang
|
## V
|
||||||
|
|
||||||
The `vlang` module shows you your currently installed version of V. By default the module will be shown if any of the following conditions are met:
|
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
|
||||||
- The current directory contains a file with `.v` extension
|
- The current directory contains a file with `.v` extension
|
||||||
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
||||||
|
|
||||||
@ -2925,7 +2997,7 @@ The `vlang` module shows you your currently installed version of V. By default t
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
# ~/.config/starship.toml
|
# ~/.config/starship.toml
|
||||||
[v]
|
[vlang]
|
||||||
format = "via [V $version](blue bold) "
|
format = "via [V $version](blue bold) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
|
||||||
|
|
||||||
|
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||||
|
|
||||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,6 +68,33 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Style Strings
|
## Style Strings
|
||||||
|
|
||||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
@ -75,7 +75,7 @@ A text group is made up of two different parts.
|
|||||||
|
|
||||||
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
||||||
|
|
||||||
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part.
|
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@ -142,12 +142,14 @@ This is the list of prompt-wide configuration options.
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||||
|
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@ -179,6 +181,7 @@ format = """
|
|||||||
$username\
|
$username\
|
||||||
$hostname\
|
$hostname\
|
||||||
$shlvl\
|
$shlvl\
|
||||||
|
$singularity\
|
||||||
$kubernetes\
|
$kubernetes\
|
||||||
$directory\
|
$directory\
|
||||||
$vcsh\
|
$vcsh\
|
||||||
@ -191,6 +194,7 @@ $hg_branch\
|
|||||||
$docker_context\
|
$docker_context\
|
||||||
$package\
|
$package\
|
||||||
$cmake\
|
$cmake\
|
||||||
|
$cobol\
|
||||||
$dart\
|
$dart\
|
||||||
$deno\
|
$deno\
|
||||||
$dotnet\
|
$dotnet\
|
||||||
@ -202,6 +206,7 @@ $helm\
|
|||||||
$java\
|
$java\
|
||||||
$julia\
|
$julia\
|
||||||
$kotlin\
|
$kotlin\
|
||||||
|
$lua\
|
||||||
$nim\
|
$nim\
|
||||||
$nodejs\
|
$nodejs\
|
||||||
$ocaml\
|
$ocaml\
|
||||||
@ -209,6 +214,7 @@ $perl\
|
|||||||
$php\
|
$php\
|
||||||
$purescript\
|
$purescript\
|
||||||
$python\
|
$python\
|
||||||
|
$rlang\
|
||||||
$red\
|
$red\
|
||||||
$ruby\
|
$ruby\
|
||||||
$rust\
|
$rust\
|
||||||
@ -229,7 +235,6 @@ $crystal\
|
|||||||
$custom\
|
$custom\
|
||||||
$cmd_duration\
|
$cmd_duration\
|
||||||
$line_break\
|
$line_break\
|
||||||
$lua\
|
|
||||||
$jobs\
|
$jobs\
|
||||||
$battery\
|
$battery\
|
||||||
$time\
|
$time\
|
||||||
@ -238,6 +243,13 @@ $shell\
|
|||||||
$character"""
|
$character"""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Eg.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# Move the directory to the second line
|
||||||
|
format="$all$directory$character"
|
||||||
|
```
|
||||||
|
|
||||||
## AWS
|
## AWS
|
||||||
|
|
||||||
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. This module also shows an expiration timer when using temporary credentials.
|
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. This module also shows an expiration timer when using temporary credentials.
|
||||||
@ -479,6 +491,36 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
|||||||
|
|
||||||
\*: This variable can only be used as a part of a style string
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
|
## COBOL / GNUCOBOL
|
||||||
|
|
||||||
|
The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
|
- The current directory contains any files ending in `.cob` or `.COB`
|
||||||
|
- The current directory contains any files ending in `.cbl` or `.CBL`
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||||
|
| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. |
|
||||||
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
|
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||||
|
| `style` | `"bold blue"` | The style for the module. |
|
||||||
|
| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. |
|
||||||
|
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||||
|
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||||
|
| `disabled` | `false` | Disables the `cobol` module. |
|
||||||
|
|
||||||
|
### Variables
|
||||||
|
|
||||||
|
| Variable | Example | Description |
|
||||||
|
| --------- | ---------- | ------------------------------------ |
|
||||||
|
| version | `v3.1.2.0` | The version of `cobol` |
|
||||||
|
| symbol | | Mirrors the value of option `symbol` |
|
||||||
|
| style\* | | Mirrors the value of option `style` |
|
||||||
|
|
||||||
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
## Command Duration
|
## Command Duration
|
||||||
|
|
||||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||||
@ -530,7 +572,7 @@ format = "underwent [$duration](bold yellow)"
|
|||||||
|
|
||||||
## Conda
|
## Conda
|
||||||
|
|
||||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
|
|
||||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
|||||||
format = "via [e $version](bold red) "
|
format = "via [e $version](bold red) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Fill
|
||||||
|
|
||||||
|
The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules.
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| -------- | -------------- | --------------------------------- |
|
||||||
|
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||||
|
| `style` | `"bold black"` | The style for the module. |
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
format="AA $fill BB $fill CC"
|
||||||
|
|
||||||
|
[fill]
|
||||||
|
symbol = "-"
|
||||||
|
style = "bold green"
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt that looks like:
|
||||||
|
|
||||||
|
```
|
||||||
|
AA -------------------------------------------- BB -------------------------------------------- CC
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## Google Cloud (`gcloud`)
|
## Google Cloud (`gcloud`)
|
||||||
|
|
||||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||||
@ -1205,12 +1276,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||||
| `added_style` | `"bold green"` | The style for the added count. |
|
| `added_style` | `"bold green"` | The style for the added count. |
|
||||||
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
||||||
| `format` | `'[+$added]($added_style) [-$deleted]($deleted_style) '` | The format for the module. |
|
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
|
||||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||||
|
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
|
|
||||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
|||||||
behind = "⇣${count}"
|
behind = "⇣${count}"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Golang
|
## Go
|
||||||
|
|
||||||
The `golang` module shows the currently installed version of [Golang](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
The `golang` module shows the currently installed version of [Go](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- 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
|
||||||
@ -2041,18 +2113,18 @@ symbol = "☁️ "
|
|||||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||||
|
|
||||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
- [**Nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
- [**Poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
- [**Python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
- [**Composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
- [**Gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
- [**Julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||||
- [**mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
- [**Mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
||||||
- [**helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||||
- [**maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||||
- [**meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` 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.
|
||||||
|
|
||||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
|||||||
|
|
||||||
## R
|
## R
|
||||||
|
|
||||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- The current directory contains a file with the `.R` extension.
|
- The current directory contains a file with the `.R` extension.
|
||||||
- The current directory contains a file with the `.Rd` extension.
|
- The current directory contains a file with the `.Rd` extension.
|
||||||
@ -2539,7 +2611,7 @@ disabled = false
|
|||||||
|
|
||||||
## SHLVL
|
## SHLVL
|
||||||
|
|
||||||
The `shlvl` module shows the current `SHLVL` ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
|||||||
format = "via [⍱ $version](bold white) "
|
format = "via [⍱ $version](bold white) "
|
||||||
```
|
```
|
||||||
|
|
||||||
## VLang
|
## V
|
||||||
|
|
||||||
The `vlang` module shows you your currently installed version of V. By default the module will be shown if any of the following conditions are met:
|
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
|
||||||
- The current directory contains a file with `.v` extension
|
- The current directory contains a file with `.v` extension
|
||||||
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
||||||
|
|
||||||
@ -2925,7 +2997,7 @@ The `vlang` module shows you your currently installed version of V. By default t
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
# ~/.config/starship.toml
|
# ~/.config/starship.toml
|
||||||
[v]
|
[vlang]
|
||||||
format = "via [V $version](blue bold) "
|
format = "via [V $version](blue bold) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -44,30 +44,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -76,14 +52,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -100,6 +68,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -109,6 +101,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -156,8 +164,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
بۆ نوێکردنەوەی Starship خۆی، نووسینەکەی سەرەوە ڕەن بکەوە. وەشانی ئێستا دەگۆڕێت بێ ئەوەی دەسکاری ڕێکخستنەکانی Starship بکات.
|
|
||||||
|
|
||||||
|
بۆ نوێکردنەوەی Starship خۆی، نووسینەکەی سەرەوە ڕەن بکەوە. وەشانی ئێستا دەگۆڕێت بێ ئەوەی دەسکاری ڕێکخستنەکانی Starship بکات.
|
||||||
|
|
||||||
**تێبینی** - بنەڕەتییەکانی سکریپتی دامەزراندن ئەتوانرێ بگۆڕدرێ سەیری یارمەتی نێوخۆیی بکە.
|
**تێبینی** - بنەڕەتییەکانی سکریپتی دامەزراندن ئەتوانرێ بگۆڕدرێ سەیری یارمەتی نێوخۆیی بکە.
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,9 +68,36 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Beispiel
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Style-Strings
|
## Style-Strings
|
||||||
|
|
||||||
Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben keine Groß- und Kleinschreibung (z.B. `bold` und `BoLd` werden als dieselbe Zeichenkette betrachtet). Jedes Wort kann eines der folgenden sein:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
|
||||||
- `bold`
|
- `bold`
|
||||||
- `italic`
|
- `italic`
|
||||||
@ -82,14 +109,14 @@ Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben kein
|
|||||||
- `<color>`
|
- `<color>`
|
||||||
- `none`
|
- `none`
|
||||||
|
|
||||||
wobei `<color>` eine Farbspezifikation ist (siehe unten). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. Die Reihenfolge der Wörter in der Liste spielt keine Rolle.
|
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||||
|
|
||||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. In der Zukunft könnte die Unterstützung von `none` in Verbindung mit anderen Tokens fallen gelassen werden.
|
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||||
|
|
||||||
Eine Farbspezifikation kann wie folgt aussehen:
|
A color specifier can be one of the following:
|
||||||
|
|
||||||
- Einer der Standardfarben der Konsole: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Optional kann ein `bright-` vorangestellt werden um die helle Version zu erhalten (z.B. `bright-white`).
|
- Einer der Standardfarben der Konsole: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Optional kann ein `bright-` vorangestellt werden um die helle Version zu erhalten (z.B. `bright-white`).
|
||||||
- Eine `#` gefolgt von einer sechsstelligen Hexadezimalnummer. Dies ergibt einen [RGB hex Farbcode](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
- Eine `#` gefolgt von einer sechsstelligen Hexadezimalnummer. Dies ergibt einen [RGB hex Farbcode](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||||
- Eine Zahl zwischen 0-255. Dies ergibt einen [8-bit ANSI-Farbcode](https://i.stack.imgur.com/KTSQa.png).
|
- Eine Zahl zwischen 0-255. Dies ergibt einen [8-bit ANSI-Farbcode](https://i.stack.imgur.com/KTSQa.png).
|
||||||
|
|
||||||
Wenn mehrere Farben für Vordergrund oder Hintergrund angegeben werden, hat die letzte Farbe der Zeichenkette Priorität.
|
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="Englisch"
|
alt="Englisch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Russisch"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -111,7 +103,23 @@
|
|||||||
><img
|
><img
|
||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Vietnamesisch"
|
alt="Tiếng Việt"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
/></a>
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
Um Starship selbst zu aktualisieren, lasse das Skript oben nochmal laufen. Es wird die vorhandene Version ersetzen, ohne die Konfiguration von Starship zu berühren.
|
|
||||||
|
|
||||||
|
Um Starship selbst zu aktualisieren, lasse das Skript oben nochmal laufen. Es wird die vorhandene Version ersetzen, ohne die Konfiguration von Starship zu berühren.
|
||||||
|
|
||||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ features:
|
|||||||
footer: Bajo una licencia ISC | Derechos de autor © 2019-presente Colaboradores de Starship
|
footer: Bajo una licencia ISC | Derechos de autor © 2019-presente Colaboradores de Starship
|
||||||
#Used for the description meta tag, for SEO
|
#Used for the description meta tag, for SEO
|
||||||
metaTitle: "Starship: el prompt multi-intérprete"
|
metaTitle: "Starship: el prompt multi-intérprete"
|
||||||
description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos! Muestra la información que necesitas, a la par que es elegante y minimalista. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.'
|
description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos! Muestra la información que necesitas, a la par que es elegante y minimalista. Instalación rápida disponible para Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, y PowerShell.'
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="center">
|
<div class="center">
|
||||||
@ -143,7 +143,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
|||||||
|
|
||||||
#### Nushell
|
#### Nushell
|
||||||
|
|
||||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
::: advertencia Esto cambiará en el futuro. Sólo se admite la versión nu v0.33 o superior. ::: Añade lo siguiente a tu archivo de configuración nu. Puedes comprobar la ubicación de este archivo ejecutando `ruta de configuración` en nu.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
startup = [
|
startup = [
|
||||||
@ -157,7 +157,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
|||||||
|
|
||||||
#### Xonsh
|
#### Xonsh
|
||||||
|
|
||||||
Add the following to the end of `~/.xonshrc`:
|
Añade lo siguiente al final de `~/.xonshrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.xonshrc
|
# ~/.xonshrc
|
||||||
|
@ -21,7 +21,7 @@ function blastoff(){
|
|||||||
starship_precmd_user_func="blastoff"
|
starship_precmd_user_func="blastoff"
|
||||||
```
|
```
|
||||||
|
|
||||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No obstante, ¡**debes** atrapar la señal DEBUG *antes* de inicializar Starship! Starship puede preservar el valor de la trampa DEBUG, pero si la trampa es reemplazada después de que Starship inicie, alguna funcionalidad fallará.
|
- Para ejecutar una función personalizada antes de que un comando sea ejecutado, es posible usar el [mecanismo de trampa `DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No obstante, ¡**debes** atrapar la señal DEBUG *antes* de inicializar Starship! Starship puede preservar el valor de la trampa DEBUG, pero si la trampa es reemplazada después de que Starship inicie, alguna funcionalidad fallará.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
function blastoff(){
|
function blastoff(){
|
||||||
@ -33,7 +33,7 @@ eval $(starship init bash)
|
|||||||
|
|
||||||
## Cambiar el Título de la Ventana
|
## Cambiar el Título de la Ventana
|
||||||
|
|
||||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish incluso lo hace por defecto. Starship no hace esto, pero es bastante sencillo añadir esta funcionalidad a `Bash` o `zsh`.
|
Algunos intérpretes de comandos van a cambiar automáticamente el título de la ventana por ti (p. ej., para mostrar tu directorio actual). Fish incluso lo hace por defecto. Starship no hace esto, pero es bastante sencillo añadir esta funcionalidad a `Bash` o `zsh`.
|
||||||
|
|
||||||
Primero, define una función para el cambio de título de la ventana (idéntico en Bash y zsh):
|
Primero, define una función para el cambio de título de la ventana (idéntico en Bash y zsh):
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ En `zsh`, añade esto al array `precmd_functions`:
|
|||||||
precmd_functions+=(set_win_title)
|
precmd_functions+=(set_win_title)
|
||||||
```
|
```
|
||||||
|
|
||||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
Si te gusta el resultado, añade estas líneas a tu archivo de configuración del intérprete de comandos (`~/.bashrc` o `~/.zsrhc`) para hacerlo permanente.
|
||||||
|
|
||||||
Por ejemplo, si quieres mostrar tu directorio actual en el título de la pestaña de la terminal, añade el siguiente fragmento a tu `~/.bashrc` o `~/.zshrc`:
|
Por ejemplo, si quieres mostrar tu directorio actual en el título de la pestaña de la terminal, añade el siguiente fragmento a tu `~/.bashrc` o `~/.zshrc`:
|
||||||
|
|
||||||
@ -68,7 +68,34 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Cadenas de Estilo
|
## Gabilitar Prompt Derecho
|
||||||
|
|
||||||
|
Algunos intérpretes de órdenes soportan un prompt derecho que se renderiza en la misma línea que la entrada. Starship puede establecer el contenido del prompt correcto usando la opción `right_format`. Cualquier módulo que pueda ser usado en `format` también es soportado en `right_format`. La variable `$all` solo contendrá módulos no utilizados explícitamente en `format` o `right_format`.
|
||||||
|
|
||||||
|
Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo fill](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` está actualmente soportado para los siguientes intérpretes de comandos: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Ejemplo
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship. oml
|
||||||
|
|
||||||
|
# Un prompt izquierdo mínimo
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# mueve el resto del mensaje a la derecha
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produce un prompt como el siguiente:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Cadenas de estilo
|
||||||
|
|
||||||
Las cadenas de estilo son una lista de palabras, separadas por espacios en blanco. Las palabras no son sensibles a mayúsculas (es decir, `bold` y `BoLd` se consideran la misma cadena). Cada palabra puede ser una de las siguientes:
|
Las cadenas de estilo son una lista de palabras, separadas por espacios en blanco. Las palabras no son sensibles a mayúsculas (es decir, `bold` y `BoLd` se consideran la misma cadena). Cada palabra puede ser una de las siguientes:
|
||||||
|
|
||||||
@ -82,9 +109,9 @@ Las cadenas de estilo son una lista de palabras, separadas por espacios en blanc
|
|||||||
- `<color>`
|
- `<color>`
|
||||||
- `none`
|
- `none`
|
||||||
|
|
||||||
donde `<color>` es un especificador de color (discutido a continuación). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. El orden de las palabras en la cadena no importa.
|
donde `<color>` es un especificador de color (discutido a continuación). `fg:<color>` y `<color>` hacen actualmente lo mismo, aunque esto puede cambiar en el futuro. `inverted` cambia el fondo y los colores de primer plano. El orden de las palabras en la cadena no importa.
|
||||||
|
|
||||||
El token `none` anula todos los demás tokens en una cadena si no es parte de un especificador `bg:`, de modo que por ejemplo `fg:red none fg:blue` creará una cadena sin ningún estilo. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. Puede convertirse en un error usar `none` junto con otros tokens en el futuro.
|
El token `none` anula todos los demás tokens en una cadena si no es parte de un especificador `bg:`, de modo que por ejemplo `fg:red none fg:blue` creará una cadena sin ningún estilo. `bg:none` establece el fondo al color por defecto, así que `fg:red bg:none` es equivalente a `red` o `fg:red` y `bg:green fg:red bg:none` también es equivalente a `fg:red` o `red`. Puede convertirse en un error usar `none` junto con otros tokens en el futuro.
|
||||||
|
|
||||||
Un especificador de color puede ser uno de los siguientes:
|
Un especificador de color puede ser uno de los siguientes:
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -103,7 +71,31 @@
|
|||||||
><img
|
><img
|
||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Francés"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
Para actualizar Starship, vuelve a ejecutar el guión anterior. Reemplazará la versión actual sin tocar la configuración de Starship.
|
|
||||||
|
|
||||||
|
Para actualizar Starship, vuelve a ejecutar el guión anterior. Reemplazará la versión actual sin tocar la configuración de Starship.
|
||||||
|
|
||||||
**Nota** - Los valores por defecto del guión de instalación se pueden anular (ver la ayuda incorporada).
|
**Nota** - Los valores por defecto del guión de instalación se pueden anular (ver la ayuda incorporada).
|
||||||
|
|
||||||
@ -266,7 +274,7 @@
|
|||||||
|
|
||||||
#### Xonsh
|
#### Xonsh
|
||||||
|
|
||||||
Add the following to the end of `~/.xonshrc`:
|
Añade lo siguiente al final de `~/.xonshrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.xonshrc
|
# ~/.xonshrc
|
||||||
@ -277,7 +285,7 @@
|
|||||||
|
|
||||||
#### Nushell
|
#### Nushell
|
||||||
|
|
||||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
**Advertencia** Esto cambiará en el futuro. Sólo se admite la versión nu v0.33 o superior. Añade lo siguiente a tu archivo de configuración nu. Puedes comprobar la ubicación de este archivo ejecutando `ruta de configuración` en nu.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
startup = [
|
startup = [
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -363,11 +369,11 @@ symbol = "scala "
|
|||||||
symbol = "swift "
|
symbol = "swift "
|
||||||
```
|
```
|
||||||
|
|
||||||
## Hide Runtime Versions
|
## Ocultar versiones en tiempo de ejecución
|
||||||
|
|
||||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
Esta configuración predeterminada oculta la versión de los tiempos de ejecución del idioma. Si trabajas en contenedores o entornos virtualizados, ¡ésto es para ti!
|
||||||
|
|
||||||
![Screenshot of Hide Runtime Versions preset](/presets/hide-runtime-versions.png)
|
![Captura de pantalla ajustes de Ocultar versiones de tiempo de ejecución](/presets/hide-runtime-versions.png)
|
||||||
|
|
||||||
### Configuración
|
### Configuración
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,9 +68,36 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Exemple
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Chaînes de style
|
## Chaînes de style
|
||||||
|
|
||||||
Les chaînes de style sont une liste de mots, séparés par des espaces. Les mots ne sont pas sensibles à la casse (c'est-à-dire `gras` et `GrAs` sont considérés comme le même mot). Chaque mot peut être l'un des suivants :
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
|
||||||
- `bold`
|
- `bold`
|
||||||
- `italic`
|
- `italic`
|
||||||
@ -82,14 +109,14 @@ Les chaînes de style sont une liste de mots, séparés par des espaces. Les mot
|
|||||||
- `<couleur>`
|
- `<couleur>`
|
||||||
- `none`
|
- `none`
|
||||||
|
|
||||||
où `<couleur>` est un spécificateur de couleur (discuté ci-dessous). `fg:<color>` et `<color>` font actuellement la même chose, bien que cela puisse changer dans le futur. `inverted` permute les couleurs de fond et de premier plan. L'ordre des mots dans la chaîne n'a pas d'importance.
|
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||||
|
|
||||||
La valeur `none` remplace toutes les autres valeurs si elle n'est pas incluse dans un spécificateur `bg:`, de sorte que par exemple `fg: red none fg:blue` créera une chaîne sans style. `bg:none` définit l'arrière plan sur la couleur par défaut, donc `fg:red bg:none` est équivalent à `red` ou `fg:red` et `bg:green fg:red bg:none` est aussi équivalent à `fg:red` ou `red`. Utiliser `none` avec d'autres valeurs peut éventuellement devenir une erreur dans le futur.
|
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||||
|
|
||||||
Un spécificateur de couleur peut être l'un des éléments suivants :
|
A color specifier can be one of the following:
|
||||||
|
|
||||||
- Une des couleurs standard du terminal : `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Vous pouvez éventuellement les préfixer avec `bright-` pour obtenir la version lumineuse (par exemple `bright-white`).
|
- Une des couleurs standard du terminal : `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Vous pouvez éventuellement les préfixer avec `bright-` pour obtenir la version lumineuse (par exemple `bright-white`).
|
||||||
- Un `#` suivi d'un nombre hexadécimal de six chiffres. Ceci spécifie un [ Code hexadécimal de couleur RVB ](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
- Un `#` suivi d'un nombre hexadécimal de six chiffres. Ceci spécifie un [ Code hexadécimal de couleur RVB ](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||||
- Un nombre entre 0 et 255. Ceci spécifie un [code de couleur ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
|
- Un nombre entre 0 et 255. Ceci spécifie un [code de couleur ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
|
||||||
|
|
||||||
Si plusieurs couleurs sont spécifiées pour le premier plan ou l'arrière-plan, celle spécifiée en dernier sera prioritaire.
|
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -95,7 +63,7 @@
|
|||||||
><img
|
><img
|
||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||||
alt="Espagnol"
|
alt="Español"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
Pour mettre à jour Starship, relancez le script ci-dessus. Cela remplacera la version actuelle sans toucher à la configuration de Starship.
|
|
||||||
|
|
||||||
|
Pour mettre à jour Starship, relancez le script ci-dessus. Cela remplacera la version actuelle sans toucher à la configuration de Starship.
|
||||||
|
|
||||||
**Note** - Les valeurs par défaut du script d'installation peuvent être remplacées, voir l'aide intégrée.
|
**Note** - Les valeurs par défaut du script d'installation peuvent être remplacées, voir l'aide intégrée.
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -3,22 +3,22 @@ home: true
|
|||||||
heroImage: /logo.svg
|
heroImage: /logo.svg
|
||||||
heroText:
|
heroText:
|
||||||
tagline: Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!
|
tagline: Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!
|
||||||
actionText: Mulai
|
actionText: Mari Mulai →
|
||||||
actionLink: ./guide/
|
actionLink: ./guide/
|
||||||
features:
|
features:
|
||||||
-
|
-
|
||||||
title: Kompabilitas Yang Utama
|
title: Mengutamakan Kompabilitas
|
||||||
details: Dapat bekerja di shells yang paling biasa dengan sistem operasi yang paling biasa. Bisa digunakan di mana saja!
|
details: Dapat bekerja di shells yang paling biasa dengan sistem operasi yang paling biasa. Bisa digunakan di mana saja!
|
||||||
-
|
-
|
||||||
title: Dibuat Dengan Rust
|
title: Dibuat Dengan Rust
|
||||||
details: Menggunakan kecepatan dan keamaan dari Rust, untuk membuat prompt anda bekerja secepat mungkin dan dapat diandalkan.
|
details: Menggunakan kecepatan dan keamanan dari Rust, untuk membuat prompt kamu bekerja secepat dan seandal mungkin.
|
||||||
-
|
-
|
||||||
title: Dapat Diatur
|
title: Dapat Dikustomisasi
|
||||||
details: Semua detail kecil yang ada dapat kamu atur sesukamu, mungkin untuk membuat prompt yang seminimal mungkin atau kaya fitur seperti yang kamu inginkan.
|
details: Semua detail kecil yang ada dapat kamu atur sesukamu, entah untuk membuatnya sebagai prompt yang seminimal mungkin atau mungkin kaya akan fitur sesuai keinginanmu.
|
||||||
footer: Berlisensi ISC | Hak Cipta © 2019-sekarang Kontributor Starship
|
footer: Berlisensi ISC | Hak Cipta © 2019-sekarang Kontributor Starship
|
||||||
#Used for the description meta tag, for SEO
|
#Used for the description meta tag, for SEO
|
||||||
metaTitle: "Starship: Prompt Lintas Shell"
|
metaTitle: "Starship: Prompt Lintas Shell"
|
||||||
description: Starship merupakan prompt yang minimal, super cepat, dan sangat bisa diatur untuk semua shell! Menampilkan info yang dibutuhkan, namun tetap bisa tampil ramping dan minimal. Instalasi sederhana tersedia untuk Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, dan PowerShell.
|
description: Starship merupakan sebuah prompt yang minimal, super cepat, dan sangat bisa untuk dikustomisasi untuk shell apapun! Bisa menampilkan informasi yang kamu butuhkan, namun tetap bisa tampil dengan ramping dan minimal. Instalasi sederhana tersedia untuk Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, dan PowerShell.
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="center">
|
<div class="center">
|
||||||
@ -30,7 +30,7 @@ description: Starship merupakan prompt yang minimal, super cepat, dan sangat bis
|
|||||||
|
|
||||||
### Prasyarat
|
### Prasyarat
|
||||||
|
|
||||||
- [Nerd Font](https://www.nerdfonts.com/) yang telah terinstalasi dan telah diaktifkan di terminal.
|
- [Nerd Font](https://www.nerdfonts.com/) yang telah terinstalasi dan telah diaktifkan di dalam terminal.
|
||||||
|
|
||||||
### Instalasi Sederhana
|
### Instalasi Sederhana
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ description: Starship merupakan prompt yang minimal, super cepat, dan sangat bis
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
Untuk memperbarui Starship, jalankan kembali skrip di atas. Hal ini dapat memperbarui versi yang terpasang tanpa menyentuh konfigurasi Starship.
|
Untuk memperbarui Starship, jalankan kembali skrip di atas. Hal ini dapat memperbarui versi yang terpasang tanpa mengubah konfigurasi Starship.
|
||||||
|
|
||||||
|
|
||||||
#### Pasang Melalui Package Manager
|
#### Pasang Melalui Package Manager
|
||||||
@ -61,7 +61,7 @@ description: Starship merupakan prompt yang minimal, super cepat, dan sangat bis
|
|||||||
scoop install starship
|
scoop install starship
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Tambahkan skrip init ke file konfigurasi Shell:
|
1. Tambahkan skrip init ke dalam file konfigurasi Shell:
|
||||||
|
|
||||||
|
|
||||||
#### Bash
|
#### Bash
|
||||||
@ -119,7 +119,7 @@ description: Starship merupakan prompt yang minimal, super cepat, dan sangat bis
|
|||||||
|
|
||||||
#### Elvish
|
#### Elvish
|
||||||
|
|
||||||
::: warning Cuma elvish v0.15 atau yang lebih baru yang tengah didukung. :::
|
::: warning Hanya elvish v0.15 atau versi yang lebih baru yang mendapat dukungan pengembangan. :::
|
||||||
|
|
||||||
Tambahkan skrip berikut pada baris akhir `~/.elvish/rc.elv`:
|
Tambahkan skrip berikut pada baris akhir `~/.elvish/rc.elv`:
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ description: Starship merupakan prompt yang minimal, super cepat, dan sangat bis
|
|||||||
|
|
||||||
#### Nushell
|
#### Nushell
|
||||||
|
|
||||||
::: peringatan Hal ini dapat berubah di kemudian hari. Hanya nu versi v0.33 atau lebih baru yang tengah didukung. ::: Tambahkan skrip berikut ke dalam file konfigurasi nu. Lokasi dari file ini dapat dicek dengan menjalankan `config path` pada nu.
|
::: peringatan Hal ini dapat berubah di kemudian hari. Hanya nu versi v0.33 atau versi terbaru yang mendapat dukungan pengembangan. ::: Tambahkan skrip berikut ke dalam file konfigurasi nu. Lokasi dari file ini dapat dicek dengan menjalankan `config path` pada nu.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
startup = [
|
startup = [
|
||||||
|
@ -8,7 +8,7 @@ Konfigurasi pada bagian ini dapat berubah saat pembaruan Starship rilis di kemud
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Kostumisasi Perintah pre-prompt dan pre-execution Pada Bash
|
## Kustomisasi Perintah pre-prompt dan pre-execution Pada Bash
|
||||||
|
|
||||||
Bash tidak memiliki framework preexec/precmd yang tetap seperti kebanyakan shell pada umumnya. Oleh karena itu, sulit halnya untuk membuat hook yang dapat dikustomisasi sepenuhnya di dalam `bash`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering:
|
Bash tidak memiliki framework preexec/precmd yang tetap seperti kebanyakan shell pada umumnya. Oleh karena itu, sulit halnya untuk membuat hook yang dapat dikustomisasi sepenuhnya di dalam `bash`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering:
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ function blastoff(){
|
|||||||
starship_precmd_user_func="blastoff"
|
starship_precmd_user_func="blastoff"
|
||||||
```
|
```
|
||||||
|
|
||||||
- Untuk menjalankan fungsi buatan tepat sebelum commands berjalan, kamu bisa menggunakan [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Akan tetapi, kamu **harus** melakukan proses trap pada DEBUG signal *sebelum* menjalankan Starship! Starship bisa menyimpan nilai dari DEBUG trap, tapi jika trap diganti setelah starship berjalan, beberapa fungsi akan rusak.
|
- Untuk menjalankan fungsi yang dikustomisasi tepat sebelum commands berjalan, kamu bisa menggunakan [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Akan tetapi, kamu **harus** melakukan proses trap pada DEBUG signal *sebelum* menjalankan Starship! Starship bisa menyimpan nilai dari DEBUG trap, tapi jika trap diganti setelah starship berjalan, beberapa fungsi akan rusak.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
function blastoff(){
|
function blastoff(){
|
||||||
@ -33,7 +33,7 @@ eval $(starship init bash)
|
|||||||
|
|
||||||
## Mengubah Judul Window
|
## Mengubah Judul Window
|
||||||
|
|
||||||
Beberapa prompts shell dengan otomatis akan mengubah judul window-nya untukmu (mis. untuk merefleksikan direktori kerjamu). Fish bahkan mengaturnya sebagai bawaan. Starship tidak, tapi mudah saja untuk menambahkan fungsi tersebut ke dalam `bash` ataupun `zsh`.
|
Beberapa prompt shell dengan otomatis akan mengubah judul window-nya untukmu (mis. untuk merefleksikan direktori kerjamu). Fish bahkan mengaturnya sebagai bawaan. Starship tidak, tapi mudah saja untuk menambahkan fungsi tersebut ke dalam `bash` ataupun `zsh`.
|
||||||
|
|
||||||
Pertama, buatlah fungsi untuk mengubah judul window (bekerja pada bash dan zsh):
|
Pertama, buatlah fungsi untuk mengubah judul window (bekerja pada bash dan zsh):
|
||||||
|
|
||||||
@ -57,9 +57,9 @@ Dalam `zsh`, pada array `precmd_functions`, tambahkan:
|
|||||||
precmd_functions+=(set_win_title)
|
precmd_functions+=(set_win_title)
|
||||||
```
|
```
|
||||||
|
|
||||||
Kalau kamu suka hasilnya, tambahkan baris (`~/.bashrc` or `~/.zshrc`) ke dalam file konfigurasi shell-mu untuk membuatnya permanen.
|
Kalau kamu suka hasilnya, tambahkan baris (`~/.bashrc` or `~/.zshrc`) ke dalam file konfigurasi shell milikmu untuk membuatnya permanen.
|
||||||
|
|
||||||
Sebagai contoh, kalau kamu mau menampilkan lokasi direktori pada judul label terminalmu, tambahkan snippet berikut ke dalam `~/.bashrc` atau `~/.zshrc`:
|
Sebagai contoh, kalau kamu mau menampilkan lokasi direktori pada judul label terminalmu, tambahkan bagian berikut ke dalam `~/.bashrc` atau `~/.zshrc`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
function set_win_title(){
|
function set_win_title(){
|
||||||
@ -68,9 +68,36 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` saat ini hanya tersedia pada shell: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Contoh
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Menghasilkan prompt seperti berikut:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Menata String
|
## Menata String
|
||||||
|
|
||||||
Tataan pada strings merupakan sebuah kumpulan kata yang dipisahkan dengan spasi kosong. Kata-katanya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya:
|
Style strings are a list of words, separated by whitespace. Kumpulan katanya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya:
|
||||||
|
|
||||||
- `bold`
|
- `bold`
|
||||||
- `italic`
|
- `italic`
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
Untuk memperbarui Starship, jalankan kembali skrip di atas. Hal ini dapat memperbarui versi yang terpasang tanpa menyentuh konfigurasi Starship.
|
|
||||||
|
|
||||||
|
Untuk memperbarui Starship, jalankan kembali skrip di atas. Hal ini dapat memperbarui versi yang terpasang tanpa menyentuh konfigurasi Starship.
|
||||||
|
|
||||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||||
|
|
||||||
@ -277,7 +285,7 @@
|
|||||||
|
|
||||||
#### Nushell
|
#### Nushell
|
||||||
|
|
||||||
**Warning** This will change in the future. Hanya nu versi v0.33 atau lebih baru yang tengah didukung. Add the following to your nu config file. Lokasi dari file ini dapat dicek dengan menjalankan `config path` pada nu.
|
**Warning** This will change in the future. Hanya nu versi v0.33 atau versi terbaru yang mendapat dukungan pengembangan. Add the following to your nu config file. Lokasi dari file ini dapat dicek dengan menjalankan `config path` pada nu.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
startup = [
|
startup = [
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
# Migrating to v0.45.0
|
# Migrasi ke v0.45.0
|
||||||
|
|
||||||
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
|
Starship v0.45.0 merupakan rilisan dengan perubahan yang signifikan, untuk persiapan v1.0.0 yang besar. Kami membuat beberapa perubahan besar tentang bagaimana konfigurasi dilakukan pada prompt, hingga bagaimana kami mengizinkan tingkat kustomisasi yang lebih luas.
|
||||||
|
|
||||||
This guide is intended to walk you through the breaking changes.
|
Petunjuk berikut memandu kamu ke perubahan besar kami.
|
||||||
|
|
||||||
## `prompt_order` has been replaced by a root-level `format`
|
## `prompt_order` kini digantikan dengan sebuah `format` root-level
|
||||||
|
|
||||||
Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship.
|
Sebelum v0.45.0, `prompt_order` dapat menerima sebuah nama modul dengan urutan yang harusya di-render oleh Starship.
|
||||||
|
|
||||||
Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves.
|
Starship v0.45.0 kini menerima nilai dari `format`, memungkinkan kustomisasi prompt di luar modul itu sendiri.
|
||||||
|
|
||||||
**Example pre-v0.45.0 configuration**
|
**Contoh konfigurasi pra-v0.45.0**
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
prompt_order = [
|
prompt_order = [
|
||||||
@ -31,7 +31,7 @@ prompt_order = [
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example v0.45.0 configuration**
|
**Contoh konfigurasi v0.45.0**
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
format = """\
|
format = """\
|
||||||
@ -52,20 +52,20 @@ format = """\
|
|||||||
"""
|
"""
|
||||||
```
|
```
|
||||||
|
|
||||||
## Module `prefix` and `suffix` have been replaced by `format`
|
## Modul `prefix` dan `suffix` kini digantikan dengan `format`
|
||||||
|
|
||||||
Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered.
|
Sebelum v0.45.0, beberapa modul bisa menerima `prefix` dan/atau `suffix` untuk menata gayanya sesuai yang di-render modul.
|
||||||
|
|
||||||
Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
|
Starship v0.45.0 menerima nilai `format` sebagai gantinya, memungkinkan bagaimana modul di-render untuk kustomisasi yang lebih jauh. Ketimbang membuat prefix dan suffix untuk varibel berbasis konteks, kini variabel dapat disubtitusikan dari sebuah format string, yang mana merepresantikan keluaran dari sebuah modul.
|
||||||
|
|
||||||
**Example pre-v0.45.0 configuration**
|
**Contoh konfigurasi pra-v0.45.0**
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
prefix = "took "
|
prefix = "took "
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example v0.45.0 configuration**
|
**Contoh konfigurasi v0.45.0**
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
@ -78,14 +78,14 @@ format = "took [$duration]($style) "
|
|||||||
|
|
||||||
#### Karakter
|
#### Karakter
|
||||||
|
|
||||||
| Removed Property | Replacement |
|
| Properti Yang Digantikan | Penggantinya |
|
||||||
| ----------------------- | ---------------- |
|
| ------------------------ | ---------------- |
|
||||||
| `symbol` | `success_symbol` |
|
| `symbol` | `success_symbol` |
|
||||||
| `use_symbol_for_status` | `error_symbol` |
|
| `use_symbol_for_status` | `error_symbol` |
|
||||||
| `style_success` | `success_symbol` |
|
| `style_success` | `success_symbol` |
|
||||||
| `style_failure` | `error_symbol` |
|
| `style_failure` | `error_symbol` |
|
||||||
|
|
||||||
**Changes to the Default Configuration**
|
**Perubahan pada konfigurasi bawaan**
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
[character]
|
[character]
|
||||||
@ -98,26 +98,26 @@ format = "took [$duration]($style) "
|
|||||||
++ vicmd_symbol = "[❮](bold green)"
|
++ vicmd_symbol = "[❮](bold green)"
|
||||||
```
|
```
|
||||||
|
|
||||||
Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code.
|
Sebelumnya, properti `use_symbol_for_status` digunakan untuk mengkonfigurasi prompt untuk menampilkan `error_symbol` saat perintah terakhir berakhir dengan nilai code status yang bukan nol.
|
||||||
|
|
||||||
With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties.
|
Dengan rilisnya v0.45.0, kini kita selalu menggunakan `error_symbol` setelah nilai code status yang bukan nol, menggabungkan properti `use_symbol_for_status` dan `error_symbol`.
|
||||||
|
|
||||||
To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file:
|
Untuk mengkonfigurasi prompt agar menggunakan konfigurasi `use_symbol_for_status = true`, tambahkan baris berikut ke dalam file config:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[character]
|
[character]
|
||||||
error_symbol = "[✖](bold red)"
|
error_symbol = "[✖](bold red)"
|
||||||
```
|
```
|
||||||
|
|
||||||
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
*Catatan:* Element `character` secara otomatis menambahkan sebuah spasi setelahnya, jadi tidak seperti `format` string yang lain, kami secara spesifik tidak menambahkannya pada contoh di atas.
|
||||||
|
|
||||||
#### Command Duration
|
#### Durasi Perintah
|
||||||
|
|
||||||
| Removed Property | Replacement |
|
| Properti Yang Digantikan | Penggantinya |
|
||||||
| ---------------- | ----------- |
|
| ------------------------ | ------------ |
|
||||||
| `prefix` | `format` |
|
| `prefix` | `format` |
|
||||||
|
|
||||||
**Changes to the Default Configuration**
|
**Perubahan pada konfigurasi bawaan**
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
@ -125,13 +125,13 @@ error_symbol = "[✖](bold red)"
|
|||||||
++ format = "took [$duration]($style) "
|
++ format = "took [$duration]($style) "
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Directory
|
#### Direktori
|
||||||
|
|
||||||
| Removed Property | Replacement |
|
| Properti Yang Digantikan | Penggantinya |
|
||||||
| ---------------- | ----------- |
|
| ------------------------ | ------------ |
|
||||||
| `prefix` | `format` |
|
| `prefix` | `format` |
|
||||||
|
|
||||||
**Changes to the Default Configuration**
|
**Perubahan pada konfigurasi bawaan**
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
[directory]
|
[directory]
|
||||||
@ -139,14 +139,14 @@ error_symbol = "[✖](bold red)"
|
|||||||
++ format = "[$path]($style)[$read_only]($read_only_style) "
|
++ format = "[$path]($style)[$read_only]($read_only_style) "
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Environment Variable
|
#### Variabel Environment
|
||||||
|
|
||||||
| Removed Property | Replacement |
|
| Properti Yang Digantikan | Penggantinya |
|
||||||
| ---------------- | ----------- |
|
| ------------------------ | ------------ |
|
||||||
| `prefix` | `format` |
|
| `prefix` | `format` |
|
||||||
| `suffix` | `format` |
|
| `suffix` | `format` |
|
||||||
|
|
||||||
**Changes to the Default Configuration**
|
**Perubahan pada konfigurasi bawaan**
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
[env_var]
|
[env_var]
|
||||||
@ -157,12 +157,12 @@ error_symbol = "[✖](bold red)"
|
|||||||
|
|
||||||
#### Git Commit
|
#### Git Commit
|
||||||
|
|
||||||
| Removed Property | Replacement |
|
| Properti Yang Digantikan | Penggantinya |
|
||||||
| ---------------- | ----------- |
|
| ------------------------ | ------------ |
|
||||||
| `prefix` | `format` |
|
| `prefix` | `format` |
|
||||||
| `suffix` | `format` |
|
| `suffix` | `format` |
|
||||||
|
|
||||||
**Changes to the Default Configuration**
|
**Perubahan pada konfigurasi bawaan**
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
[git_commit]
|
[git_commit]
|
||||||
@ -173,13 +173,13 @@ error_symbol = "[✖](bold red)"
|
|||||||
|
|
||||||
#### Git Status
|
#### Git Status
|
||||||
|
|
||||||
| Removed Property | Replacement |
|
| Properti Yang Digantikan | Penggantinya |
|
||||||
| ----------------- | ----------- |
|
| ------------------------ | ------------ |
|
||||||
| `prefix` | `format` |
|
| `prefix` | `format` |
|
||||||
| `suffix` | `format` |
|
| `suffix` | `format` |
|
||||||
| `show_sync_count` | `format` |
|
| `show_sync_count` | `format` |
|
||||||
|
|
||||||
**Changes to the Default Configuration**
|
**Perubahan pada konfigurasi bawaan**
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
[git_status]
|
[git_status]
|
||||||
@ -189,11 +189,11 @@ error_symbol = "[✖](bold red)"
|
|||||||
++ format = '([\[$all_status$ahead_behind\]]($style) )'
|
++ format = '([\[$all_status$ahead_behind\]]($style) )'
|
||||||
```
|
```
|
||||||
|
|
||||||
Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch.
|
Sebelumnya, properti `show_sync_count` digunakan untuk mengkonfigurasi prompt untuk menampilkan jumlah commits dari branch yang terdepan atau terbelakang dari remote branch.
|
||||||
|
|
||||||
With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
|
Dengan rilisnya v0.45.0, hal ini kini digantikan dengan tiga properti terpisah, `ahead`, `behind`, dan `diverged`.
|
||||||
|
|
||||||
To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file:
|
Untuk mengkonfigurasi prompt agar menggunakan konfigurasi `show_sync_count = true`, tambahkan baris berikut ke dalam file config:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[git_status]
|
[git_status]
|
||||||
@ -204,12 +204,12 @@ behind = "⇣${count}"
|
|||||||
|
|
||||||
#### Hostname
|
#### Hostname
|
||||||
|
|
||||||
| Removed Property | Replacement |
|
| Properti Yang Digantikan | Penggantinya |
|
||||||
| ---------------- | ----------- |
|
| ------------------------ | ------------ |
|
||||||
| `prefix` | `format` |
|
| `prefix` | `format` |
|
||||||
| `suffix` | `format` |
|
| `suffix` | `format` |
|
||||||
|
|
||||||
**Changes to the Default Configuration**
|
**Perubahan pada konfigurasi bawaan**
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
[hostname]
|
[hostname]
|
||||||
@ -220,13 +220,13 @@ behind = "⇣${count}"
|
|||||||
|
|
||||||
#### Singularity
|
#### Singularity
|
||||||
|
|
||||||
| Removed Property | Replacement |
|
| Properti Yang Digantikan | Penggantinya |
|
||||||
| ---------------- | ----------- |
|
| ------------------------ | ------------ |
|
||||||
| `label` | `format` |
|
| `label` | `format` |
|
||||||
| `prefix` | `format` |
|
| `prefix` | `format` |
|
||||||
| `suffix` | `format` |
|
| `suffix` | `format` |
|
||||||
|
|
||||||
**Changes to the Default Configuration**
|
**Perubahan pada konfigurasi bawaan**
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
[singularity]
|
[singularity]
|
||||||
@ -235,13 +235,13 @@ behind = "⇣${count}"
|
|||||||
++ format = '[$symbol\[$env\]]($style) '
|
++ format = '[$symbol\[$env\]]($style) '
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Time
|
#### Waktu
|
||||||
|
|
||||||
| Removed Property | Replacement |
|
| Properti Yang Digantikan | Penggantinya |
|
||||||
| ---------------- | ------------- |
|
| ------------------------ | ------------- |
|
||||||
| `format` | `time_format` |
|
| `format` | `time_format` |
|
||||||
|
|
||||||
**Changes to the Default Configuration**
|
**Perubahan pada konfigurasi bawaan**
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
[time]
|
[time]
|
||||||
@ -252,12 +252,12 @@ behind = "⇣${count}"
|
|||||||
|
|
||||||
#### Custom Commands
|
#### Custom Commands
|
||||||
|
|
||||||
| Removed Property | Replacement |
|
| Properti Yang Digantikan | Penggantinya |
|
||||||
| ---------------- | ----------- |
|
| ------------------------ | ------------ |
|
||||||
| `prefix` | `format` |
|
| `prefix` | `format` |
|
||||||
| `suffix` | `format` |
|
| `suffix` | `format` |
|
||||||
|
|
||||||
**Changes to the Default Configuration**
|
**Perubahan pada konfigurasi bawaan**
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
[custom.example]
|
[custom.example]
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
# Presets
|
# Prasetel (Presets)
|
||||||
|
|
||||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
Berikut ini adalah koleksi konfigurasi prasetel dari kumpulan komunita Starship. Jika kamu punya konfigurasi prasetel untuk dibagikan, silakan [kirim PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) untuk memperbarui file ini! 😊
|
||||||
|
|
||||||
## Nerd Font Symbols
|
## Simbol Nerd Font
|
||||||
|
|
||||||
This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye!
|
Konfigurasi prasetel berikut tidak mengubah apapun selain simbol yang digunakan untuk masing-masing modulnya. Kalau kamu enggak suka dengan emoji, hal ini mungkin bisa menarik perhatianmu!
|
||||||
|
|
||||||
![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png)
|
![Tangkapan Layar dari preset simbol Nerd Font](/presets/nerd-font-symbols.png)
|
||||||
|
|
||||||
### Prasyarat
|
### Prasyarat
|
||||||
|
|
||||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
- Nerd Font yang terpasang dan telah diaktifkan di dalam terminal (contoh berikut menggunakan Nerd Font Fira Code)
|
||||||
|
|
||||||
### Konfigurasi
|
### Konfigurasi
|
||||||
|
|
||||||
@ -88,17 +88,17 @@ symbol = " "
|
|||||||
symbol = "ﯣ "
|
symbol = "ﯣ "
|
||||||
```
|
```
|
||||||
|
|
||||||
## Bracketed Segments
|
## Segmen Berkurung
|
||||||
|
|
||||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
Konfigurasi prasetel berikut mengubah format dari seluruh modul bawaan untuk menampilkan segmennya di dalam tanda kurung daripada menggunakan susunan kata bawaan Starship ("via", "on", dll.).
|
||||||
|
|
||||||
Before:
|
Sebelum:
|
||||||
|
|
||||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
![Tangkapan Layar dari konfigurasi bawaan Starship](/presets/bracketed-segments-before.png)
|
||||||
|
|
||||||
After:
|
Sesudah:
|
||||||
|
|
||||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
![Tangkapan Layar dari Segmen Berkurung](/presets/bracketed-segments-after.png)
|
||||||
|
|
||||||
### Konfigurasi
|
### Konfigurasi
|
||||||
|
|
||||||
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -239,17 +242,17 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
format = '\[[$symbol($version)]($style)\]'
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Plain Text Symbols
|
## Simbol Teks Sederhana
|
||||||
|
|
||||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
Konfigurasi prasetel berikut mengubah simbol menjadi teks sederhana. Jika terminal atau font kamu tidak mampu me-render Nerd Font atau emoji, mungkin kamu bisa mencoba konfigurasi prasetel berikut!
|
||||||
|
|
||||||
Before (default setting with Fixedsys font):
|
Sebelum (aturan bawaan dengan menggunakan font Fixedys):
|
||||||
|
|
||||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
![Tangkapan Layar dari konfigurasi bawaan Starship dengan Font Fixedsys](/presets/plain-text-symbols-before.png)
|
||||||
|
|
||||||
After (Plain Text Symbols):
|
Sesudah (Simbol Teks Sederhana):
|
||||||
|
|
||||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
![Tangkapan Layar dari preset Simbol Teks Sederhana](/presets/plain-text-symbols-after.png)
|
||||||
|
|
||||||
### Konfigurasi
|
### Konfigurasi
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -363,11 +369,11 @@ symbol = "scala "
|
|||||||
symbol = "swift "
|
symbol = "swift "
|
||||||
```
|
```
|
||||||
|
|
||||||
## Hide Runtime Versions
|
## Penyembunyian Versi Runtime
|
||||||
|
|
||||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
Konfigurasi prasetel berikut menyembunyikan versi language runtimes. Jika kamu bekerja di dalam kontainer atau environments virtual, preset berikut cocok untukmu!
|
||||||
|
|
||||||
![Screenshot of Hide Runtime Versions preset](/presets/hide-runtime-versions.png)
|
![Tangkapan Layar dari preset Penyembunyian Versi Runtime](/presets/hide-runtime-versions.png)
|
||||||
|
|
||||||
### Konfigurasi
|
### Konfigurasi
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ features:
|
|||||||
footer: Licenza ISC | Copyright © 2019-present Starship Collaboratori
|
footer: Licenza ISC | Copyright © 2019-present Starship Collaboratori
|
||||||
#Used for the description meta tag, for SEO
|
#Used for the description meta tag, for SEO
|
||||||
metaTitle: "Starship: Cross-Shell Prompt"
|
metaTitle: "Starship: Cross-Shell Prompt"
|
||||||
description: Starship è il prompt minimalista, super veloce ed estremamente personalizzabile per qualsiasi shell! Mostra le informazioni di cui hai bisogno, rimanendo elegante e minimale. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
description: Starship è il prompt minimalista, super veloce ed estremamente personalizzabile per qualsiasi shell! Mostra le informazioni di cui hai bisogno, rimanendo elegante e minimale. Installazione rapida disponibile per Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh e PowerShell.
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="center">
|
<div class="center">
|
||||||
@ -143,7 +143,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
|||||||
|
|
||||||
#### Nushell
|
#### Nushell
|
||||||
|
|
||||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
::: warning Questo cambierà in futuro. È supportata solo la versione v0.33 o superiore. ::: Aggiungi quanto segue al tuo file di configurazione nu. Puoi controllare la posizione di questo file eseguendo `percorso di configurazione` in nu.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
startup = [
|
startup = [
|
||||||
@ -157,7 +157,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
|||||||
|
|
||||||
#### Xonsh
|
#### Xonsh
|
||||||
|
|
||||||
Add the following to the end of `~/.xonshrc`:
|
Aggiungi quanto segue alla fine di `~/.xonshrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.xonshrc
|
# ~/.xonshrc
|
||||||
|
@ -68,9 +68,36 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Stringhe di stile
|
## Enable Right Prompt
|
||||||
|
|
||||||
Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le parole non sono sensibili alle maiuscole (cioè `grassetto` e `BoLd` sono considerate la stessa stringa). Ogni parola può essere una delle seguenti:
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Stile delle Stringhe
|
||||||
|
|
||||||
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
|
||||||
- `bold`
|
- `bold`
|
||||||
- `italic`
|
- `italic`
|
||||||
@ -82,14 +109,14 @@ Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le par
|
|||||||
- `<color>`
|
- `<color>`
|
||||||
- `none`
|
- `none`
|
||||||
|
|
||||||
dove `<color>` è un colore specifico (discusso in seguito). `fg:<color>` e `<color>` attualmente fanno la stessa cosa, anche se questo potrebbe cambiare in futuro. `inverted` scambia lo sfondo e i colori in primo piano. L'ordine delle parole nella stringa non conta.
|
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||||
|
|
||||||
Il token `none` sovrascrive tutti gli altri token in una stringa se non fa parte di uno specificatore `bg:`, così ad esempio `fg:red none fg:blue` creerà una stringa senza stile. `bg:none` imposta come colore di sfondo quello predefinito così `fg:red bg:none` è equivalente a `red` o `fg:red` e `bg:green fg:red bg:none` è equivalente a `fg:red` o `red`. Potrà diventare un errore usare `none` in combinazione con altri token in futuro.
|
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||||
|
|
||||||
Uno colore specifico può essere uno di questi:
|
A color specifier can be one of the following:
|
||||||
|
|
||||||
- Uno dei colori standard del terminale: `nero`, `rosso`, `verde`, `blu`, `giallo`, `viola`, `ciano`, `bianco`. Puoi eventualmente utilizzare il prefisso `bright-` per ottenere la versione luminosa (es. `bright-white`).
|
- Uno dei colori standard del terminale: `nero`, `rosso`, `verde`, `blu`, `giallo`, `viola`, `ciano`, `bianco`. Puoi eventualmente utilizzare il prefisso `bright-` per ottenere la versione luminosa (es. `bright-white`).
|
||||||
- Un `#` seguito da un valore esadecimale a sei cifre. Questo specifica un [colore esagesimale in RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
- Un `#` seguito da un valore esadecimale a sei cifre. Questo specifica un [colore esagesimale in RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||||
- Un numero compreso tra 0-255. Specifica un [codice colore ANSI a 8 bit](https://i.stack.imgur.com/KTSQa.png).
|
- Un numero compreso tra 0-255. Specifica un [codice colore ANSI a 8 bit](https://i.stack.imgur.com/KTSQa.png).
|
||||||
|
|
||||||
Se sono specificati più colori per il primo piano/sfondo, l'ultimo nella stringa avrà la priorità.
|
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="Inglese"
|
alt="Inglese"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Russo"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Tedesco"
|
alt="Tedesco"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Francese"
|
alt="Francese"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="Giapponese"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Portoghese del Brasile"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Russo"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -111,7 +103,23 @@
|
|||||||
><img
|
><img
|
||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Vietnamita"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="Cinese semplificato"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="Cinese tradizionale"
|
||||||
/></a>
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
Per aggiornare Starship stesso, riavviare lo script sopra. Sostituirà la versione corrente senza toccare la configurazione di Starship.
|
|
||||||
|
|
||||||
|
Per aggiornare Starship stesso, riavviare lo script sopra. Sostituirà la versione corrente senza toccare la configurazione di Starship.
|
||||||
|
|
||||||
**Nota** - I valori predefiniti dello script di installazione possono essere sovrascritti, vedi la guida integrata.
|
**Nota** - I valori predefiniti dello script di installazione possono essere sovrascritti, vedi la guida integrata.
|
||||||
|
|
||||||
@ -266,7 +274,7 @@
|
|||||||
|
|
||||||
#### Xonsh
|
#### Xonsh
|
||||||
|
|
||||||
Add the following to the end of `~/.xonshrc`:
|
Aggiungi quanto segue alla fine di `~/.xonshrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.xonshrc
|
# ~/.xonshrc
|
||||||
@ -277,7 +285,7 @@
|
|||||||
|
|
||||||
#### Nushell
|
#### Nushell
|
||||||
|
|
||||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
**Warning** This will change in the future. È supportata solo la versione v0.33 o superiore. Add the following to your nu config file. Puoi controllare la posizione di questo file eseguendo `percorso di configurazione` in nu.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
startup = [
|
startup = [
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
# 🚀 Advanced Installation
|
# 🚀 Installazione Avanzata
|
||||||
|
|
||||||
To install starship, you need to do two things:
|
Per installare starship, è necessario fare due cose:
|
||||||
|
|
||||||
1. Get the **starship** binary onto your computer
|
1. Ottieni il binario **starship** sul tuo computer
|
||||||
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
|
1. Indica alla tua shell di usare il binario starship come prompt modificando i suoi script in init
|
||||||
|
|
||||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
Per la maggior parte degli utenti, le istruzioni nella [pagina principale](/guide/#🚀-installation) funzioneranno bene. Tuttavia, per alcune piattaforme più specializzate, sono necessarie istruzioni diverse.
|
||||||
|
|
||||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
Ci sono così tante piattaforme là fuori che non sono tutte inserite nel README.md principale, così ecco alcune istruzioni di installazione per altre piattaforme della community. La tua non c'è? Per favore, aggiungilo qui se capisci che manca!
|
||||||
|
|
||||||
## [Chocolatey](https://chocolatey.org)
|
## [Chocolatey](https://chocolatey.org)
|
||||||
|
|
||||||
### Prerequisiti
|
### Prerequisiti
|
||||||
|
|
||||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
Vai alla pagina di installazione [Chocolatey](https://chocolatey.org/install) e segui le istruzioni per installare Chocolatey.
|
||||||
|
|
||||||
### Installation
|
### Installazione
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
choco install starship
|
choco install starship
|
||||||
@ -29,7 +29,7 @@ choco install starship
|
|||||||
pkg install getconf
|
pkg install getconf
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installation
|
### Installazione
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||||
@ -37,17 +37,17 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com
|
|||||||
|
|
||||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||||
|
|
||||||
### Getting the Binary
|
### Ottenere il Binario
|
||||||
|
|
||||||
#### Imperatively
|
#### Imperativo
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
nix-env -iA nixos.starship
|
nix-env -iA nixos.starship
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager)
|
#### Dichiarativo, singolo utente, tramite [home-manager](https://github.com/nix-community/home-manager)
|
||||||
|
|
||||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
Abilita il modulo `programs.starship` nel tuo file `home.nix` e aggiungi le tue impostazioni
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
@ -69,15 +69,15 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
then run
|
poi eseguire
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
home-manager switch
|
home-manager switch
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Declarative, system-wide, with NixOS
|
#### Dichiarativa, di sistema, con NixOS
|
||||||
|
|
||||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
Aggiungi `pkgs.starship` a `environment.systemPackages` in `configuration.nix`, poi esegui
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo nixos-rebuild switch
|
sudo nixos-rebuild switch
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,9 +68,36 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### 設定例
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## スタイルの設定
|
## スタイルの設定
|
||||||
|
|
||||||
スタイル文字列は空白で区切られた単語のリストです。 大文字小文字を区別しません(例えば、 `bold` と`BoLd` は同じだとみなされます)。 それぞれ以下のいずれか一つが該当します。
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
|
||||||
- `bold`
|
- `bold`
|
||||||
- `italic`
|
- `italic`
|
||||||
@ -82,14 +109,14 @@ starship_precmd_user_func="set_win_title"
|
|||||||
- `<color>`
|
- `<color>`
|
||||||
- `none`
|
- `none`
|
||||||
|
|
||||||
ここで、 `<color>` は色を指定します(以下で述べます)。 現在 `fg:<color>` と `<color>` は同様の動作ですが、将来変更される可能性があります。 `inverted` は背景と前景の色を交換します。 文字列中の単語の順序は関係ありません。
|
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||||
|
|
||||||
`none` トークンは、文字列中の`bg:` 指定子の一部でない場合、他のすべてのトークンをオーバーライドします。そのため、たとえば、`fg:red none fg:blue` と指定した場合、スタイルなしの文字列が作られます。 `bg:none` は背景色をデフォルトの色にセットするので、`fg:red bg:none` は `red` や `fg:red` と同じ意味になり、`bg:green fg:red bg:none` も `fg:red` や `red` と同じ意味になります。 将来 `none` を他の単語と一緒に使用することはエラーになるかもしれません。
|
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||||
|
|
||||||
色は以下のいずれか1つを指定できます。
|
A color specifier can be one of the following:
|
||||||
|
|
||||||
- 標準的なターミナルカラーの `black`、 `red`、 `green`、 `blue`、 `yellow`、 `purple`、 `cyan`、 `white`。 必要に応じて、より明るい色を得るために `bright-` を前につけることができます。(例えば、 `bright-white` )
|
- 標準的なターミナルカラーの `black`、 `red`、 `green`、 `blue`、 `yellow`、 `purple`、 `cyan`、 `white`。 必要に応じて、より明るい色を得るために `bright-` を前につけることができます。(例えば、 `bright-white` )
|
||||||
- `#` に続く16進数。 [RGB の16進数カラーコード](https://www.w3schools.com/colors/colors_hexadecimal.asp)を表します。
|
- `#` に続く16進数。 [RGB の16進数カラーコード](https://www.w3schools.com/colors/colors_hexadecimal.asp)を表します。
|
||||||
- 0-255 までの間の数字。 [8-bit ANSI カラーコード](https://i.stack.imgur.com/KTSQa.png) を表します。
|
- 0-255 までの間の数字。 [8-bit ANSI カラーコード](https://i.stack.imgur.com/KTSQa.png) を表します。
|
||||||
|
|
||||||
複数の色が文字色/背景色に指定された際には、最後の指定が優先して選ばれます。
|
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
Starship自体を更新するには、上記のスクリプトを再度実行してください。 最新のバージョンに置き換わり、設定ファイルには変更を加えません。
|
|
||||||
|
|
||||||
|
Starship自体を更新するには、上記のスクリプトを再度実行してください。 最新のバージョンに置き換わり、設定ファイルには変更を加えません。
|
||||||
|
|
||||||
**※**インストールスクリプトのデフォルト値は上書きすることができます。詳しくはヘルプを参照してください。
|
**※**インストールスクリプトのデフォルト値は上書きすることができます。詳しくはヘルプを参照してください。
|
||||||
|
|
||||||
@ -266,7 +274,7 @@
|
|||||||
|
|
||||||
#### Xonsh
|
#### Xonsh
|
||||||
|
|
||||||
Add the following to the end of `~/.xonshrc`:
|
`~/.xonshrc` の最後に以下を追加してください:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.xonshrc
|
# ~/.xonshrc
|
||||||
@ -277,7 +285,7 @@
|
|||||||
|
|
||||||
#### Nushell
|
#### Nushell
|
||||||
|
|
||||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
**警告** これは将来的に変更されます。 nu バージョン 0.33 以降のみサポートされます。 nu 設定ファイルに以下を追加してください。 nu で`config path`を実行することで、設定ファイルの場所を確認できます。
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
startup = [
|
startup = [
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,6 +68,33 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Style Strings
|
## Style Strings
|
||||||
|
|
||||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
@ -75,7 +75,7 @@ A text group is made up of two different parts.
|
|||||||
|
|
||||||
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
||||||
|
|
||||||
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part.
|
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@ -142,12 +142,14 @@ This is the list of prompt-wide configuration options.
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||||
|
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@ -179,6 +181,7 @@ format = """
|
|||||||
$username\
|
$username\
|
||||||
$hostname\
|
$hostname\
|
||||||
$shlvl\
|
$shlvl\
|
||||||
|
$singularity\
|
||||||
$kubernetes\
|
$kubernetes\
|
||||||
$directory\
|
$directory\
|
||||||
$vcsh\
|
$vcsh\
|
||||||
@ -191,6 +194,7 @@ $hg_branch\
|
|||||||
$docker_context\
|
$docker_context\
|
||||||
$package\
|
$package\
|
||||||
$cmake\
|
$cmake\
|
||||||
|
$cobol\
|
||||||
$dart\
|
$dart\
|
||||||
$deno\
|
$deno\
|
||||||
$dotnet\
|
$dotnet\
|
||||||
@ -202,6 +206,7 @@ $helm\
|
|||||||
$java\
|
$java\
|
||||||
$julia\
|
$julia\
|
||||||
$kotlin\
|
$kotlin\
|
||||||
|
$lua\
|
||||||
$nim\
|
$nim\
|
||||||
$nodejs\
|
$nodejs\
|
||||||
$ocaml\
|
$ocaml\
|
||||||
@ -209,6 +214,7 @@ $perl\
|
|||||||
$php\
|
$php\
|
||||||
$purescript\
|
$purescript\
|
||||||
$python\
|
$python\
|
||||||
|
$rlang\
|
||||||
$red\
|
$red\
|
||||||
$ruby\
|
$ruby\
|
||||||
$rust\
|
$rust\
|
||||||
@ -229,7 +235,6 @@ $crystal\
|
|||||||
$custom\
|
$custom\
|
||||||
$cmd_duration\
|
$cmd_duration\
|
||||||
$line_break\
|
$line_break\
|
||||||
$lua\
|
|
||||||
$jobs\
|
$jobs\
|
||||||
$battery\
|
$battery\
|
||||||
$time\
|
$time\
|
||||||
@ -238,6 +243,13 @@ $shell\
|
|||||||
$character"""
|
$character"""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Eg.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# Move the directory to the second line
|
||||||
|
format="$all$directory$character"
|
||||||
|
```
|
||||||
|
|
||||||
## AWS
|
## AWS
|
||||||
|
|
||||||
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. This module also shows an expiration timer when using temporary credentials.
|
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. This module also shows an expiration timer when using temporary credentials.
|
||||||
@ -479,6 +491,36 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
|||||||
|
|
||||||
\*: This variable can only be used as a part of a style string
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
|
## COBOL / GNUCOBOL
|
||||||
|
|
||||||
|
The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
|
- The current directory contains any files ending in `.cob` or `.COB`
|
||||||
|
- The current directory contains any files ending in `.cbl` or `.CBL`
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||||
|
| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. |
|
||||||
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
|
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||||
|
| `style` | `"bold blue"` | The style for the module. |
|
||||||
|
| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. |
|
||||||
|
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||||
|
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||||
|
| `disabled` | `false` | Disables the `cobol` module. |
|
||||||
|
|
||||||
|
### Variables
|
||||||
|
|
||||||
|
| Variable | Example | Description |
|
||||||
|
| --------- | ---------- | ------------------------------------ |
|
||||||
|
| version | `v3.1.2.0` | The version of `cobol` |
|
||||||
|
| symbol | | Mirrors the value of option `symbol` |
|
||||||
|
| style\* | | Mirrors the value of option `style` |
|
||||||
|
|
||||||
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
## Command Duration
|
## Command Duration
|
||||||
|
|
||||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||||
@ -530,7 +572,7 @@ format = "underwent [$duration](bold yellow)"
|
|||||||
|
|
||||||
## Conda
|
## Conda
|
||||||
|
|
||||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
|
|
||||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
|||||||
format = "via [e $version](bold red) "
|
format = "via [e $version](bold red) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Fill
|
||||||
|
|
||||||
|
The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules.
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| -------- | -------------- | --------------------------------- |
|
||||||
|
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||||
|
| `style` | `"bold black"` | The style for the module. |
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
format="AA $fill BB $fill CC"
|
||||||
|
|
||||||
|
[fill]
|
||||||
|
symbol = "-"
|
||||||
|
style = "bold green"
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt that looks like:
|
||||||
|
|
||||||
|
```
|
||||||
|
AA -------------------------------------------- BB -------------------------------------------- CC
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## Google Cloud (`gcloud`)
|
## Google Cloud (`gcloud`)
|
||||||
|
|
||||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||||
@ -1205,12 +1276,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||||
| `added_style` | `"bold green"` | The style for the added count. |
|
| `added_style` | `"bold green"` | The style for the added count. |
|
||||||
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
||||||
| `format` | `'[+$added]($added_style) [-$deleted]($deleted_style) '` | The format for the module. |
|
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
|
||||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||||
|
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
|
|
||||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
|||||||
behind = "⇣${count}"
|
behind = "⇣${count}"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Golang
|
## Go
|
||||||
|
|
||||||
The `golang` module shows the currently installed version of [Golang](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
The `golang` module shows the currently installed version of [Go](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- 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
|
||||||
@ -2041,18 +2113,18 @@ symbol = "☁️ "
|
|||||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||||
|
|
||||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
- [**Nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
- [**Poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
- [**Python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
- [**Composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
- [**Gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
- [**Julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||||
- [**mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
- [**Mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
||||||
- [**helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||||
- [**maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||||
- [**meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` 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.
|
||||||
|
|
||||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
|||||||
|
|
||||||
## R
|
## R
|
||||||
|
|
||||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- The current directory contains a file with the `.R` extension.
|
- The current directory contains a file with the `.R` extension.
|
||||||
- The current directory contains a file with the `.Rd` extension.
|
- The current directory contains a file with the `.Rd` extension.
|
||||||
@ -2539,7 +2611,7 @@ disabled = false
|
|||||||
|
|
||||||
## SHLVL
|
## SHLVL
|
||||||
|
|
||||||
The `shlvl` module shows the current `SHLVL` ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
|||||||
format = "via [⍱ $version](bold white) "
|
format = "via [⍱ $version](bold white) "
|
||||||
```
|
```
|
||||||
|
|
||||||
## VLang
|
## V
|
||||||
|
|
||||||
The `vlang` module shows you your currently installed version of V. By default the module will be shown if any of the following conditions are met:
|
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
|
||||||
- The current directory contains a file with `.v` extension
|
- The current directory contains a file with `.v` extension
|
||||||
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
||||||
|
|
||||||
@ -2925,7 +2997,7 @@ The `vlang` module shows you your currently installed version of V. By default t
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
# ~/.config/starship.toml
|
# ~/.config/starship.toml
|
||||||
[v]
|
[vlang]
|
||||||
format = "via [V $version](blue bold) "
|
format = "via [V $version](blue bold) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
|
||||||
|
|
||||||
|
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||||
|
|
||||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,6 +68,33 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Style Strings
|
## Style Strings
|
||||||
|
|
||||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
@ -75,7 +75,7 @@ A text group is made up of two different parts.
|
|||||||
|
|
||||||
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
||||||
|
|
||||||
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part.
|
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@ -142,12 +142,14 @@ This is the list of prompt-wide configuration options.
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||||
|
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@ -179,6 +181,7 @@ format = """
|
|||||||
$username\
|
$username\
|
||||||
$hostname\
|
$hostname\
|
||||||
$shlvl\
|
$shlvl\
|
||||||
|
$singularity\
|
||||||
$kubernetes\
|
$kubernetes\
|
||||||
$directory\
|
$directory\
|
||||||
$vcsh\
|
$vcsh\
|
||||||
@ -191,6 +194,7 @@ $hg_branch\
|
|||||||
$docker_context\
|
$docker_context\
|
||||||
$package\
|
$package\
|
||||||
$cmake\
|
$cmake\
|
||||||
|
$cobol\
|
||||||
$dart\
|
$dart\
|
||||||
$deno\
|
$deno\
|
||||||
$dotnet\
|
$dotnet\
|
||||||
@ -202,6 +206,7 @@ $helm\
|
|||||||
$java\
|
$java\
|
||||||
$julia\
|
$julia\
|
||||||
$kotlin\
|
$kotlin\
|
||||||
|
$lua\
|
||||||
$nim\
|
$nim\
|
||||||
$nodejs\
|
$nodejs\
|
||||||
$ocaml\
|
$ocaml\
|
||||||
@ -209,6 +214,7 @@ $perl\
|
|||||||
$php\
|
$php\
|
||||||
$purescript\
|
$purescript\
|
||||||
$python\
|
$python\
|
||||||
|
$rlang\
|
||||||
$red\
|
$red\
|
||||||
$ruby\
|
$ruby\
|
||||||
$rust\
|
$rust\
|
||||||
@ -229,7 +235,6 @@ $crystal\
|
|||||||
$custom\
|
$custom\
|
||||||
$cmd_duration\
|
$cmd_duration\
|
||||||
$line_break\
|
$line_break\
|
||||||
$lua\
|
|
||||||
$jobs\
|
$jobs\
|
||||||
$battery\
|
$battery\
|
||||||
$time\
|
$time\
|
||||||
@ -238,6 +243,13 @@ $shell\
|
|||||||
$character"""
|
$character"""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Eg.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# Move the directory to the second line
|
||||||
|
format="$all$directory$character"
|
||||||
|
```
|
||||||
|
|
||||||
## AWS
|
## AWS
|
||||||
|
|
||||||
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. This module also shows an expiration timer when using temporary credentials.
|
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. This module also shows an expiration timer when using temporary credentials.
|
||||||
@ -479,6 +491,36 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
|||||||
|
|
||||||
\*: This variable can only be used as a part of a style string
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
|
## COBOL / GNUCOBOL
|
||||||
|
|
||||||
|
The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
|
- The current directory contains any files ending in `.cob` or `.COB`
|
||||||
|
- The current directory contains any files ending in `.cbl` or `.CBL`
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||||
|
| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. |
|
||||||
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
|
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||||
|
| `style` | `"bold blue"` | The style for the module. |
|
||||||
|
| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. |
|
||||||
|
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||||
|
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||||
|
| `disabled` | `false` | Disables the `cobol` module. |
|
||||||
|
|
||||||
|
### Variables
|
||||||
|
|
||||||
|
| Variable | Example | Description |
|
||||||
|
| --------- | ---------- | ------------------------------------ |
|
||||||
|
| version | `v3.1.2.0` | The version of `cobol` |
|
||||||
|
| symbol | | Mirrors the value of option `symbol` |
|
||||||
|
| style\* | | Mirrors the value of option `style` |
|
||||||
|
|
||||||
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
## Command Duration
|
## Command Duration
|
||||||
|
|
||||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||||
@ -530,7 +572,7 @@ format = "underwent [$duration](bold yellow)"
|
|||||||
|
|
||||||
## Conda
|
## Conda
|
||||||
|
|
||||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
|
|
||||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
|||||||
format = "via [e $version](bold red) "
|
format = "via [e $version](bold red) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Fill
|
||||||
|
|
||||||
|
The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules.
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| -------- | -------------- | --------------------------------- |
|
||||||
|
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||||
|
| `style` | `"bold black"` | The style for the module. |
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
format="AA $fill BB $fill CC"
|
||||||
|
|
||||||
|
[fill]
|
||||||
|
symbol = "-"
|
||||||
|
style = "bold green"
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt that looks like:
|
||||||
|
|
||||||
|
```
|
||||||
|
AA -------------------------------------------- BB -------------------------------------------- CC
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## Google Cloud (`gcloud`)
|
## Google Cloud (`gcloud`)
|
||||||
|
|
||||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||||
@ -1205,12 +1276,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||||
| `added_style` | `"bold green"` | The style for the added count. |
|
| `added_style` | `"bold green"` | The style for the added count. |
|
||||||
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
||||||
| `format` | `'[+$added]($added_style) [-$deleted]($deleted_style) '` | The format for the module. |
|
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
|
||||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||||
|
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
|
|
||||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
|||||||
behind = "⇣${count}"
|
behind = "⇣${count}"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Golang
|
## Go
|
||||||
|
|
||||||
The `golang` module shows the currently installed version of [Golang](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
The `golang` module shows the currently installed version of [Go](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- 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
|
||||||
@ -2041,18 +2113,18 @@ symbol = "☁️ "
|
|||||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||||
|
|
||||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
- [**Nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
- [**Poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
- [**Python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
- [**Composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
- [**Gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
- [**Julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||||
- [**mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
- [**Mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
||||||
- [**helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||||
- [**maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||||
- [**meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` 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.
|
||||||
|
|
||||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
|||||||
|
|
||||||
## R
|
## R
|
||||||
|
|
||||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- The current directory contains a file with the `.R` extension.
|
- The current directory contains a file with the `.R` extension.
|
||||||
- The current directory contains a file with the `.Rd` extension.
|
- The current directory contains a file with the `.Rd` extension.
|
||||||
@ -2539,7 +2611,7 @@ disabled = false
|
|||||||
|
|
||||||
## SHLVL
|
## SHLVL
|
||||||
|
|
||||||
The `shlvl` module shows the current `SHLVL` ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
|||||||
format = "via [⍱ $version](bold white) "
|
format = "via [⍱ $version](bold white) "
|
||||||
```
|
```
|
||||||
|
|
||||||
## VLang
|
## V
|
||||||
|
|
||||||
The `vlang` module shows you your currently installed version of V. By default the module will be shown if any of the following conditions are met:
|
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
|
||||||
- The current directory contains a file with `.v` extension
|
- The current directory contains a file with `.v` extension
|
||||||
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
||||||
|
|
||||||
@ -2925,7 +2997,7 @@ The `vlang` module shows you your currently installed version of V. By default t
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
# ~/.config/starship.toml
|
# ~/.config/starship.toml
|
||||||
[v]
|
[vlang]
|
||||||
format = "via [V $version](blue bold) "
|
format = "via [V $version](blue bold) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -46,30 +46,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -78,14 +54,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -102,6 +70,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -111,6 +103,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -145,7 +153,7 @@
|
|||||||
|
|
||||||
### Aan de slag
|
### Aan de slag
|
||||||
|
|
||||||
**Opmerking:**: als gevolg van de groei van verschillende platforms, worden slechts bepaalde ondersteunde platforms hieronder weergegeven. Staat de jouwe er niet tussen? Neem een kijkje in de [extra platforminstructies](https://starship.rs/installing/).
|
**Opmerking:** als gevolg van de groei van verschillende platforms, worden slechts bepaalde ondersteunde platforms hieronder weergegeven. Staat de jouwe er niet tussen? Neem een kijkje in de [extra platforminstructies](https://starship.rs/installing/).
|
||||||
|
|
||||||
1. Installeer de **Starship** binary:
|
1. Installeer de **Starship** binary:
|
||||||
|
|
||||||
@ -158,8 +166,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
Om Starship zelf bij te werken, voer je het bovenstaande script opnieuw uit. Deze vervangt de huidige versie zonder de configuratie van Starship aan te passen.
|
|
||||||
|
|
||||||
|
Om Starship zelf bij te werken, voer je het bovenstaande script opnieuw uit. Deze vervangt de huidige versie zonder de configuratie van Starship aan te passen.
|
||||||
|
|
||||||
**Opmerking** - De standaardinstellingen van het installatiescript kunnen overschreven worden; zie de ingebouwde hulp.
|
**Opmerking** - De standaardinstellingen van het installatiescript kunnen overschreven worden; zie de ingebouwde hulp.
|
||||||
|
|
||||||
@ -275,7 +283,7 @@
|
|||||||
|
|
||||||
#### Nushell
|
#### Nushell
|
||||||
|
|
||||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
**Warning** This will change in the future. Add the following to your nu config file. De locatie van hiervan kunt u vinden door `config path` uit te voeren in nushell.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
startup = [
|
startup = [
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -2,18 +2,18 @@
|
|||||||
home: true
|
home: true
|
||||||
heroImage: /logo.svg
|
heroImage: /logo.svg
|
||||||
heroText:
|
heroText:
|
||||||
tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
|
tagline: Minimalny, szybki i nieskończenie konfigurowalny wiersz poleceń dla dowolnej powłoki!
|
||||||
actionText: Get Started →
|
actionText: Get Started →
|
||||||
actionLink: ./guide/
|
actionLink: ./guide/
|
||||||
features:
|
features:
|
||||||
-
|
-
|
||||||
title: Compatibility First
|
title: Kompatybilność przede wszystkim
|
||||||
details: Works on the most common shells on the most common operating systems. Use it everywhere!
|
details: Works on the most common shells on the most common operating systems. Use it everywhere!
|
||||||
-
|
-
|
||||||
title: Rust-Powered
|
title: Napędzany językiem Rust
|
||||||
details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.
|
details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.
|
||||||
-
|
-
|
||||||
title: Customizable
|
title: Konfigurowalny
|
||||||
details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be.
|
details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be.
|
||||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||||
#Used for the description meta tag, for SEO
|
#Used for the description meta tag, for SEO
|
||||||
@ -28,26 +28,26 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### Prerequisites
|
### Wymagania wstępne
|
||||||
|
|
||||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||||
|
|
||||||
### Quick Install
|
### Quick Install
|
||||||
|
|
||||||
1. Install the **starship** binary:
|
1. Zainstaluj plik programu **starship**:
|
||||||
|
|
||||||
|
|
||||||
#### Install Latest Version
|
#### Instalacja najnowszej wersji
|
||||||
|
|
||||||
With Shell:
|
With Shell:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
Aby zaktualizować Starship, uruchom ponownie powyższy skrypt. Obecna wersja zostanie zastąpiona nową, bez modyfikowania konfiguracji Starship.
|
||||||
|
|
||||||
|
|
||||||
#### Install via Package Manager
|
#### Instalacja za pomocą menedżera pakietów
|
||||||
|
|
||||||
With [Homebrew](https://brew.sh/):
|
With [Homebrew](https://brew.sh/):
|
||||||
|
|
||||||
@ -55,18 +55,18 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||||||
brew install starship
|
brew install starship
|
||||||
```
|
```
|
||||||
|
|
||||||
With [Scoop](https://scoop.sh):
|
Za pomocą [Scoop](https://scoop.sh):
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
scoop install starship
|
scoop install starship
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Add the init script to your shell's config file:
|
1. Dodaj skrypt inicjalizacyjny do konfiguracji twojej powłoki:
|
||||||
|
|
||||||
|
|
||||||
#### Bash
|
#### Bash
|
||||||
|
|
||||||
Add the following to the end of `~/.bashrc`:
|
Dodaj na koniec pliku `~/.bashrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.bashrc
|
# ~/.bashrc
|
||||||
@ -77,7 +77,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||||||
|
|
||||||
#### Fish
|
#### Fish
|
||||||
|
|
||||||
Add the following to the end of `~/.config/fish/config.fish`:
|
Dodaj na koniec pliku `~/.config/fish/config.fish`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.config/fish/config.fish
|
# ~/.config/fish/config.fish
|
||||||
@ -88,7 +88,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||||||
|
|
||||||
#### Zsh
|
#### Zsh
|
||||||
|
|
||||||
Add the following to the end of `~/.zshrc`:
|
Dodaj na koniec pliku `~/.zshrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.zshrc
|
# ~/.zshrc
|
||||||
@ -99,7 +99,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||||||
|
|
||||||
#### Powershell
|
#### Powershell
|
||||||
|
|
||||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Zazwyczaj jest to `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` lub `~/.config/powershell/Microsoft.PowerShell_profile.ps1` na -Nixie.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
Invoke-Expression (&starship init powershell)
|
Invoke-Expression (&starship init powershell)
|
||||||
@ -108,7 +108,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||||||
|
|
||||||
#### Ion
|
#### Ion
|
||||||
|
|
||||||
Add the following to the end of `~/.config/ion/initrc`:
|
Dodaj na koniec pliku `~/.config/ion/initrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.config/ion/initrc
|
# ~/.config/ion/initrc
|
||||||
@ -121,7 +121,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||||||
|
|
||||||
::: warning Only elvish v0.15 or higher is supported. :::
|
::: warning Only elvish v0.15 or higher is supported. :::
|
||||||
|
|
||||||
Add the following to the end of `~/.elvish/rc.elv`:
|
Dodaj na koniec pliku `~/.elvish/rc.elv`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.elvish/rc.elv
|
# ~/.elvish/rc.elv
|
||||||
@ -132,7 +132,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||||||
|
|
||||||
#### Tcsh
|
#### Tcsh
|
||||||
|
|
||||||
Add the following to the end of `~/.tcshrc`:
|
Dodaj na koniec pliku `~/.tcshrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.tcshrc
|
# ~/.tcshrc
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# Advanced Configuration
|
# Zaawansowana konfiguracja
|
||||||
|
|
||||||
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
|
Mimo że Starship jest wszechstronny, czasem nie wystarczy modyfikacja pliku `starship.toml` żeby uzyskać pewne rzeczy. Na tej stronie opisano bardziej zaawansowane sposoby konfigurowania używane w Starship.
|
||||||
|
|
||||||
::: warning
|
::: warning
|
||||||
|
|
||||||
The configurations in this section are subject to change in future releases of Starship.
|
Konfiguracja opisana w tej sekcji może ulec zmianie w przyszłych wydaniach Starship.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -68,6 +68,33 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Style Strings
|
## Style Strings
|
||||||
|
|
||||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Configuration
|
# Konfiguracja
|
||||||
|
|
||||||
To get started configuring starship, create the following file: `~/.config/starship.toml`.
|
To get started configuring starship, create the following file: `~/.config/starship.toml`.
|
||||||
|
|
||||||
@ -6,7 +6,7 @@ To get started configuring starship, create the following file: `~/.config/stars
|
|||||||
mkdir -p ~/.config && touch ~/.config/starship.toml
|
mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
Cała konfiguracja starship jest wykonywana w tym pliku [TOML](https://github.com/toml-lang/toml):
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
# Inserts a blank line between shell prompts
|
# Inserts a blank line between shell prompts
|
||||||
@ -21,63 +21,63 @@ success_symbol = "[➜](bold green)" # The "success_symbol" segment is being
|
|||||||
disabled = true
|
disabled = true
|
||||||
```
|
```
|
||||||
|
|
||||||
You can change default configuration file location with `STARSHIP_CONFIG` environment variable:
|
Możesz zmienić domyślną lokalizację pliku konfiguracyjnego za pomocą zmiennej środowiskowej `STARSHIP_CONFIG`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
export STARSHIP_CONFIG=~/.starship/config.toml
|
export STARSHIP_CONFIG=~/.starship/config.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
Odpowiednikiem dla PowerShell (Windows) jest dodanie następującej linii w twoim `$PROFILE`:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship\config.toml"
|
$ENV:STARSHIP_CONFIG = "$HOME\.starship\config.toml"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Logging
|
### Logi
|
||||||
|
|
||||||
By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable:
|
Starship domyślnie loguje ostrzeżenia i błędy do pliku o nazwie`~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, gdzie klucz sesji odpowiada twojej instancji terminala. Można to zmienić za pomocą zmiennej środowiskowej `STARSHIP_CACHE`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
export STARSHIP_CACHE=~/.starship/cache
|
export STARSHIP_CACHE=~/.starship/cache
|
||||||
```
|
```
|
||||||
|
|
||||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
Odpowiednikiem dla PowerShell (Windows) jest dodanie następującej linii w twoim `$PROFILE`:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Terminology
|
### Glosariusz
|
||||||
|
|
||||||
**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project.
|
**Moduł**: Komponent wiersza poleceń, który dostarcza informacji opartych na kontekście twojego systemu operacyjnego. Przykładowo, moduł "nodejs" pokazuje wersję Node.js, która jest obecnie zainstalowana na twoim komputerze, jeżeli znajdujesz się w folderze zawierającym projekt Node.js.
|
||||||
|
|
||||||
**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
|
**Zmienna**: Mniejszy podkomponent zawierający informacje dostarczane przez moduł. Przykładowo, zmienna "version" w module "nodejs" zawiera obecną wersję Node.js.
|
||||||
|
|
||||||
By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix.
|
W ramach konwencji większość modułów posiada przedrostek w domyślnym kolorze terminala (n.p. `via` w "nodejs") oraz pojedynczy odstęp za treścią modułu.
|
||||||
|
|
||||||
### Format Strings
|
### Formatowanie
|
||||||
|
|
||||||
Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string.
|
Moduły wypisują swoje zmienne przy użyciu ciągów formatujących. Większość modułów posiada wpis o nazwie `format`, który konfiguruje format wyświetlania modułu. W ciągach formatujących można używać tekstu, zmiennych oraz grup tekstowych.
|
||||||
|
|
||||||
#### Variable
|
#### Zmienne
|
||||||
|
|
||||||
A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`.
|
Zmienna zawiera symbol `$`, po którym następuje nazwa zmiennej. Nazwa zmiennej zawiera tylko litery, cyfry i `_`.
|
||||||
|
|
||||||
For example:
|
Na przykład:
|
||||||
|
|
||||||
- `$version` is a format string with a variable named `version`.
|
- `$version` to ciąg formatujący ze zmienną o nazwie `version`.
|
||||||
- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`.
|
- `$git_branch$git_commit` zawiera dwie zmienne: `git_branch` i `git_commit`.
|
||||||
- `$git_branch $git_commit` has the two variables separated with a space.
|
- `$git_branch $git_commit` zawiera te dwie zmienne rozdzielone spacją.
|
||||||
|
|
||||||
#### Text Group
|
#### Grupy tekstowe
|
||||||
|
|
||||||
A text group is made up of two different parts.
|
Grupa tekstowa składa się z dwóch oddzielnych części.
|
||||||
|
|
||||||
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
Pierwsza część, otoczona `[]`, to [ciąg formatujący](#format-strings). You can add texts, variables, or even nested text groups in it.
|
||||||
|
|
||||||
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part.
|
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
|
||||||
|
|
||||||
For example:
|
Na przykład:
|
||||||
|
|
||||||
- `[on](red bold)` will print a string `on` with bold text colored red.
|
- `[on](red bold)` will print a string `on` with bold text colored red.
|
||||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||||
@ -100,7 +100,7 @@ Note that what styling looks like will be controlled by your terminal emulator.
|
|||||||
|
|
||||||
A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty.
|
A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty.
|
||||||
|
|
||||||
For example:
|
Na przykład:
|
||||||
|
|
||||||
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
|
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
|
||||||
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
|
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
|
||||||
@ -142,12 +142,14 @@ This is the list of prompt-wide configuration options.
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||||
|
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@ -179,6 +181,7 @@ format = """
|
|||||||
$username\
|
$username\
|
||||||
$hostname\
|
$hostname\
|
||||||
$shlvl\
|
$shlvl\
|
||||||
|
$singularity\
|
||||||
$kubernetes\
|
$kubernetes\
|
||||||
$directory\
|
$directory\
|
||||||
$vcsh\
|
$vcsh\
|
||||||
@ -191,6 +194,7 @@ $hg_branch\
|
|||||||
$docker_context\
|
$docker_context\
|
||||||
$package\
|
$package\
|
||||||
$cmake\
|
$cmake\
|
||||||
|
$cobol\
|
||||||
$dart\
|
$dart\
|
||||||
$deno\
|
$deno\
|
||||||
$dotnet\
|
$dotnet\
|
||||||
@ -202,6 +206,7 @@ $helm\
|
|||||||
$java\
|
$java\
|
||||||
$julia\
|
$julia\
|
||||||
$kotlin\
|
$kotlin\
|
||||||
|
$lua\
|
||||||
$nim\
|
$nim\
|
||||||
$nodejs\
|
$nodejs\
|
||||||
$ocaml\
|
$ocaml\
|
||||||
@ -209,6 +214,7 @@ $perl\
|
|||||||
$php\
|
$php\
|
||||||
$purescript\
|
$purescript\
|
||||||
$python\
|
$python\
|
||||||
|
$rlang\
|
||||||
$red\
|
$red\
|
||||||
$ruby\
|
$ruby\
|
||||||
$rust\
|
$rust\
|
||||||
@ -229,7 +235,6 @@ $crystal\
|
|||||||
$custom\
|
$custom\
|
||||||
$cmd_duration\
|
$cmd_duration\
|
||||||
$line_break\
|
$line_break\
|
||||||
$lua\
|
|
||||||
$jobs\
|
$jobs\
|
||||||
$battery\
|
$battery\
|
||||||
$time\
|
$time\
|
||||||
@ -238,6 +243,13 @@ $shell\
|
|||||||
$character"""
|
$character"""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Eg.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# Move the directory to the second line
|
||||||
|
format="$all$directory$character"
|
||||||
|
```
|
||||||
|
|
||||||
## AWS
|
## AWS
|
||||||
|
|
||||||
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. This module also shows an expiration timer when using temporary credentials.
|
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. This module also shows an expiration timer when using temporary credentials.
|
||||||
@ -479,6 +491,36 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
|||||||
|
|
||||||
\*: This variable can only be used as a part of a style string
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
|
## COBOL / GNUCOBOL
|
||||||
|
|
||||||
|
The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
|
- The current directory contains any files ending in `.cob` or `.COB`
|
||||||
|
- The current directory contains any files ending in `.cbl` or `.CBL`
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||||
|
| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. |
|
||||||
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
|
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||||
|
| `style` | `"bold blue"` | The style for the module. |
|
||||||
|
| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. |
|
||||||
|
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||||
|
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||||
|
| `disabled` | `false` | Disables the `cobol` module. |
|
||||||
|
|
||||||
|
### Variables
|
||||||
|
|
||||||
|
| Variable | Example | Description |
|
||||||
|
| --------- | ---------- | ------------------------------------ |
|
||||||
|
| version | `v3.1.2.0` | The version of `cobol` |
|
||||||
|
| symbol | | Mirrors the value of option `symbol` |
|
||||||
|
| style\* | | Mirrors the value of option `style` |
|
||||||
|
|
||||||
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
## Command Duration
|
## Command Duration
|
||||||
|
|
||||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||||
@ -530,7 +572,7 @@ format = "underwent [$duration](bold yellow)"
|
|||||||
|
|
||||||
## Conda
|
## Conda
|
||||||
|
|
||||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
|
|
||||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
|||||||
format = "via [e $version](bold red) "
|
format = "via [e $version](bold red) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Fill
|
||||||
|
|
||||||
|
The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules.
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| -------- | -------------- | --------------------------------- |
|
||||||
|
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||||
|
| `style` | `"bold black"` | The style for the module. |
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
format="AA $fill BB $fill CC"
|
||||||
|
|
||||||
|
[fill]
|
||||||
|
symbol = "-"
|
||||||
|
style = "bold green"
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt that looks like:
|
||||||
|
|
||||||
|
```
|
||||||
|
AA -------------------------------------------- BB -------------------------------------------- CC
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## Google Cloud (`gcloud`)
|
## Google Cloud (`gcloud`)
|
||||||
|
|
||||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||||
@ -1205,12 +1276,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||||
| `added_style` | `"bold green"` | The style for the added count. |
|
| `added_style` | `"bold green"` | The style for the added count. |
|
||||||
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
||||||
| `format` | `'[+$added]($added_style) [-$deleted]($deleted_style) '` | The format for the module. |
|
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
|
||||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||||
|
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
|
|
||||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
|||||||
behind = "⇣${count}"
|
behind = "⇣${count}"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Golang
|
## Go
|
||||||
|
|
||||||
The `golang` module shows the currently installed version of [Golang](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
The `golang` module shows the currently installed version of [Go](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- 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
|
||||||
@ -2041,18 +2113,18 @@ symbol = "☁️ "
|
|||||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||||
|
|
||||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
- [**Nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
- [**Poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
- [**Python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
- [**Composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
- [**Gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
- [**Julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||||
- [**mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
- [**Mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
||||||
- [**helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||||
- [**maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||||
- [**meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` 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.
|
||||||
|
|
||||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
|||||||
|
|
||||||
## R
|
## R
|
||||||
|
|
||||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- The current directory contains a file with the `.R` extension.
|
- The current directory contains a file with the `.R` extension.
|
||||||
- The current directory contains a file with the `.Rd` extension.
|
- The current directory contains a file with the `.Rd` extension.
|
||||||
@ -2539,7 +2611,7 @@ disabled = false
|
|||||||
|
|
||||||
## SHLVL
|
## SHLVL
|
||||||
|
|
||||||
The `shlvl` module shows the current `SHLVL` ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
|||||||
format = "via [⍱ $version](bold white) "
|
format = "via [⍱ $version](bold white) "
|
||||||
```
|
```
|
||||||
|
|
||||||
## VLang
|
## V
|
||||||
|
|
||||||
The `vlang` module shows you your currently installed version of V. By default the module will be shown if any of the following conditions are met:
|
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
|
||||||
- The current directory contains a file with `.v` extension
|
- The current directory contains a file with `.v` extension
|
||||||
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
||||||
|
|
||||||
@ -2925,7 +2997,7 @@ The `vlang` module shows you your currently installed version of V. By default t
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
# ~/.config/starship.toml
|
# ~/.config/starship.toml
|
||||||
[v]
|
[vlang]
|
||||||
format = "via [V $version](blue bold) "
|
format = "via [V $version](blue bold) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
# FAQ
|
# Najczęściej zadawane pytania (FAQ)
|
||||||
|
|
||||||
## What is the configuration used in the demo GIF?
|
## Jakiej konfiguracji użyto w GIFie demonstracyjnym?
|
||||||
|
|
||||||
- **Terminal Emulator**: [iTerm2](https://iterm2.com/)
|
- **Emulator terminala**: [iTerm2](https://iterm2.com/)
|
||||||
- **Theme**: Minimal
|
- **Motyw**: Minimal
|
||||||
- **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
- **Schemat kolorów**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||||
- **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
- **Czcionka**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||||
- **Shell**: [Fish Shell](https://fishshell.com/)
|
- **Powłoka**: [Fish Shell](https://fishshell.com/)
|
||||||
- **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
- **Konfiguracja**: [Pliki Dotfile użytkownika matchai](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||||
- **Prompt**: [Starship](https://starship.rs/)
|
- **Wiersz poleceń**: [Starship](https://starship.rs/)
|
||||||
|
|
||||||
## How do I get command completion as shown in the demo GIF?
|
## Jak uzyskać uzupełniania poleceń pokazane na GIFie demonstracyjnym?
|
||||||
|
|
||||||
Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
Uzupełnianie, znane też jako autouzupełnianie, jest dostarczane przez używaną przez ciebie powłokę. W przypadku demo, jest to powłoka [Fish Shell](https://fishshell.com/), która domyślnie zapewnia uzupełnianie. Jeśli używasz Z Shell (zsh), zalecamy zapoznać się z [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
||||||
|
|
||||||
## Do top level `format` and `<module>.disabled` do the same thing?
|
## Do top level `format` and `<module>.disabled` do the same thing?
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ Yes, they can both be used to disable modules in the prompt. If all you plan to
|
|||||||
- Disabling modules is more explicit than omitting them from the top level `format`
|
- Disabling modules is more explicit than omitting them from the top level `format`
|
||||||
- Newly created modules will be added to the prompt as Starship is updated
|
- Newly created modules will be added to the prompt as Starship is updated
|
||||||
|
|
||||||
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
|
## Dokumentacja stwierdza że Starship jest wieloplatformowy. Dlaczego moja preferowana powłoka nie jest obsługiwana?
|
||||||
|
|
||||||
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
|
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
|
||||||
|
|
||||||
@ -48,17 +48,17 @@ starship prompt --help
|
|||||||
|
|
||||||
The prompt will use as much context as is provided, but no flags are "required".
|
The prompt will use as much context as is provided, but no flags are "required".
|
||||||
|
|
||||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
## Jak uruchomić Starship na dystrybucjach systemu Linux ze starszymi wersjami glibc?
|
||||||
|
|
||||||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
Jeżeli podczas używania gotowych instalacji (np. na CentOS 6 lub 7) pojawia się błąd w stylu "_version 'GLIBC_2.18' not found (required by starship)_", możesz użyć instalacji zbudowanej za pomocą `musl` zamiast `glibc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||||
```
|
```
|
||||||
|
|
||||||
## I see symbols I don't understand or expect, what do they mean?
|
## W wierszu poleceń zauważyłem symbole których się nie spodziewałem bądź nie rozumiem. Co one oznaczają?
|
||||||
|
|
||||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
Jeśli zauważyłeś symbole których nie rozpoznajesz, możesz użyć `starship explain` aby uzyskać szczegółowy opis obecnie wyświetlanych modułów.
|
||||||
|
|
||||||
## Why don't I see a glyph symbol in my prompt?
|
## Why don't I see a glyph symbol in my prompt?
|
||||||
|
|
||||||
@ -79,12 +79,12 @@ The first line should produce a [snake emoji](https://emojipedia.org/snake/), wh
|
|||||||
|
|
||||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||||
|
|
||||||
## How do I uninstall Starship?
|
## Jak odinstalować Starship?
|
||||||
|
|
||||||
Starship is just as easy to uninstall as it is to install in the first place.
|
Starship można odinstalować równie łatwo jak przebiega proces instalacji.
|
||||||
|
|
||||||
1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship.
|
1. Usuń zawartość konfiguracji powłoki (np. `~/.bashrc`) służącą do zainicjalizowania Starship.
|
||||||
1. Delete the Starship binary.
|
1. Usuń plik wykonywalny programu Starship.
|
||||||
|
|
||||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||||
|
|
||||||
|
@ -10,36 +10,36 @@
|
|||||||
<a href="https://github.com/starship/starship/actions"
|
<a href="https://github.com/starship/starship/actions"
|
||||||
><img
|
><img
|
||||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||||
alt="GitHub Actions workflow status"
|
alt="Status Github Actions"
|
||||||
/></a>
|
/></a>
|
||||||
<a href="https://crates.io/crates/starship"
|
<a href="https://crates.io/crates/starship"
|
||||||
><img
|
><img
|
||||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||||
alt="Crates.io version"
|
alt="Wersja na crates.io"
|
||||||
/></a>
|
/></a>
|
||||||
<a href="https://repology.org/project/starship/versions"
|
<a href="https://repology.org/project/starship/versions"
|
||||||
><img
|
><img
|
||||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||||
alt="Packaging status" /></a
|
alt="Status pakietów" /></a
|
||||||
><br />
|
><br />
|
||||||
<a href="https://discord.gg/starship"
|
<a href="https://discord.gg/starship"
|
||||||
><img
|
><img
|
||||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||||
alt="Chat on Discord"
|
alt="Porozmawiaj na Discord"
|
||||||
/></a>
|
/></a>
|
||||||
<a href="https://twitter.com/StarshipPrompt"
|
<a href="https://twitter.com/StarshipPrompt"
|
||||||
><img
|
><img
|
||||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||||
alt="Follow @StarshipPrompt on Twitter"
|
alt="Śledź @StarshipPrompt na Twitterze"
|
||||||
/></a>
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://starship.rs">Website</a>
|
<a href="https://starship.rs">Strona internetowa</a>
|
||||||
·
|
·
|
||||||
<a href="#🚀-installation">Installation</a>
|
<a href="#🚀-installation">Instalacja</a>
|
||||||
·
|
·
|
||||||
<a href="https://starship.rs/config/">Configuration</a>
|
<a href="https://starship.rs/config/">Konfiguracja</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,85 +105,101 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||||
alt="Starship with iTerm2 and the Snazzy theme"
|
alt="Starship na iTerm2 z motywem Snazzy"
|
||||||
width="50%"
|
width="50%"
|
||||||
align="right"
|
align="right"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
**Minimalny, szybki i nieskończenie konfigurowalny wiersz poleceń dla dowolnej powłoki!**
|
||||||
|
|
||||||
- **Fast:** it's fast – _really really_ fast! 🚀
|
- **Szybkość:** jest szybki - _naprawdę_ szybki! 🚀
|
||||||
- **Customizable:** configure every aspect of your prompt.
|
- **Konfigurowalny:** dostosowuj swój wiersz poleceń w każdym aspekcie.
|
||||||
- **Universal:** works on any shell, on any operating system.
|
- **Uniwersalny:** działa na każdej powłoce, na każdym systemie operacyjnym.
|
||||||
- **Intelligent:** shows relevant information at a glance.
|
- **Inteligentny:** pokazuje istotne informacje na pierwszy rzut oka.
|
||||||
- **Feature rich:** support for all your favorite tools.
|
- **Bogata funkcjonalność:** wspiera wszystkie twoje ulubione narzędzia.
|
||||||
- **Easy:** quick to install – start using it in minutes.
|
- **Łatwy w obsłudze:** szybka instalacja - zacznij korzystać w kilka minut.
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://starship.rs/config/"><strong>Explore the Starship docs ▶</strong></a>
|
<a href="https://starship.rs/config/"><strong>Przeglądaj dokumentację Starship ▶</strong></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<a name="🚀-installation"></a>
|
<a name="🚀-installation"></a>
|
||||||
|
|
||||||
## 🚀 Installation
|
## 🚀Instalacja
|
||||||
|
|
||||||
### Prerequisites
|
### Wymagania wstępne
|
||||||
|
|
||||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
- Czcionka typu [Nerd Font](https://www.nerdfonts.com/) zainstalowana i ustawiona w twoim terminalu (wypróbuj na przykład [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||||
|
|
||||||
### Getting Started
|
### Pierwsze kroki
|
||||||
|
|
||||||
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
|
**Uwaga**: z powodu szybko rosnącej liczby platform poniżej pokazano wybrane platformy spośród obecnie obsługiwanych. Nie widzisz swojej? Sprawdź w [dodatkowych instrukcjach dla platform](https://starship.rs/installing/).
|
||||||
|
|
||||||
1. Install the **starship** binary:
|
1. Zainstaluj plik programu **starship**:
|
||||||
|
|
||||||
|
|
||||||
#### Install Latest Version
|
#### Instalacja najnowszej wersji
|
||||||
|
|
||||||
|
|
||||||
##### From prebuilt binary, with Shell:
|
##### Z wstępnie zbudowanego pliku wykonywalnego, za pomocą powłoki Shell:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
|
||||||
|
|
||||||
|
Aby zaktualizować Starship, uruchom ponownie powyższy skrypt. Obecna wersja zostanie zastąpiona nową, bez modyfikowania konfiguracji Starship.
|
||||||
|
|
||||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
**Uwaga** - Domyślne ustawienia skryptu instalacyjnego można zmienić - szczegóły znajdziesz we wbudowanym poleceniu pomocy.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
#### Install via Package Manager
|
#### Instalacja za pomocą menedżera pakietów
|
||||||
|
|
||||||
|
|
||||||
##### Example: [Homebrew](https://brew.sh/):
|
##### Przykład: [Homebrew](https://brew.sh/):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew install starship
|
brew install starship
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
##### With [Scoop](https://scoop.sh):
|
##### Za pomocą [Scoop](https://scoop.sh):
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
scoop install starship
|
scoop install starship
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Add the init script to your shell's config file:
|
2. Dodaj skrypt inicjalizacyjny do konfiguracji twojej powłoki:
|
||||||
|
|
||||||
|
|
||||||
#### Bash
|
#### Bash
|
||||||
|
|
||||||
Add the following to the end of `~/.bashrc`:
|
Dodaj na koniec pliku `~/.bashrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.bashrc
|
# ~/.bashrc
|
||||||
@ -202,7 +210,7 @@
|
|||||||
|
|
||||||
#### Fish
|
#### Fish
|
||||||
|
|
||||||
Add the following to the end of `~/.config/fish/config.fish`:
|
Dodaj na koniec pliku `~/.config/fish/config.fish`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.config/fish/config.fish
|
# ~/.config/fish/config.fish
|
||||||
@ -213,7 +221,7 @@
|
|||||||
|
|
||||||
#### Zsh
|
#### Zsh
|
||||||
|
|
||||||
Add the following to the end of `~/.zshrc`:
|
Dodaj na koniec pliku `~/.zshrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.zshrc
|
# ~/.zshrc
|
||||||
@ -224,7 +232,7 @@
|
|||||||
|
|
||||||
#### PowerShell
|
#### PowerShell
|
||||||
|
|
||||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
Dodaj na koniec pliku `Microsoft.PowerShell_profile.ps1`. Możesz sprawdzić lokalizację tego pliku odczytując zmienną środowiskową `$PROFILE` w PowerShell. Zazwyczaj jest to `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` lub `~/.config/powershell/Microsoft.PowerShell_profile.ps1` na -Nixie.
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
Invoke-Expression (&starship init powershell)
|
Invoke-Expression (&starship init powershell)
|
||||||
@ -233,7 +241,7 @@
|
|||||||
|
|
||||||
#### Ion
|
#### Ion
|
||||||
|
|
||||||
Add the following to the end of `~/.config/ion/initrc`:
|
Dodaj na koniec pliku `~/.config/ion/initrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.config/ion/initrc
|
# ~/.config/ion/initrc
|
||||||
@ -244,7 +252,7 @@
|
|||||||
|
|
||||||
#### Elvish
|
#### Elvish
|
||||||
|
|
||||||
**Warning** Only elvish v0.15 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`:
|
**Uwaga** Działa tylko dla wersji powłoki elvish v0.15 lub wyższej. Dodaj na koniec pliku `~/.elvish/rc.elv`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.elvish/rc.elv
|
# ~/.elvish/rc.elv
|
||||||
@ -255,7 +263,7 @@
|
|||||||
|
|
||||||
#### Tcsh
|
#### Tcsh
|
||||||
|
|
||||||
Add the following to the end of `~/.tcshrc`:
|
Dodaj na koniec pliku `~/.tcshrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.tcshrc
|
# ~/.tcshrc
|
||||||
@ -266,7 +274,7 @@
|
|||||||
|
|
||||||
#### Xonsh
|
#### Xonsh
|
||||||
|
|
||||||
Add the following to the end of `~/.xonshrc`:
|
Dodaj na koniec pliku `~/.xonshrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# ~/.xonshrc
|
# ~/.xonshrc
|
||||||
@ -277,7 +285,7 @@
|
|||||||
|
|
||||||
#### Nushell
|
#### Nushell
|
||||||
|
|
||||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
**Uwaga** Może ulec zmianie w przyszłości. Działa tylko dla wersji powłoki nu v0.33 lub wyższej. Dodaj do pliku konfiguracyjnego nu. Możesz sprawdzić lokalizację tego pliku wywołując polecenie `config path` w powłoce nu.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
startup = [
|
startup = [
|
||||||
@ -288,30 +296,30 @@
|
|||||||
prompt = "starship_prompt"
|
prompt = "starship_prompt"
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🤝 Contributing
|
## 🤝Wspomóż nas
|
||||||
|
|
||||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
Zawsze szukamy pomocy od osób **na każdym poziomie zaawansowania**! Jeśli potrzebujesz łatwiejszego wdrożenia w projekt, wypróbuj [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||||
|
|
||||||
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).
|
Jeśli płynnie władasz językiem innym niż angielski, bardzo doceniamy każdą pomoc w tłumaczeniu dokumentacji. Jeśli chcesz pomóc, tłumaczenia można dodawać na [Starship Crowdin](https://translate.starship.rs/).
|
||||||
|
|
||||||
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
|
Jeżeli chcesz wspomóc tworzenie starship, zapoznaj się z naszym [Poradnikiem Współpracy](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Ponadto możesz wejść na nasz [serwer Discord](https://discord.gg/8Jzqu3T) i się przywitać. 👋
|
||||||
|
|
||||||
### Code Contributors
|
### Współtwórcy kodu
|
||||||
|
|
||||||
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)].
|
Ten projekt istnieje dzięki pomocy wszystkich zaangażowanych osób. [[Wspomóż nas](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)].
|
||||||
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
|
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
|
||||||
|
|
||||||
### Financial Contributors
|
### Wsparcie finansowe
|
||||||
|
|
||||||
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
|
Udziel wsparcia finansowego i pomóż nam utrzymywać społeczność. [[Wspomóż nas](https://opencollective.com/starship/contribute)]
|
||||||
|
|
||||||
#### Individuals
|
#### Osoby prywatne
|
||||||
|
|
||||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||||
|
|
||||||
#### Organizations
|
#### Organizacje
|
||||||
|
|
||||||
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
|
Wspieraj ten projekt za pomocą swojej organizacji. Twoje logo pojawi się tutaj z linkiem do Twojej witryny. [[Wspomóż nas](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/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/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
|
||||||
@ -324,21 +332,21 @@ Support this project with your organization. Your logo will show up here with a
|
|||||||
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
|
<a href="https://opencollective.com/starship/organization/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>
|
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
|
||||||
|
|
||||||
## 💭 Inspired By
|
## 💭Inspiracje
|
||||||
|
|
||||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
Zapoznaj się z wcześniejszymi projektami które zainspirowały nas do stworzenia starship. 🙏
|
||||||
|
|
||||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
|
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Wiersz poleceń ZSH dla astronautów.
|
||||||
|
|
||||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
|
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Motyw robyrussell dla wielu powłok, napisany w JavaScript.
|
||||||
|
|
||||||
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
|
- **[reujab/silver](https://github.com/reujab/silver)** - Wiersz polecenia typu Powerline z ikonami, działa na wielu różnych powłokach.
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<br>
|
<br>
|
||||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## 📝 License
|
## 📝 Licencja
|
||||||
|
|
||||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
# 🚀 Advanced Installation
|
# 🚀 Zaawansowana Instalacja
|
||||||
|
|
||||||
To install starship, you need to do two things:
|
Aby zainstalować starship, musisz zrobić dwie rzeczy:
|
||||||
|
|
||||||
1. Get the **starship** binary onto your computer
|
1. Pobrać plik wykonywalny **starship** na swój komputer
|
||||||
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
|
1. Skonfigurować swoją powłokę żeby używała pliku wykonywalnego starship jako wiersza poleceń poprzez modyfikację skryptów inicjalizacyjnych
|
||||||
|
|
||||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
Dla większości użytkowników instrukcje na [stronie głównej](/guide/#🚀-installation) są wystarczające. However, for some more specialized platforms, different instructions are needed.
|
||||||
|
|
||||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||||
|
|
||||||
## [Chocolatey](https://chocolatey.org)
|
## [Chocolatey](https://chocolatey.org)
|
||||||
|
|
||||||
### Prerequisites
|
### Wymagania wstępne
|
||||||
|
|
||||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||||
|
|
||||||
### Installation
|
### Instalacja
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
choco install starship
|
choco install starship
|
||||||
@ -23,13 +23,13 @@ choco install starship
|
|||||||
|
|
||||||
## [termux](https://termux.com)
|
## [termux](https://termux.com)
|
||||||
|
|
||||||
### Prerequisites
|
### Wymagania wstępne
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pkg install getconf
|
pkg install getconf
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installation
|
### Instalacja
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Migrating to v0.45.0
|
# Migracja do wersji v0.45.0
|
||||||
|
|
||||||
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
|
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
# Presets
|
# Gotowe konfiguracje
|
||||||
|
|
||||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
Poniżej zamieszczono zestaw gotowych konfiguracji Starship stworzonych przez społeczność. Jeżeli chcesz zamieścić własną konfigurację, [złóż PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) z modyfikacją tego pliku! 😊
|
||||||
|
|
||||||
## Nerd Font Symbols
|
## Symbole Nerd Font
|
||||||
|
|
||||||
This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye!
|
Poniższa konfiguracja nie zmienia nic poza znaczkami użytymi do oznaczenia poszczególnych modułów. Jeżeli nie jesteś fanem emoji, to może ci się spodobać!
|
||||||
|
|
||||||
![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png)
|
![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png)
|
||||||
|
|
||||||
### Prerequisites
|
### Wymagania wstępne
|
||||||
|
|
||||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
- Czcionka [Nerd Font](https://www.nerdfonts.com/) zainstalowana i ustawiona w twoim terminalu (w przykładzie użyto Fira Code Nerd Font)
|
||||||
|
|
||||||
### Configuration
|
### Konfiguracja
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[aws]
|
[aws]
|
||||||
@ -88,19 +88,19 @@ symbol = " "
|
|||||||
symbol = "ﯣ "
|
symbol = "ﯣ "
|
||||||
```
|
```
|
||||||
|
|
||||||
## Bracketed Segments
|
## Moduły w nawiasach kwadratowych
|
||||||
|
|
||||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
Ta konfiguracja zmienia format wyświetlania wbudowanych modułów - zamiast domyślnych wyrazów ("via", "on", itp.) są wypisywane w nawiasach kwadratowych.
|
||||||
|
|
||||||
Before:
|
Przed:
|
||||||
|
|
||||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||||
|
|
||||||
After:
|
Po:
|
||||||
|
|
||||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||||
|
|
||||||
### Configuration
|
### Konfiguracja
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[aws]
|
[aws]
|
||||||
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -239,7 +242,7 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
format = '\[[$symbol($version)]($style)\]'
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Plain Text Symbols
|
## Symbole "plain text"
|
||||||
|
|
||||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||||
|
|
||||||
@ -251,7 +254,7 @@ After (Plain Text Symbols):
|
|||||||
|
|
||||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||||
|
|
||||||
### Configuration
|
### Konfiguracja
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[character]
|
[character]
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -369,12 +375,15 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
|
|
||||||
![Screenshot of Hide Runtime Versions preset](/presets/hide-runtime-versions.png)
|
![Screenshot of Hide Runtime Versions preset](/presets/hide-runtime-versions.png)
|
||||||
|
|
||||||
### Configuration
|
### Konfiguracja
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,9 +68,36 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Ativando o Prompt Direito
|
||||||
|
|
||||||
|
Alguns shells suportam um prompt no lado direito que renderiza na mesma linha do input. Starship consegue definir o conteúdo do prompt direito usando a opção `right_format`. Qualquer módulo pode ser usado no `format` é suportado o `right_format`. A variável `$all` só irá alterar os módulos que não usaram de forma explicita o `format` ou `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Exemplo
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# Um prompt esquerdo minimo
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# Move o resto do prompt para direita
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Gera um prompt parecido com o seguinte:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Estilo dos textos
|
## Estilo dos textos
|
||||||
|
|
||||||
Estilo de strings são uma lista de palavras, separadas por espaço. As palavras não são case sensitive (ou seja `bold` e `BoLd` são consideradas iguais). Cada palavra pode ser uma das seguintes:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
|
||||||
- `bold`
|
- `bold`
|
||||||
- `italic`
|
- `italic`
|
||||||
@ -82,14 +109,14 @@ Estilo de strings são uma lista de palavras, separadas por espaço. As palavras
|
|||||||
- `<color>`
|
- `<color>`
|
||||||
- `none`
|
- `none`
|
||||||
|
|
||||||
onde `<color>` é uma especialista de cores (discutido abaixo). `fg:<color>` e `<color>` atualmente fazem a mesma coisa, isto deve mudar no futuro. `inverted` troca as cores de background e foreground. A ordem de palavras na string não importa.
|
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||||
|
|
||||||
O token `none` substitui todos os outros tokens na string se ele não fizer parte de um `bg:` especificado que seja, por exemplo `fg:red none fg:blue` ainda criará uma string sem estilo. `bg:none` define a cor padrão de background então `fg:red bg:none` é equivalente a `red` ou `fg:red` e `bg:green fg:red bg:none` é equivalente a `fg:red` ou`red`. Pode se transformar em um erro ao usar `none` em um conjunto de outros tokens no futuro.
|
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||||
|
|
||||||
Um especialista em cores pode ser um dos seguintes:
|
A color specifier can be one of the following:
|
||||||
|
|
||||||
- Um dos padrões de cores no terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Você pode de forma opcional prefixar com `bright-` para obter uma versão mais brilhante/clara (ex `bright-white`).
|
- Um dos padrões de cores no terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Você pode de forma opcional prefixar com `bright-` para obter uma versão mais brilhante/clara (ex `bright-white`).
|
||||||
- Um `#` seguido por um número de seis dígitos hexadecimais. Isto especifica um [Código RGB em formato hexadecimal](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
- Um `#` seguido por um número de seis dígitos hexadecimais. Isto especifica um [Código RGB em formato hexadecimal](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||||
- Um número entre 0-255. Este especifica um [Código de Cor ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
|
- Um número entre 0-255. Este especifica um [Código de Cor ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
|
||||||
|
|
||||||
Se múltiplas cores forem especificadas para foreground/background, a ultima da string que terá prioridade.
|
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
Para atualizar o Starship de maneira manual, execute novamente o script acima. Isto irá substituir a versão atual sem alterar as configurações do Starship.
|
|
||||||
|
|
||||||
|
Para atualizar o Starship de maneira manual, execute novamente o script acima. Isto irá substituir a versão atual sem alterar as configurações do Starship.
|
||||||
|
|
||||||
**Nota** - Os padrões de instalação do script podem ser alteradas e substituídas, consulte a ajuda de built-in.
|
**Nota** - Os padrões de instalação do script podem ser alteradas e substituídas, consulte a ajuda de built-in.
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ Está predefinição oculta a versão do runtime da linguagem. Se você trabalha
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,6 +68,33 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Style Strings
|
## Style Strings
|
||||||
|
|
||||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
@ -75,7 +75,7 @@ A text group is made up of two different parts.
|
|||||||
|
|
||||||
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
||||||
|
|
||||||
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part.
|
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@ -142,12 +142,14 @@ This is the list of prompt-wide configuration options.
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||||
|
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@ -179,6 +181,7 @@ format = """
|
|||||||
$username\
|
$username\
|
||||||
$hostname\
|
$hostname\
|
||||||
$shlvl\
|
$shlvl\
|
||||||
|
$singularity\
|
||||||
$kubernetes\
|
$kubernetes\
|
||||||
$directory\
|
$directory\
|
||||||
$vcsh\
|
$vcsh\
|
||||||
@ -191,6 +194,7 @@ $hg_branch\
|
|||||||
$docker_context\
|
$docker_context\
|
||||||
$package\
|
$package\
|
||||||
$cmake\
|
$cmake\
|
||||||
|
$cobol\
|
||||||
$dart\
|
$dart\
|
||||||
$deno\
|
$deno\
|
||||||
$dotnet\
|
$dotnet\
|
||||||
@ -202,6 +206,7 @@ $helm\
|
|||||||
$java\
|
$java\
|
||||||
$julia\
|
$julia\
|
||||||
$kotlin\
|
$kotlin\
|
||||||
|
$lua\
|
||||||
$nim\
|
$nim\
|
||||||
$nodejs\
|
$nodejs\
|
||||||
$ocaml\
|
$ocaml\
|
||||||
@ -209,6 +214,7 @@ $perl\
|
|||||||
$php\
|
$php\
|
||||||
$purescript\
|
$purescript\
|
||||||
$python\
|
$python\
|
||||||
|
$rlang\
|
||||||
$red\
|
$red\
|
||||||
$ruby\
|
$ruby\
|
||||||
$rust\
|
$rust\
|
||||||
@ -229,7 +235,6 @@ $crystal\
|
|||||||
$custom\
|
$custom\
|
||||||
$cmd_duration\
|
$cmd_duration\
|
||||||
$line_break\
|
$line_break\
|
||||||
$lua\
|
|
||||||
$jobs\
|
$jobs\
|
||||||
$battery\
|
$battery\
|
||||||
$time\
|
$time\
|
||||||
@ -238,6 +243,13 @@ $shell\
|
|||||||
$character"""
|
$character"""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Eg.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# Move the directory to the second line
|
||||||
|
format="$all$directory$character"
|
||||||
|
```
|
||||||
|
|
||||||
## AWS
|
## AWS
|
||||||
|
|
||||||
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. This module also shows an expiration timer when using temporary credentials.
|
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. This module also shows an expiration timer when using temporary credentials.
|
||||||
@ -479,6 +491,36 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
|||||||
|
|
||||||
\*: This variable can only be used as a part of a style string
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
|
## COBOL / GNUCOBOL
|
||||||
|
|
||||||
|
The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
|
- The current directory contains any files ending in `.cob` or `.COB`
|
||||||
|
- The current directory contains any files ending in `.cbl` or `.CBL`
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||||
|
| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. |
|
||||||
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
|
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||||
|
| `style` | `"bold blue"` | The style for the module. |
|
||||||
|
| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. |
|
||||||
|
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||||
|
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||||
|
| `disabled` | `false` | Disables the `cobol` module. |
|
||||||
|
|
||||||
|
### Variables
|
||||||
|
|
||||||
|
| Variable | Example | Description |
|
||||||
|
| --------- | ---------- | ------------------------------------ |
|
||||||
|
| version | `v3.1.2.0` | The version of `cobol` |
|
||||||
|
| symbol | | Mirrors the value of option `symbol` |
|
||||||
|
| style\* | | Mirrors the value of option `style` |
|
||||||
|
|
||||||
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
## Command Duration
|
## Command Duration
|
||||||
|
|
||||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||||
@ -530,7 +572,7 @@ format = "underwent [$duration](bold yellow)"
|
|||||||
|
|
||||||
## Conda
|
## Conda
|
||||||
|
|
||||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
|
|
||||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
|||||||
format = "via [e $version](bold red) "
|
format = "via [e $version](bold red) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Fill
|
||||||
|
|
||||||
|
The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules.
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| -------- | -------------- | --------------------------------- |
|
||||||
|
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||||
|
| `style` | `"bold black"` | The style for the module. |
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
format="AA $fill BB $fill CC"
|
||||||
|
|
||||||
|
[fill]
|
||||||
|
symbol = "-"
|
||||||
|
style = "bold green"
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt that looks like:
|
||||||
|
|
||||||
|
```
|
||||||
|
AA -------------------------------------------- BB -------------------------------------------- CC
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## Google Cloud (`gcloud`)
|
## Google Cloud (`gcloud`)
|
||||||
|
|
||||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||||
@ -1205,12 +1276,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||||
| `added_style` | `"bold green"` | The style for the added count. |
|
| `added_style` | `"bold green"` | The style for the added count. |
|
||||||
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
||||||
| `format` | `'[+$added]($added_style) [-$deleted]($deleted_style) '` | The format for the module. |
|
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
|
||||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||||
|
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
|
|
||||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
|||||||
behind = "⇣${count}"
|
behind = "⇣${count}"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Golang
|
## Go
|
||||||
|
|
||||||
The `golang` module shows the currently installed version of [Golang](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
The `golang` module shows the currently installed version of [Go](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- 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
|
||||||
@ -2041,18 +2113,18 @@ symbol = "☁️ "
|
|||||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||||
|
|
||||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
- [**Nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
- [**Poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
- [**Python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
- [**Composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
- [**Gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
- [**Julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||||
- [**mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
- [**Mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
||||||
- [**helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||||
- [**maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||||
- [**meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` 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.
|
||||||
|
|
||||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
|||||||
|
|
||||||
## R
|
## R
|
||||||
|
|
||||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- The current directory contains a file with the `.R` extension.
|
- The current directory contains a file with the `.R` extension.
|
||||||
- The current directory contains a file with the `.Rd` extension.
|
- The current directory contains a file with the `.Rd` extension.
|
||||||
@ -2539,7 +2611,7 @@ disabled = false
|
|||||||
|
|
||||||
## SHLVL
|
## SHLVL
|
||||||
|
|
||||||
The `shlvl` module shows the current `SHLVL` ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
|||||||
format = "via [⍱ $version](bold white) "
|
format = "via [⍱ $version](bold white) "
|
||||||
```
|
```
|
||||||
|
|
||||||
## VLang
|
## V
|
||||||
|
|
||||||
The `vlang` module shows you your currently installed version of V. By default the module will be shown if any of the following conditions are met:
|
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
|
||||||
- The current directory contains a file with `.v` extension
|
- The current directory contains a file with `.v` extension
|
||||||
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
||||||
|
|
||||||
@ -2925,7 +2997,7 @@ The `vlang` module shows you your currently installed version of V. By default t
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
# ~/.config/starship.toml
|
# ~/.config/starship.toml
|
||||||
[v]
|
[vlang]
|
||||||
format = "via [V $version](blue bold) "
|
format = "via [V $version](blue bold) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
|
||||||
|
|
||||||
|
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||||
|
|
||||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,9 +68,36 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Пример
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Строки стиля
|
## Строки стиля
|
||||||
|
|
||||||
Строки стиля - это список слов, разделенных пробелами. Слова не чувствительны к регистру (то есть `bold` и `BoLd` считаются одной строкой). Каждое слово может быть одним из следующих:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
|
||||||
- `bold`
|
- `bold`
|
||||||
- `italic`
|
- `italic`
|
||||||
@ -82,14 +109,14 @@ starship_precmd_user_func="set_win_title"
|
|||||||
- `<color>`
|
- `<color>`
|
||||||
- `none`
|
- `none`
|
||||||
|
|
||||||
где `<color>` является цветовым спецификатором (обсуждается ниже). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. Порядок слов в строке не имеет значения.
|
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||||
|
|
||||||
Токен `none` переопределяет все остальные токены в строке, если он не является частью спецификатора `bg:` так, например, `fg:red none fg:blue` все равно создаст строку без стиля. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. Использование `none` в сочетании с другими токенами может стать ошибкой в будущем.
|
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||||
|
|
||||||
Цветовой спецификатор может быть одним из следующих:
|
A color specifier can be one of the following:
|
||||||
|
|
||||||
- Некоторые из стандартных цветов терминалов: `black`, `red`, `green`, `blue`, `gellow`, `purple`, `cyan`, `white`. Вы можете по желанию добавить префикс `bright-`, чтобы получить яркую версию (например, `bright-white`).
|
- Некоторые из стандартных цветов терминалов: `black`, `red`, `green`, `blue`, `gellow`, `purple`, `cyan`, `white`. Вы можете по желанию добавить префикс `bright-`, чтобы получить яркую версию (например, `bright-white`).
|
||||||
- `#`, за которой следует шестизначное шестнадцатеричное число. Это определяет [шестнадцатеричный код цвета RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
- `#`, за которой следует шестизначное шестнадцатеричное число. Это определяет [шестнадцатеричный код цвета RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||||
- Число от 0 до 255. Это определяет [8-битный код цвета ANSI](https://i.stack.imgur.com/KTSQa.png).
|
- Число от 0 до 255. Это определяет [8-битный код цвета ANSI](https://i.stack.imgur.com/KTSQa.png).
|
||||||
|
|
||||||
Если для переднего плана/фона задано несколько цветов, то последняя из строк будет иметь приоритет.
|
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
Для обновления Starship перезапустите этот скрипт. Он заменит текущую версию без изменения конфигурации.
|
|
||||||
|
|
||||||
|
Для обновления Starship перезапустите этот скрипт. Он заменит текущую версию без изменения конфигурации.
|
||||||
|
|
||||||
**Примечание** - Значения по умолчанию из установочного скрипта могут быть переопределены. Для уточнения смотрите встроенную справку.
|
**Примечание** - Значения по умолчанию из установочного скрипта могут быть переопределены. Для уточнения смотрите встроенную справку.
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -67,6 +67,33 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Style Strings
|
## Style Strings
|
||||||
|
|
||||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
@ -75,7 +75,7 @@ A text group is made up of two different parts.
|
|||||||
|
|
||||||
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
||||||
|
|
||||||
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part.
|
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@ -142,12 +142,14 @@ This is the list of prompt-wide configuration options.
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||||
|
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@ -179,6 +181,7 @@ format = """
|
|||||||
$username\
|
$username\
|
||||||
$hostname\
|
$hostname\
|
||||||
$shlvl\
|
$shlvl\
|
||||||
|
$singularity\
|
||||||
$kubernetes\
|
$kubernetes\
|
||||||
$directory\
|
$directory\
|
||||||
$vcsh\
|
$vcsh\
|
||||||
@ -191,6 +194,7 @@ $hg_branch\
|
|||||||
$docker_context\
|
$docker_context\
|
||||||
$package\
|
$package\
|
||||||
$cmake\
|
$cmake\
|
||||||
|
$cobol\
|
||||||
$dart\
|
$dart\
|
||||||
$deno\
|
$deno\
|
||||||
$dotnet\
|
$dotnet\
|
||||||
@ -202,6 +206,7 @@ $helm\
|
|||||||
$java\
|
$java\
|
||||||
$julia\
|
$julia\
|
||||||
$kotlin\
|
$kotlin\
|
||||||
|
$lua\
|
||||||
$nim\
|
$nim\
|
||||||
$nodejs\
|
$nodejs\
|
||||||
$ocaml\
|
$ocaml\
|
||||||
@ -209,6 +214,7 @@ $perl\
|
|||||||
$php\
|
$php\
|
||||||
$purescript\
|
$purescript\
|
||||||
$python\
|
$python\
|
||||||
|
$rlang\
|
||||||
$red\
|
$red\
|
||||||
$ruby\
|
$ruby\
|
||||||
$rust\
|
$rust\
|
||||||
@ -229,7 +235,6 @@ $crystal\
|
|||||||
$custom\
|
$custom\
|
||||||
$cmd_duration\
|
$cmd_duration\
|
||||||
$line_break\
|
$line_break\
|
||||||
$lua\
|
|
||||||
$jobs\
|
$jobs\
|
||||||
$battery\
|
$battery\
|
||||||
$time\
|
$time\
|
||||||
@ -238,6 +243,13 @@ $shell\
|
|||||||
$character"""
|
$character"""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Eg.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# Move the directory to the second line
|
||||||
|
format="$all$directory$character"
|
||||||
|
```
|
||||||
|
|
||||||
## AWS
|
## AWS
|
||||||
|
|
||||||
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. This module also shows an expiration timer when using temporary credentials.
|
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. This module also shows an expiration timer when using temporary credentials.
|
||||||
@ -479,6 +491,36 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
|||||||
|
|
||||||
\*: This variable can only be used as a part of a style string
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
|
## COBOL / GNUCOBOL
|
||||||
|
|
||||||
|
The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
|
- The current directory contains any files ending in `.cob` or `.COB`
|
||||||
|
- The current directory contains any files ending in `.cbl` or `.CBL`
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||||
|
| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. |
|
||||||
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
|
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||||
|
| `style` | `"bold blue"` | The style for the module. |
|
||||||
|
| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. |
|
||||||
|
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||||
|
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||||
|
| `disabled` | `false` | Disables the `cobol` module. |
|
||||||
|
|
||||||
|
### Variables
|
||||||
|
|
||||||
|
| Variable | Example | Description |
|
||||||
|
| --------- | ---------- | ------------------------------------ |
|
||||||
|
| version | `v3.1.2.0` | The version of `cobol` |
|
||||||
|
| symbol | | Mirrors the value of option `symbol` |
|
||||||
|
| style\* | | Mirrors the value of option `style` |
|
||||||
|
|
||||||
|
\*: This variable can only be used as a part of a style string
|
||||||
|
|
||||||
## Command Duration
|
## Command Duration
|
||||||
|
|
||||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||||
@ -530,7 +572,7 @@ format = "underwent [$duration](bold yellow)"
|
|||||||
|
|
||||||
## Conda
|
## Conda
|
||||||
|
|
||||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
|
|
||||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
|||||||
format = "via [e $version](bold red) "
|
format = "via [e $version](bold red) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Fill
|
||||||
|
|
||||||
|
The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules.
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| -------- | -------------- | --------------------------------- |
|
||||||
|
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||||
|
| `style` | `"bold black"` | The style for the module. |
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
format="AA $fill BB $fill CC"
|
||||||
|
|
||||||
|
[fill]
|
||||||
|
symbol = "-"
|
||||||
|
style = "bold green"
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt that looks like:
|
||||||
|
|
||||||
|
```
|
||||||
|
AA -------------------------------------------- BB -------------------------------------------- CC
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## Google Cloud (`gcloud`)
|
## Google Cloud (`gcloud`)
|
||||||
|
|
||||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||||
@ -1205,12 +1276,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||||
| `added_style` | `"bold green"` | The style for the added count. |
|
| `added_style` | `"bold green"` | The style for the added count. |
|
||||||
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
||||||
| `format` | `'[+$added]($added_style) [-$deleted]($deleted_style) '` | The format for the module. |
|
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
|
||||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||||
|
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
|
|
||||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
|||||||
behind = "⇣${count}"
|
behind = "⇣${count}"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Golang
|
## Go
|
||||||
|
|
||||||
The `golang` module shows the currently installed version of [Golang](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
The `golang` module shows the currently installed version of [Go](https://golang.org/). By default the module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- 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
|
||||||
@ -2041,18 +2113,18 @@ symbol = "☁️ "
|
|||||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||||
|
|
||||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
- [**Nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
- [**Poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
- [**Python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
- [**Composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
- [**Gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
- [**Julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||||
- [**mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
- [**Mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present
|
||||||
- [**helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||||
- [**maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||||
- [**meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` 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.
|
||||||
|
|
||||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
|||||||
|
|
||||||
## R
|
## R
|
||||||
|
|
||||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met:
|
||||||
|
|
||||||
- The current directory contains a file with the `.R` extension.
|
- The current directory contains a file with the `.R` extension.
|
||||||
- The current directory contains a file with the `.Rd` extension.
|
- The current directory contains a file with the `.Rd` extension.
|
||||||
@ -2539,7 +2611,7 @@ disabled = false
|
|||||||
|
|
||||||
## SHLVL
|
## SHLVL
|
||||||
|
|
||||||
The `shlvl` module shows the current `SHLVL` ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
|||||||
format = "via [⍱ $version](bold white) "
|
format = "via [⍱ $version](bold white) "
|
||||||
```
|
```
|
||||||
|
|
||||||
## VLang
|
## V
|
||||||
|
|
||||||
The `vlang` module shows you your currently installed version of V. By default the module will be shown if any of the following conditions are met:
|
The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met:
|
||||||
- The current directory contains a file with `.v` extension
|
- The current directory contains a file with `.v` extension
|
||||||
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file
|
||||||
|
|
||||||
@ -2925,7 +2997,7 @@ The `vlang` module shows you your currently installed version of V. By default t
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
# ~/.config/starship.toml
|
# ~/.config/starship.toml
|
||||||
[v]
|
[vlang]
|
||||||
format = "via [V $version](blue bold) "
|
format = "via [V $version](blue bold) "
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
|
||||||
|
|
||||||
|
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||||
|
|
||||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,9 +68,36 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### Ví dụ
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Các chuỗi kiểu
|
## Các chuỗi kiểu
|
||||||
|
|
||||||
Chuỗi kiểu là một danh sách các từ, được phân cách bởi khoảng trắng. Các từ là không phân biệt hoa thường (ví dụ. `bold` và `Bold` là hai chuỗi tương đương). Mỗi từ có thể là một trong các từ sau:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
|
||||||
- `bold`
|
- `bold`
|
||||||
- `nghiêng`
|
- `nghiêng`
|
||||||
@ -82,14 +109,14 @@ Chuỗi kiểu là một danh sách các từ, được phân cách bởi khoả
|
|||||||
- `<color>`
|
- `<color>`
|
||||||
- `none`
|
- `none`
|
||||||
|
|
||||||
`<color>` là một nơi quy định màu (được bàn luận ở phía dưới). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. Thứ tự các từ trong chuỗi là không quan trọng.
|
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||||
|
|
||||||
Từ mã `none` ghi đè tất cả các từ mã khác trong chuỗi nếu nó không là một phần của `bg:` specifier, vậy nên `fg:red none fg:blue` sẽ vẫn tạo một chuỗi mà không có kiểu. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. Nó có thể trở thành một lỗi để sử dụng `none` trong việc kết hợp với các từ mã khác trong tương lai.
|
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||||
|
|
||||||
Một quy định màu có thể là một trong các thứ sau:
|
A color specifier can be one of the following:
|
||||||
|
|
||||||
- Một tròn các màu chuẩn của terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Bạn có thể tuỳ chọn những tiền tố này với `bright` để có được phiên bản sáng hơn (ví dụ: `bright-white`).
|
- Một tròn các màu chuẩn của terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Bạn có thể tuỳ chọn những tiền tố này với `bright` để có được phiên bản sáng hơn (ví dụ: `bright-white`).
|
||||||
- Một `#` được theo sau bởi một số thập lục phân gồm sáu chữ số. Cái này quy định một [mã thập lục phân cho màu RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
- Một `#` được theo sau bởi một số thập lục phân gồm sáu chữ số. Cái này quy định một [mã thập lục phân cho màu RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||||
- Một số nằm giữa 0-255. Cái này quy định một [mã màu ANSI 8-bit](https://i.stack.imgur.com/KTSQa.png).
|
- Một số nằm giữa 0-255. Cái này quy định một [mã màu ANSI 8-bit](https://i.stack.imgur.com/KTSQa.png).
|
||||||
|
|
||||||
Nếu nhiều màu được quy định cho màu chữ/màu nền, cái cuối cùng trong chuỗi sẽ được ưu tiên.
|
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="Tiếng Anh"
|
alt="Tiếng Anh"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="Tiếng Nhật"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="Tiếng Trung hiện đại"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Tiếng Nga"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -79,15 +55,7 @@
|
|||||||
><img
|
><img
|
||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Tiếng Đức"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="Tiếng Trung giản thể"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -95,7 +63,7 @@
|
|||||||
><img
|
><img
|
||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||||
alt="Tiếng Tây Ban Nha"
|
alt="Español"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -103,7 +71,31 @@
|
|||||||
><img
|
><img
|
||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Thiếng Pháp"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
Để cập nhật chính Starship, hãy chạy lại đoạn script bên trên. Nó sẽ thay thế phiên bản hiện tại mà không hề thay đổi gì những cài đặt của Starship trước đó.
|
|
||||||
|
|
||||||
|
Để cập nhật chính Starship, hãy chạy lại đoạn script bên trên. Nó sẽ thay thế phiên bản hiện tại mà không hề thay đổi gì những cài đặt của Starship trước đó.
|
||||||
|
|
||||||
**Ghi chú** - Script cài đặt mặc định có thể bị ghi đè.
|
**Ghi chú** - Script cài đặt mặc định có thể bị ghi đè.
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,9 +68,36 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### 示例
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## 样式设定
|
## 样式设定
|
||||||
|
|
||||||
样式字符串是用空格分隔的单词列表。 其中单词不是大小写敏感的(例如 `bold` 和 `BoLd` 被视为同一字符串)。 每个单词可以是以下之一:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
|
||||||
- `bold`
|
- `bold`
|
||||||
- `italic`
|
- `italic`
|
||||||
@ -82,14 +109,14 @@ starship_precmd_user_func="set_win_title"
|
|||||||
- `<color>`
|
- `<color>`
|
||||||
- `none`
|
- `none`
|
||||||
|
|
||||||
`<color>` 是颜色说明符(下面解释)。 `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. 字符串中的单词顺序不影响显示结果。
|
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||||
|
|
||||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. 未来可能会将 `none` 与其它标识符一起使用视为一种错误。
|
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||||
|
|
||||||
颜色说明符可以是以下内容之一:
|
A color specifier can be one of the following:
|
||||||
|
|
||||||
- 标准终端颜色之一:`black`,`red`,`green`,`blue`,`yellow`,`purple`,`cyan`,`white`。 您可以使用可选前缀 `bright-` 来获取明亮版本的颜色(例如,`bright-white`)。
|
- 标准终端颜色之一:`black`,`red`,`green`,`blue`,`yellow`,`purple`,`cyan`,`white`。 您可以使用可选前缀 `bright-` 来获取明亮版本的颜色(例如,`bright-white`)。
|
||||||
- 一个 `#` 后跟一个六位十六进制数。 这将指定一个 [十六进制 RGB 颜色代码](https://www.w3schools.com/colors/colors_hexadecimal.asp)。
|
- 一个 `#` 后跟一个六位十六进制数。 这将指定一个 [十六进制 RGB 颜色代码](https://www.w3schools.com/colors/colors_hexadecimal.asp)。
|
||||||
- 0-255 之间的数字。 这将指定一个 [8 位 ANSI 颜色码](https://i.stack.imgur.com/KTSQa.png)。
|
- 0-255 之间的数字。 这将指定一个 [8 位 ANSI 颜色码](https://i.stack.imgur.com/KTSQa.png)。
|
||||||
|
|
||||||
如果为文本/背景指定了多个颜色,字符串中最后指定的颜色将具有最高优先级。
|
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
|
||||||
|
|
||||||
|
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||||
|
|
||||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
@ -68,9 +68,36 @@ function set_win_title(){
|
|||||||
starship_precmd_user_func="set_win_title"
|
starship_precmd_user_func="set_win_title"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Enable Right Prompt
|
||||||
|
|
||||||
|
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||||
|
|
||||||
|
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||||
|
|
||||||
|
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||||
|
|
||||||
|
### 範例
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
# A minimal left prompt
|
||||||
|
format = """$character"""
|
||||||
|
|
||||||
|
# move the rest of the prompt to the right
|
||||||
|
right_format = """$all"""
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces a prompt like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## 風格字串
|
## 風格字串
|
||||||
|
|
||||||
風格字串是一個以空白分開的單詞清單。 單字並不會區分大小寫(換句話說,`bold` 與 `BoLd` 是被當作兩個相同的字串)。 每個單詞可以是下列其中之一:
|
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||||
|
|
||||||
- `bold`
|
- `bold`
|
||||||
- `斜體字`
|
- `斜體字`
|
||||||
@ -82,14 +109,14 @@ starship_precmd_user_func="set_win_title"
|
|||||||
- `<color>`
|
- `<color>`
|
||||||
- `none`
|
- `none`
|
||||||
|
|
||||||
其中 `<color>` 是指定顏色用的(下面解釋)。 `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. 單詞在字串中的順序不重要。
|
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||||
|
|
||||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. 未來可能會將 `none` 與其他符號一起使用的情形視為是一種錯誤。
|
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||||
|
|
||||||
一個顏色指定符號可以是下列其中之一:
|
A color specifier can be one of the following:
|
||||||
|
|
||||||
- 任一個標準終端機顏色:`black`、`red`、`green`、`blue`、`yellow`、`purple`、`cyan`、`white`。 你可以選擇性地加上前綴 `bright-` 來取得明亮版本的顏色(例如:`bright-white`)。
|
- 任一個標準終端機顏色:`black`、`red`、`green`、`blue`、`yellow`、`purple`、`cyan`、`white`。 你可以選擇性地加上前綴 `bright-` 來取得明亮版本的顏色(例如:`bright-white`)。
|
||||||
- 一個 `#` 後面跟隨著六位數的十六進位數字。 這個指定了 [RGB 十六進制色碼](https://www.w3schools.com/colors/colors_hexadecimal.asp)。
|
- 一個 `#` 後面跟隨著六位數的十六進位數字。 這個指定了 [RGB 十六進制色碼](https://www.w3schools.com/colors/colors_hexadecimal.asp)。
|
||||||
- 一個介於 0~255 之間的數字。 這個指定了 [8-bit ANSI 色碼](https://i.stack.imgur.com/KTSQa.png)。
|
- 一個介於 0~255 之間的數字。 這個指定了 [8-bit ANSI 色碼](https://i.stack.imgur.com/KTSQa.png)。
|
||||||
|
|
||||||
如果前景/後景被指定了多種顏色,最後一個顏色具有最高優先性。
|
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||||
alt="English"
|
alt="English"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
|
||||||
alt="日本語"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
|
||||||
alt="繁體中文"
|
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
|
||||||
alt="Русский"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -80,14 +56,6 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||||
alt="Deutsch"
|
alt="Deutsch"
|
||||||
/></a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
|
||||||
><img
|
|
||||||
height="20"
|
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
|
||||||
alt="简体中文"
|
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -104,6 +72,30 @@
|
|||||||
height="20"
|
height="20"
|
||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||||
alt="Français"
|
alt="Français"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||||
|
alt="日本語"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||||
|
alt="Português do Brasil"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||||
|
alt="Русский"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -113,6 +105,22 @@
|
|||||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||||
alt="Tiếng Việt"
|
alt="Tiếng Việt"
|
||||||
/></a>
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||||
|
alt="简体中文"
|
||||||
|
/></a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||||
|
><img
|
||||||
|
height="20"
|
||||||
|
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||||
|
alt="繁體中文"
|
||||||
|
/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
@ -160,8 +168,8 @@
|
|||||||
```sh
|
```sh
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
```
|
```
|
||||||
如果想更新已安裝的 Starship,請重新執行上述指令。 指令只會更新 Starship 執行檔本身,不會影響到任何已撰寫的設定檔。
|
|
||||||
|
|
||||||
|
如果想更新已安裝的 Starship,請重新執行上述指令。 指令只會更新 Starship 執行檔本身,不會影響到任何已撰寫的設定檔。
|
||||||
|
|
||||||
**備註** —— 安裝腳本的預設值可以被覆蓋,請使用以下指令查看內置說明。
|
**備註** —— 安裝腳本的預設值可以被覆蓋,請使用以下指令查看內置說明。
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
|||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = '\[[⏱ $duration ]($style)\]'
|
format = '\[[⏱ $duration ]($style)\]'
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = '\[[$symbol($version)]($style)\]'
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
format = '\[[$symbol$environment]($style)\]'
|
format = '\[[$symbol$environment]($style)\]'
|
||||||
|
|
||||||
@ -272,6 +275,9 @@ deleted = "x"
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = "aws "
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = "conda "
|
symbol = "conda "
|
||||||
|
|
||||||
@ -375,6 +381,9 @@ symbol = "swift "
|
|||||||
[cmake]
|
[cmake]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
format = "via [$symbol]($style)"
|
format = "via [$symbol]($style)"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user