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"
|
||||
```
|
||||
|
||||
## 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 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.
|
||||
|
||||
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:
|
||||
|
||||
@ -143,12 +143,14 @@ This is the list of prompt-wide configuration options.
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
@ -179,6 +181,7 @@ format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$directory\
|
||||
$vcsh\
|
||||
@ -191,6 +194,7 @@ $hg_branch\
|
||||
$docker_context\
|
||||
$package\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
@ -202,6 +206,7 @@ $helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$lua\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
@ -209,6 +214,7 @@ $perl\
|
||||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
@ -229,7 +235,6 @@ $crystal\
|
||||
$custom\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$lua\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
@ -238,6 +243,13 @@ $shell\
|
||||
$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
|
||||
|
||||
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
|
||||
|
||||
## 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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
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`)
|
||||
|
||||
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.
|
||||
@ -1206,10 +1277,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
||||
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||
| `added_style` | `"bold green"` | The style for the added 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. |
|
||||
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||
|
||||
### Variables
|
||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_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.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.
|
||||
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` 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.
|
||||
|
||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
|
||||
## 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 `.Rd` extension.
|
||||
@ -2539,7 +2611,7 @@ disabled = false
|
||||
|
||||
## 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
|
||||
|
||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
||||
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 `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
|
||||
# ~/.config/starship.toml
|
||||
[v]
|
||||
[vlang]
|
||||
format = "via [V $version](blue bold) "
|
||||
```
|
||||
|
||||
|
@ -48,30 +48,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```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.
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,6 +68,33 @@ function 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 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.
|
||||
|
||||
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:
|
||||
|
||||
@ -143,12 +143,14 @@ This is the list of prompt-wide configuration options.
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
@ -179,6 +181,7 @@ format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$directory\
|
||||
$vcsh\
|
||||
@ -191,6 +194,7 @@ $hg_branch\
|
||||
$docker_context\
|
||||
$package\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
@ -202,6 +206,7 @@ $helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$lua\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
@ -209,6 +214,7 @@ $perl\
|
||||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
@ -229,7 +235,6 @@ $crystal\
|
||||
$custom\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$lua\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
@ -238,6 +243,13 @@ $shell\
|
||||
$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
|
||||
|
||||
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
|
||||
|
||||
## 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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
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`)
|
||||
|
||||
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.
|
||||
@ -1206,10 +1277,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
||||
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||
| `added_style` | `"bold green"` | The style for the added 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. |
|
||||
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||
|
||||
### Variables
|
||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_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.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.
|
||||
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` 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.
|
||||
|
||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
|
||||
## 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 `.Rd` extension.
|
||||
@ -2539,7 +2611,7 @@ disabled = false
|
||||
|
||||
## 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
|
||||
|
||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
||||
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 `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
|
||||
# ~/.config/starship.toml
|
||||
[v]
|
||||
[vlang]
|
||||
format = "via [V $version](blue bold) "
|
||||
```
|
||||
|
||||
|
@ -44,30 +44,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -76,14 +52,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -100,6 +68,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -109,6 +101,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -156,8 +164,8 @@
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
بۆ نوێکردنەوەی Starship خۆی، نووسینەکەی سەرەوە ڕەن بکەوە. وەشانی ئێستا دەگۆڕێت بێ ئەوەی دەسکاری ڕێکخستنەکانی Starship بکات.
|
||||
|
||||
بۆ نوێکردنەوەی Starship خۆی، نووسینەکەی سەرەوە ڕەن بکەوە. وەشانی ئێستا دەگۆڕێت بێ ئەوەی دەسکاری ڕێکخستنەکانی Starship بکات.
|
||||
|
||||
**تێبینی** - بنەڕەتییەکانی سکریپتی دامەزراندن ئەتوانرێ بگۆڕدرێ سەیری یارمەتی نێوخۆیی بکە.
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,9 +68,36 @@ function 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-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`
|
||||
- `italic`
|
||||
@ -82,14 +109,14 @@ Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben kein
|
||||
- `<color>`
|
||||
- `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`).
|
||||
- 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).
|
||||
|
||||
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"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -111,7 +103,23 @@
|
||||
><img
|
||||
height="20"
|
||||
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>
|
||||
</p>
|
||||
|
||||
@ -160,8 +168,8 @@
|
||||
```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.
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: Bajo una licencia ISC | Derechos de autor © 2019-presente Colaboradores de Starship
|
||||
#Used for the description meta tag, for SEO
|
||||
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">
|
||||
@ -143,7 +143,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
||||
|
||||
#### 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
|
||||
startup = [
|
||||
@ -157,7 +157,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
Añade lo siguiente al final de `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
@ -21,7 +21,7 @@ function blastoff(){
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). 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
|
||||
function blastoff(){
|
||||
@ -33,7 +33,7 @@ eval $(starship init bash)
|
||||
|
||||
## 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):
|
||||
|
||||
@ -57,7 +57,7 @@ En `zsh`, añade esto al array `precmd_functions`:
|
||||
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`:
|
||||
|
||||
@ -68,7 +68,34 @@ function 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:
|
||||
|
||||
@ -82,9 +109,9 @@ Las cadenas de estilo son una lista de palabras, separadas por espacios en blanc
|
||||
- `<color>`
|
||||
- `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:
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -103,7 +71,31 @@
|
||||
><img
|
||||
height="20"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```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).
|
||||
|
||||
@ -266,7 +274,7 @@
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
Añade lo siguiente al final de `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
@ -277,7 +285,7 @@
|
||||
|
||||
#### 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
|
||||
startup = [
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -363,11 +369,11 @@ symbol = "scala "
|
||||
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
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,9 +68,36 @@ function 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
|
||||
|
||||
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`
|
||||
- `italic`
|
||||
@ -82,14 +109,14 @@ Les chaînes de style sont une liste de mots, séparés par des espaces. Les mot
|
||||
- `<couleur>`
|
||||
- `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`).
|
||||
- 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).
|
||||
|
||||
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"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -95,7 +63,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Espagnol"
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```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.
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -3,22 +3,22 @@ home: true
|
||||
heroImage: /logo.svg
|
||||
heroText:
|
||||
tagline: Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!
|
||||
actionText: Mulai
|
||||
actionText: Mari Mulai →
|
||||
actionLink: ./guide/
|
||||
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!
|
||||
-
|
||||
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
|
||||
details: Semua detail kecil yang ada dapat kamu atur sesukamu, mungkin untuk membuat prompt yang seminimal mungkin atau kaya fitur seperti yang kamu inginkan.
|
||||
title: Dapat Dikustomisasi
|
||||
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
|
||||
#Used for the description meta tag, for SEO
|
||||
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">
|
||||
@ -30,7 +30,7 @@ description: Starship merupakan prompt yang minimal, super cepat, dan sangat bis
|
||||
|
||||
### 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
|
||||
|
||||
@ -44,7 +44,7 @@ description: Starship merupakan prompt yang minimal, super cepat, dan sangat bis
|
||||
```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
|
||||
@ -61,7 +61,7 @@ description: Starship merupakan prompt yang minimal, super cepat, dan sangat bis
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
1. Tambahkan skrip init ke file konfigurasi Shell:
|
||||
1. Tambahkan skrip init ke dalam file konfigurasi Shell:
|
||||
|
||||
|
||||
#### Bash
|
||||
@ -119,7 +119,7 @@ description: Starship merupakan prompt yang minimal, super cepat, dan sangat bis
|
||||
|
||||
#### 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`:
|
||||
|
||||
@ -143,7 +143,7 @@ description: Starship merupakan prompt yang minimal, super cepat, dan sangat bis
|
||||
|
||||
#### 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
|
||||
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:
|
||||
|
||||
@ -21,7 +21,7 @@ function 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
|
||||
function blastoff(){
|
||||
@ -33,7 +33,7 @@ eval $(starship init bash)
|
||||
|
||||
## 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):
|
||||
|
||||
@ -57,9 +57,9 @@ Dalam `zsh`, pada array `precmd_functions`, tambahkan:
|
||||
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
|
||||
function set_win_title(){
|
||||
@ -68,9 +68,36 @@ function 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
|
||||
|
||||
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`
|
||||
- `italic`
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```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.
|
||||
|
||||
@ -277,7 +285,7 @@
|
||||
|
||||
#### 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
|
||||
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
|
||||
prompt_order = [
|
||||
@ -31,7 +31,7 @@ prompt_order = [
|
||||
]
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
**Contoh konfigurasi v0.45.0**
|
||||
|
||||
```toml
|
||||
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
|
||||
[cmd_duration]
|
||||
prefix = "took "
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
**Contoh konfigurasi v0.45.0**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
@ -78,14 +78,14 @@ format = "took [$duration]($style) "
|
||||
|
||||
#### Karakter
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------------- | ---------------- |
|
||||
| Properti Yang Digantikan | Penggantinya |
|
||||
| ------------------------ | ---------------- |
|
||||
| `symbol` | `success_symbol` |
|
||||
| `use_symbol_for_status` | `error_symbol` |
|
||||
| `style_success` | `success_symbol` |
|
||||
| `style_failure` | `error_symbol` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Perubahan pada konfigurasi bawaan**
|
||||
|
||||
```diff
|
||||
[character]
|
||||
@ -98,26 +98,26 @@ format = "took [$duration]($style) "
|
||||
++ 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
|
||||
[character]
|
||||
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` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Perubahan pada konfigurasi bawaan**
|
||||
|
||||
```diff
|
||||
[cmd_duration]
|
||||
@ -125,13 +125,13 @@ error_symbol = "[✖](bold red)"
|
||||
++ format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
#### Directory
|
||||
#### Direktori
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| Properti Yang Digantikan | Penggantinya |
|
||||
| ------------------------ | ------------ |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Perubahan pada konfigurasi bawaan**
|
||||
|
||||
```diff
|
||||
[directory]
|
||||
@ -139,14 +139,14 @@ error_symbol = "[✖](bold red)"
|
||||
++ format = "[$path]($style)[$read_only]($read_only_style) "
|
||||
```
|
||||
|
||||
#### Environment Variable
|
||||
#### Variabel Environment
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| Properti Yang Digantikan | Penggantinya |
|
||||
| ------------------------ | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Perubahan pada konfigurasi bawaan**
|
||||
|
||||
```diff
|
||||
[env_var]
|
||||
@ -157,12 +157,12 @@ error_symbol = "[✖](bold red)"
|
||||
|
||||
#### Git Commit
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| Properti Yang Digantikan | Penggantinya |
|
||||
| ------------------------ | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Perubahan pada konfigurasi bawaan**
|
||||
|
||||
```diff
|
||||
[git_commit]
|
||||
@ -173,13 +173,13 @@ error_symbol = "[✖](bold red)"
|
||||
|
||||
#### Git Status
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------- | ----------- |
|
||||
| Properti Yang Digantikan | Penggantinya |
|
||||
| ------------------------ | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Perubahan pada konfigurasi bawaan**
|
||||
|
||||
```diff
|
||||
[git_status]
|
||||
@ -189,11 +189,11 @@ error_symbol = "[✖](bold red)"
|
||||
++ 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
|
||||
[git_status]
|
||||
@ -204,12 +204,12 @@ behind = "⇣${count}"
|
||||
|
||||
#### Hostname
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| Properti Yang Digantikan | Penggantinya |
|
||||
| ------------------------ | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Perubahan pada konfigurasi bawaan**
|
||||
|
||||
```diff
|
||||
[hostname]
|
||||
@ -220,13 +220,13 @@ behind = "⇣${count}"
|
||||
|
||||
#### Singularity
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| Properti Yang Digantikan | Penggantinya |
|
||||
| ------------------------ | ------------ |
|
||||
| `label` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Perubahan pada konfigurasi bawaan**
|
||||
|
||||
```diff
|
||||
[singularity]
|
||||
@ -235,13 +235,13 @@ behind = "⇣${count}"
|
||||
++ format = '[$symbol\[$env\]]($style) '
|
||||
```
|
||||
|
||||
#### Time
|
||||
#### Waktu
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ------------- |
|
||||
| Properti Yang Digantikan | Penggantinya |
|
||||
| ------------------------ | ------------- |
|
||||
| `format` | `time_format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Perubahan pada konfigurasi bawaan**
|
||||
|
||||
```diff
|
||||
[time]
|
||||
@ -252,12 +252,12 @@ behind = "⇣${count}"
|
||||
|
||||
#### Custom Commands
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| Properti Yang Digantikan | Penggantinya |
|
||||
| ------------------------ | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Perubahan pada konfigurasi bawaan**
|
||||
|
||||
```diff
|
||||
[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
|
||||
|
||||
- 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
|
||||
|
||||
@ -88,17 +88,17 @@ 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
|
||||
|
||||
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -239,17 +242,17 @@ 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
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -363,11 +369,11 @@ symbol = "scala "
|
||||
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
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: Licenza ISC | Copyright © 2019-present Starship Collaboratori
|
||||
#Used for the description meta tag, for SEO
|
||||
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">
|
||||
@ -143,7 +143,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
||||
|
||||
#### 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
|
||||
startup = [
|
||||
@ -157,7 +157,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
Aggiungi quanto segue alla fine di `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
@ -68,9 +68,36 @@ function 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`
|
||||
- `italic`
|
||||
@ -82,14 +109,14 @@ Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le par
|
||||
- `<color>`
|
||||
- `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`).
|
||||
- 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).
|
||||
|
||||
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"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -111,7 +103,23 @@
|
||||
><img
|
||||
height="20"
|
||||
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>
|
||||
</p>
|
||||
|
||||
@ -160,8 +168,8 @@
|
||||
```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.
|
||||
|
||||
@ -266,7 +274,7 @@
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
Aggiungi quanto segue alla fine di `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
@ -277,7 +285,7 @@
|
||||
|
||||
#### 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
|
||||
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. Tell your shell to use the starship binary as its prompt by modifying its init scripts
|
||||
1. Ottieni il binario **starship** sul tuo computer
|
||||
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)
|
||||
|
||||
### 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
|
||||
choco install starship
|
||||
@ -29,7 +29,7 @@ choco install starship
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
### Installazione
|
||||
|
||||
```sh
|
||||
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)
|
||||
|
||||
### Getting the Binary
|
||||
### Ottenere il Binario
|
||||
|
||||
#### Imperatively
|
||||
#### Imperativo
|
||||
|
||||
```sh
|
||||
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
|
||||
{
|
||||
@ -69,15 +69,15 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
poi eseguire
|
||||
|
||||
```sh
|
||||
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
|
||||
sudo nixos-rebuild switch
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,9 +68,36 @@ function 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`
|
||||
- `italic`
|
||||
@ -82,14 +109,14 @@ starship_precmd_user_func="set_win_title"
|
||||
- `<color>`
|
||||
- `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` )
|
||||
- `#` に続く16進数。 [RGB の16進数カラーコード](https://www.w3schools.com/colors/colors_hexadecimal.asp)を表します。
|
||||
- 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"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
Starship自体を更新するには、上記のスクリプトを再度実行してください。 最新のバージョンに置き換わり、設定ファイルには変更を加えません。
|
||||
|
||||
Starship自体を更新するには、上記のスクリプトを再度実行してください。 最新のバージョンに置き換わり、設定ファイルには変更を加えません。
|
||||
|
||||
**※**インストールスクリプトのデフォルト値は上書きすることができます。詳しくはヘルプを参照してください。
|
||||
|
||||
@ -266,7 +274,7 @@
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
`~/.xonshrc` の最後に以下を追加してください:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
@ -277,7 +285,7 @@
|
||||
|
||||
#### 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
|
||||
startup = [
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,6 +68,33 @@ function 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 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.
|
||||
|
||||
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:
|
||||
|
||||
@ -143,12 +143,14 @@ This is the list of prompt-wide configuration options.
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
@ -179,6 +181,7 @@ format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$directory\
|
||||
$vcsh\
|
||||
@ -191,6 +194,7 @@ $hg_branch\
|
||||
$docker_context\
|
||||
$package\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
@ -202,6 +206,7 @@ $helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$lua\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
@ -209,6 +214,7 @@ $perl\
|
||||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
@ -229,7 +235,6 @@ $crystal\
|
||||
$custom\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$lua\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
@ -238,6 +243,13 @@ $shell\
|
||||
$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
|
||||
|
||||
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
|
||||
|
||||
## 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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
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`)
|
||||
|
||||
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.
|
||||
@ -1206,10 +1277,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
||||
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||
| `added_style` | `"bold green"` | The style for the added 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. |
|
||||
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||
|
||||
### Variables
|
||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_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.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.
|
||||
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` 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.
|
||||
|
||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
|
||||
## 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 `.Rd` extension.
|
||||
@ -2539,7 +2611,7 @@ disabled = false
|
||||
|
||||
## 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
|
||||
|
||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
||||
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 `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
|
||||
# ~/.config/starship.toml
|
||||
[v]
|
||||
[vlang]
|
||||
format = "via [V $version](blue bold) "
|
||||
```
|
||||
|
||||
|
@ -48,30 +48,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```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.
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,6 +68,33 @@ function 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 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.
|
||||
|
||||
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:
|
||||
|
||||
@ -143,12 +143,14 @@ This is the list of prompt-wide configuration options.
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
@ -179,6 +181,7 @@ format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$directory\
|
||||
$vcsh\
|
||||
@ -191,6 +194,7 @@ $hg_branch\
|
||||
$docker_context\
|
||||
$package\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
@ -202,6 +206,7 @@ $helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$lua\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
@ -209,6 +214,7 @@ $perl\
|
||||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
@ -229,7 +235,6 @@ $crystal\
|
||||
$custom\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$lua\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
@ -238,6 +243,13 @@ $shell\
|
||||
$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
|
||||
|
||||
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
|
||||
|
||||
## 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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
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`)
|
||||
|
||||
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.
|
||||
@ -1206,10 +1277,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
||||
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||
| `added_style` | `"bold green"` | The style for the added 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. |
|
||||
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||
|
||||
### Variables
|
||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_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.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.
|
||||
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` 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.
|
||||
|
||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
|
||||
## 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 `.Rd` extension.
|
||||
@ -2539,7 +2611,7 @@ disabled = false
|
||||
|
||||
## 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
|
||||
|
||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
||||
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 `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
|
||||
# ~/.config/starship.toml
|
||||
[v]
|
||||
[vlang]
|
||||
format = "via [V $version](blue bold) "
|
||||
```
|
||||
|
||||
|
@ -46,30 +46,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -78,14 +54,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -102,6 +70,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -111,6 +103,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -145,7 +153,7 @@
|
||||
|
||||
### 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:
|
||||
|
||||
@ -158,8 +166,8 @@
|
||||
```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.
|
||||
|
||||
@ -275,7 +283,7 @@
|
||||
|
||||
#### 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
|
||||
startup = [
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -2,18 +2,18 @@
|
||||
home: true
|
||||
heroImage: /logo.svg
|
||||
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 →
|
||||
actionLink: ./guide/
|
||||
features:
|
||||
-
|
||||
title: Compatibility First
|
||||
title: Kompatybilność przede wszystkim
|
||||
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.
|
||||
-
|
||||
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.
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
@ -28,26 +28,26 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
</video>
|
||||
</div>
|
||||
|
||||
### Prerequisites
|
||||
### Wymagania wstępne
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Install the **starship** binary:
|
||||
1. Zainstaluj plik programu **starship**:
|
||||
|
||||
|
||||
#### Install Latest Version
|
||||
#### Instalacja najnowszej wersji
|
||||
|
||||
With Shell:
|
||||
|
||||
```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/):
|
||||
|
||||
@ -55,18 +55,18 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
brew install starship
|
||||
```
|
||||
|
||||
With [Scoop](https://scoop.sh):
|
||||
Za pomocą [Scoop](https://scoop.sh):
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
1. Add the init script to your shell's config file:
|
||||
1. Dodaj skrypt inicjalizacyjny do konfiguracji twojej powłoki:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
Dodaj na koniec pliku `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
@ -77,7 +77,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Fish
|
||||
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
Dodaj na koniec pliku `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
@ -88,7 +88,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Zsh
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
Dodaj na koniec pliku `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
@ -99,7 +99,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### 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
|
||||
Invoke-Expression (&starship init powershell)
|
||||
@ -108,7 +108,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Ion
|
||||
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
Dodaj na koniec pliku `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
# ~/.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. :::
|
||||
|
||||
Add the following to the end of `~/.elvish/rc.elv`:
|
||||
Dodaj na koniec pliku `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
@ -132,7 +132,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
Dodaj na koniec pliku `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.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
|
||||
|
||||
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"
|
||||
```
|
||||
|
||||
## 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 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`.
|
||||
|
||||
@ -6,7 +6,7 @@ To get started configuring starship, create the following file: `~/.config/stars
|
||||
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
|
||||
# Inserts a blank line between shell prompts
|
||||
@ -21,63 +21,63 @@ success_symbol = "[➜](bold green)" # The "success_symbol" segment is being
|
||||
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
|
||||
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
|
||||
$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
|
||||
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
|
||||
$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`.
|
||||
- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`.
|
||||
- `$git_branch $git_commit` has the two variables separated with a space.
|
||||
- `$version` to ciąg formatujący ze zmienną o nazwie `version`.
|
||||
- `$git_branch$git_commit` zawiera dwie zmienne: `git_branch` i `git_commit`.
|
||||
- `$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.
|
||||
- `[⌘ $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.
|
||||
|
||||
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.
|
||||
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
|
||||
@ -143,12 +143,14 @@ This is the list of prompt-wide configuration options.
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
@ -179,6 +181,7 @@ format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$directory\
|
||||
$vcsh\
|
||||
@ -191,6 +194,7 @@ $hg_branch\
|
||||
$docker_context\
|
||||
$package\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
@ -202,6 +206,7 @@ $helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$lua\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
@ -209,6 +214,7 @@ $perl\
|
||||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
@ -229,7 +235,6 @@ $crystal\
|
||||
$custom\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$lua\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
@ -238,6 +243,13 @@ $shell\
|
||||
$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
|
||||
|
||||
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
|
||||
|
||||
## 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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
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`)
|
||||
|
||||
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.
|
||||
@ -1206,10 +1277,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
||||
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||
| `added_style` | `"bold green"` | The style for the added 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. |
|
||||
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||
|
||||
### Variables
|
||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_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.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.
|
||||
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` 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.
|
||||
|
||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
|
||||
## 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 `.Rd` extension.
|
||||
@ -2539,7 +2611,7 @@ disabled = false
|
||||
|
||||
## 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
|
||||
|
||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
||||
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 `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
|
||||
# ~/.config/starship.toml
|
||||
[v]
|
||||
[vlang]
|
||||
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/)
|
||||
- **Theme**: Minimal
|
||||
- **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||
- **Shell**: [Fish Shell](https://fishshell.com/)
|
||||
- **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **Prompt**: [Starship](https://starship.rs/)
|
||||
- **Emulator terminala**: [iTerm2](https://iterm2.com/)
|
||||
- **Motyw**: Minimal
|
||||
- **Schemat kolorów**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **Czcionka**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||
- **Powłoka**: [Fish Shell](https://fishshell.com/)
|
||||
- **Konfiguracja**: [Pliki Dotfile użytkownika matchai](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **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?
|
||||
|
||||
@ -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`
|
||||
- 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.
|
||||
|
||||
@ -48,17 +48,17 @@ starship prompt --help
|
||||
|
||||
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 -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?
|
||||
|
||||
@ -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)
|
||||
|
||||
## 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. Delete the Starship binary.
|
||||
1. Usuń zawartość konfiguracji powłoki (np. `~/.bashrc`) służącą do zainicjalizowania Starship.
|
||||
1. Usuń plik wykonywalny programu Starship.
|
||||
|
||||
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"
|
||||
><img
|
||||
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 href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version"
|
||||
alt="Wersja na crates.io"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
alt="Packaging status" /></a
|
||||
alt="Status pakietów" /></a
|
||||
><br />
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Chat on Discord"
|
||||
alt="Porozmawiaj na Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
alt="Śledź @StarshipPrompt na Twitterze"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<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 align="center">
|
||||
@ -48,30 +48,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,85 +105,101 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
|
||||
<img
|
||||
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%"
|
||||
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! 🚀
|
||||
- **Customizable:** configure every aspect of your prompt.
|
||||
- **Universal:** works on any shell, on any operating system.
|
||||
- **Intelligent:** shows relevant information at a glance.
|
||||
- **Feature rich:** support for all your favorite tools.
|
||||
- **Easy:** quick to install – start using it in minutes.
|
||||
- **Szybkość:** jest szybki - _naprawdę_ szybki! 🚀
|
||||
- **Konfigurowalny:** dostosowuj swój wiersz poleceń w każdym aspekcie.
|
||||
- **Uniwersalny:** działa na każdej powłoce, na każdym systemie operacyjnym.
|
||||
- **Inteligentny:** pokazuje istotne informacje na pierwszy rzut oka.
|
||||
- **Bogata funkcjonalność:** wspiera wszystkie twoje ulubione narzędzia.
|
||||
- **Łatwy w obsłudze:** szybka instalacja - zacznij korzystać w kilka minut.
|
||||
|
||||
<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>
|
||||
|
||||
<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 -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 -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
|
||||
brew install starship
|
||||
```
|
||||
|
||||
|
||||
##### With [Scoop](https://scoop.sh):
|
||||
##### Za pomocą [Scoop](https://scoop.sh):
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
2. Add the init script to your shell's config file:
|
||||
2. Dodaj skrypt inicjalizacyjny do konfiguracji twojej powłoki:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
Dodaj na koniec pliku `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
@ -202,7 +210,7 @@
|
||||
|
||||
#### Fish
|
||||
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
Dodaj na koniec pliku `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
@ -213,7 +221,7 @@
|
||||
|
||||
#### Zsh
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
Dodaj na koniec pliku `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
@ -224,7 +232,7 @@
|
||||
|
||||
#### 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
|
||||
Invoke-Expression (&starship init powershell)
|
||||
@ -233,7 +241,7 @@
|
||||
|
||||
#### Ion
|
||||
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
Dodaj na koniec pliku `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
@ -244,7 +252,7 @@
|
||||
|
||||
#### 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
|
||||
# ~/.elvish/rc.elv
|
||||
@ -255,7 +263,7 @@
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
Dodaj na koniec pliku `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
@ -266,7 +274,7 @@
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
Dodaj na koniec pliku `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
@ -277,7 +285,7 @@
|
||||
|
||||
#### 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
|
||||
startup = [
|
||||
@ -288,30 +296,30 @@
|
||||
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>
|
||||
|
||||
### 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>
|
||||
|
||||
#### 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/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/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">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
</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.
|
||||
|
@ -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. Tell your shell to use the starship binary as its prompt by modifying its init scripts
|
||||
1. Pobrać plik wykonywalny **starship** na swój komputer
|
||||
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!
|
||||
|
||||
## [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.
|
||||
|
||||
### Installation
|
||||
### Instalacja
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
@ -23,13 +23,13 @@ choco install starship
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisites
|
||||
### Wymagania wstępne
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
### Instalacja
|
||||
|
||||
```sh
|
||||
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.
|
||||
|
||||
|
@ -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)
|
||||
|
||||
### 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
|
||||
[aws]
|
||||
@ -88,19 +88,19 @@ 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)
|
||||
|
||||
After:
|
||||
Po:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuration
|
||||
### Konfiguracja
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -239,7 +242,7 @@ 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!
|
||||
|
||||
@ -251,7 +254,7 @@ After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuration
|
||||
### Konfiguracja
|
||||
|
||||
```toml
|
||||
[character]
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[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)
|
||||
|
||||
### Configuration
|
||||
### Konfiguracja
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,9 +68,36 @@ function 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 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`
|
||||
- `italic`
|
||||
@ -82,14 +109,14 @@ Estilo de strings são uma lista de palavras, separadas por espaço. As palavras
|
||||
- `<color>`
|
||||
- `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 `#` 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).
|
||||
|
||||
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"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```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.
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ Está predefinição oculta a versão do runtime da linguagem. Se você trabalha
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,6 +68,33 @@ function 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 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.
|
||||
|
||||
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:
|
||||
|
||||
@ -143,12 +143,14 @@ This is the list of prompt-wide configuration options.
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
@ -179,6 +181,7 @@ format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$directory\
|
||||
$vcsh\
|
||||
@ -191,6 +194,7 @@ $hg_branch\
|
||||
$docker_context\
|
||||
$package\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
@ -202,6 +206,7 @@ $helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$lua\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
@ -209,6 +214,7 @@ $perl\
|
||||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
@ -229,7 +235,6 @@ $crystal\
|
||||
$custom\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$lua\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
@ -238,6 +243,13 @@ $shell\
|
||||
$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
|
||||
|
||||
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
|
||||
|
||||
## 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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
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`)
|
||||
|
||||
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.
|
||||
@ -1206,10 +1277,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
||||
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||
| `added_style` | `"bold green"` | The style for the added 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. |
|
||||
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||
|
||||
### Variables
|
||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_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.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.
|
||||
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` 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.
|
||||
|
||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
|
||||
## 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 `.Rd` extension.
|
||||
@ -2539,7 +2611,7 @@ disabled = false
|
||||
|
||||
## 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
|
||||
|
||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
||||
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 `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
|
||||
# ~/.config/starship.toml
|
||||
[v]
|
||||
[vlang]
|
||||
format = "via [V $version](blue bold) "
|
||||
```
|
||||
|
||||
|
@ -48,30 +48,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```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.
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,9 +68,36 @@ function 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`
|
||||
- `italic`
|
||||
@ -82,14 +109,14 @@ starship_precmd_user_func="set_win_title"
|
||||
- `<color>`
|
||||
- `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`).
|
||||
- `#`, за которой следует шестизначное шестнадцатеричное число. Это определяет [шестнадцатеричный код цвета RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- Число от 0 до 255. Это определяет [8-битный код цвета ANSI](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
Если для переднего плана/фона задано несколько цветов, то последняя из строк будет иметь приоритет.
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
Для обновления Starship перезапустите этот скрипт. Он заменит текущую версию без изменения конфигурации.
|
||||
|
||||
Для обновления Starship перезапустите этот скрипт. Он заменит текущую версию без изменения конфигурации.
|
||||
|
||||
**Примечание** - Значения по умолчанию из установочного скрипта могут быть переопределены. Для уточнения смотрите встроенную справку.
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -67,6 +67,33 @@ function 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 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.
|
||||
|
||||
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:
|
||||
|
||||
@ -143,12 +143,14 @@ This is the list of prompt-wide configuration options.
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
@ -179,6 +181,7 @@ format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$directory\
|
||||
$vcsh\
|
||||
@ -191,6 +194,7 @@ $hg_branch\
|
||||
$docker_context\
|
||||
$package\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
@ -202,6 +206,7 @@ $helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$lua\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
@ -209,6 +214,7 @@ $perl\
|
||||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
@ -229,7 +235,6 @@ $crystal\
|
||||
$custom\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$lua\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
@ -238,6 +243,13 @@ $shell\
|
||||
$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
|
||||
|
||||
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
|
||||
|
||||
## 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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
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`)
|
||||
|
||||
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.
|
||||
@ -1206,10 +1277,11 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
||||
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||
| `added_style` | `"bold green"` | The style for the added 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. |
|
||||
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||
|
||||
### Variables
|
||||
@ -1318,9 +1390,9 @@ diverged = "⇕⇡${ahead_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.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.
|
||||
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**vlang**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` 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.
|
||||
|
||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
|
||||
## 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 `.Rd` extension.
|
||||
@ -2539,7 +2611,7 @@ disabled = false
|
||||
|
||||
## 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
|
||||
|
||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
||||
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 `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
|
||||
# ~/.config/starship.toml
|
||||
[v]
|
||||
[vlang]
|
||||
format = "via [V $version](blue bold) "
|
||||
```
|
||||
|
||||
|
@ -48,30 +48,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```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.
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,9 +68,36 @@ function 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
|
||||
|
||||
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`
|
||||
- `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>`
|
||||
- `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 `#` đượ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).
|
||||
|
||||
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"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -79,15 +55,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Tiếng Đức"
|
||||
/></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ể"
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -95,7 +63,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Tiếng Tây Ban Nha"
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -103,7 +71,31 @@
|
||||
><img
|
||||
height="20"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```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 đè.
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,9 +68,36 @@ function 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`
|
||||
- `italic`
|
||||
@ -82,14 +109,14 @@ starship_precmd_user_func="set_win_title"
|
||||
- `<color>`
|
||||
- `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`)。
|
||||
- 一个 `#` 后跟一个六位十六进制数。 这将指定一个 [十六进制 RGB 颜色代码](https://www.w3schools.com/colors/colors_hexadecimal.asp)。
|
||||
- 0-255 之间的数字。 这将指定一个 [8 位 ANSI 颜色码](https://i.stack.imgur.com/KTSQa.png)。
|
||||
|
||||
如果为文本/背景指定了多个颜色,字符串中最后指定的颜色将具有最高优先级。
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -48,30 +48,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```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.
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
@ -68,9 +68,36 @@ function 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`
|
||||
- `斜體字`
|
||||
@ -82,14 +109,14 @@ starship_precmd_user_func="set_win_title"
|
||||
- `<color>`
|
||||
- `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`)。
|
||||
- 一個 `#` 後面跟隨著六位數的十六進位數字。 這個指定了 [RGB 十六進制色碼](https://www.w3schools.com/colors/colors_hexadecimal.asp)。
|
||||
- 一個介於 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.
|
||||
|
@ -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.
|
||||
|
||||
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:
|
||||
|
||||
@ -143,12 +143,14 @@ format = '''
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------------- | ---------------------------- | ------------------------------------------------------------ |
|
||||
| ----------------- | ---------------------------- | ---------------------------------------------------------------- |
|
||||
| `format` | [連結](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
|
||||
### 範例
|
||||
|
||||
```toml
|
||||
@ -179,6 +181,7 @@ format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$directory\
|
||||
$vcsh\
|
||||
@ -191,6 +194,7 @@ $hg_branch\
|
||||
$docker_context\
|
||||
$package\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
@ -202,6 +206,7 @@ $helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$lua\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
@ -209,6 +214,7 @@ $perl\
|
||||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
@ -229,7 +235,6 @@ $crystal\
|
||||
$custom\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$lua\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
@ -238,9 +243,16 @@ $shell\
|
||||
$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` 模組顯示現在 AWS 的區域與概況。 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。 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.
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var.
|
||||
|
||||
@ -314,7 +326,7 @@ symbol = "🅰 "
|
||||
|
||||
## 電池
|
||||
|
||||
`battery` 模組顯示電池的電量以及現在的充電狀態。 這個模組只會在裝置的電量低於 10% 的時候看見。
|
||||
The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -342,7 +354,7 @@ discharging_symbol = "💀 "
|
||||
|
||||
### 電池顯示
|
||||
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果沒有提供 `display`。 預設如下:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. 預設如下:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
@ -354,7 +366,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
|
||||
|
||||
#### 選項
|
||||
|
||||
`display` 選項是一個下列表格的陣列。
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
@ -381,9 +393,9 @@ discharging_symbol = 💦
|
||||
|
||||
## 字元
|
||||
|
||||
`character` 模組在你的文字輸入處旁顯示一個字元 (通常是箭頭)。
|
||||
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
|
||||
|
||||
這個字元會告訴你最後的指令是成功還是失敗。 It can do this in two ways:
|
||||
The character will tell you whether the last command was successful or not. It can do this in two ways:
|
||||
|
||||
- changing color (`red`/`green`)
|
||||
- changing shape (`❯`/`✖`)
|
||||
@ -479,27 +491,57 @@ 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
|
||||
|
||||
## 指令持續時間
|
||||
## COBOL / GNUCOBOL
|
||||
|
||||
`cmd_duration` 模組顯示最後一個指令執行所花費的時間。 這個模組只會在指令花費超過兩秒或是有設定 `min_time` 時,超過設定值時出現。
|
||||
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:
|
||||
|
||||
::: warning 不要在 Bash 中設置 DEBUG trap
|
||||
|
||||
如果你在 `bash` 中使用 Starship,不要在執行 `eval $(starship init $0)` 之後設置 `DEBUG` trap,不然這個模組**會**壞掉。
|
||||
|
||||
:::
|
||||
|
||||
想使用類似 preexec 功能的 Bash 使用者可以 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只要在 `eval $(starship init $0)` 之前簡單地定義 `preexec_functions` 與 `precmd_functions` 兩個陣列,然後就可以照常進行。
|
||||
- The current directory contains any files ending in `.cob` or `.COB`
|
||||
- The current directory contains any files ending in `.cbl` or `.CBL`
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | ----------------------------- | ----------------------------------------------------- |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `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"` | 這個模組的風格。 |
|
||||
| `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
|
||||
|
||||
| 變數 | 範例 | 說明 |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| 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
|
||||
|
||||
## 指令持續時間
|
||||
|
||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||
|
||||
::: warning Do not hook the DEBUG trap in Bash
|
||||
|
||||
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
|
||||
|
||||
:::
|
||||
|
||||
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
|
||||
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
|
||||
| `show_milliseconds` | `false` | 顯示時間除了以秒為單位外,亦以毫秒顯示 |
|
||||
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
|
||||
| `format` | `"took [$duration]($style) "` | The format for the module. |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `cmd_duration` 模組。 |
|
||||
| `disabled` | `false` | Disables the `cmd_duration` module. |
|
||||
| `show_notifications` | `false` | Show desktop notifications when command completes. |
|
||||
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
|
||||
|
||||
@ -530,7 +572,7 @@ format = "underwent [$duration](bold yellow)"
|
||||
|
||||
## Conda
|
||||
|
||||
如果有設定 `$CONDA_DEFAULT_ENV` 時,`conda` 模組顯示現在 conda 的環境。
|
||||
The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -541,13 +583,13 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
||||
| `truncation_length` | `1` | 如果環境變數由所`conda create -p [path]`產生時,環境變數的資料夾需要截斷的數目。 `0` 表示不截斷 也請參考 [`directory`](#directory)模組 |
|
||||
| `symbol` | `"🅒 "` | 環境名稱前使用的符號。 |
|
||||
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. |
|
||||
| `symbol` | `"🅒 "` | The symbol used before the environment name. |
|
||||
| `style` | `"bold green"` | 這個模組的風格。 |
|
||||
| `format` | `"via [$symbol$environment]($style) "` | The format for the module. |
|
||||
| `ignore_base` | `true` | Ignores `base` environment when activated. |
|
||||
| `disabled` | `false` | 停用 `conda` 模組。 |
|
||||
| `disabled` | `false` | Disables the `conda` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -572,8 +614,8 @@ format = "[$symbol$environment](dimmed green) "
|
||||
|
||||
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 現在資料夾中含有一個 `shard.yml` 檔案
|
||||
- 現在資料夾中含有一個`.cr`檔案
|
||||
- The current directory contains a `shard.yml` file
|
||||
- The current directory contains a `.cr` file
|
||||
|
||||
### 選項
|
||||
|
||||
@ -613,7 +655,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
|
||||
|
||||
- The current directory contains a file with `.dart` extension
|
||||
- The current directory contains a `.dart_tool` directory
|
||||
- 現在資料夾中包含一個 `pubspec.yaml`、`pubspec.yml` 或 `pubspec.lock` 檔案
|
||||
- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file
|
||||
|
||||
### 選項
|
||||
|
||||
@ -684,33 +726,33 @@ format = "via [🦕 $version](green bold) "
|
||||
|
||||
## 資料夾
|
||||
|
||||
`directory` 模組顯示到現在資料夾的路徑,並裁減到前三層資料夾。 你的資料夾也會被裁減到你所在的 git 儲存庫的根目錄。
|
||||
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
|
||||
|
||||
如果正在使用 fish 風格的 pwd 選項,將不會隱藏被裁減的資料夾,而是會根據你在選項中設定的數字看到每一層資料夾的縮寫。
|
||||
When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
|
||||
|
||||
例如,給定一個右列的路徑 `~/Dev/Nix/nixpkgs/pkgs` 其中 `nixpkgs` 是儲存庫的根目錄,而且該選項被設定為 `1`。 你會看到 `~/D/N/nixpkgs/pkgs`,而在這個設定之前則是 `nixpkgs/pkgs`。
|
||||
For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------------- | -------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 |
|
||||
| `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 |
|
||||
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
|
||||
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
|
||||
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. |
|
||||
| `style` | `"bold cyan"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `directory` 模組。 |
|
||||
| `disabled` | `false` | Disables the `directory` module. |
|
||||
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
|
||||
| `read_only_style` | `"red"` | The style for the read only symbol. |
|
||||
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
|
||||
| `home_symbol` | `"~"` | The symbol indicating home directory. |
|
||||
|
||||
<details>
|
||||
<summary>這個模組有些進階設定選項可以控制顯示資料夾。</summary>
|
||||
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
|
||||
|
||||
| Advanced Option | 預設 | 說明 |
|
||||
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | 當使用 fish shell 的 pwd 路徑邏輯時使用的字元數量。 |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD.
|
||||
@ -782,7 +824,7 @@ format = "via [🐋 $context](blue bold)"
|
||||
|
||||
## Dotnet
|
||||
|
||||
The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 如果這個資料夾已經選定一個 SDK,則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。
|
||||
The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
|
||||
|
||||
By default this module will only be shown in your prompt when one or more of the following files are present in the current directory:
|
||||
|
||||
@ -797,7 +839,7 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
|
||||
You'll also need the .NET Core SDK installed in order to use it correctly.
|
||||
|
||||
這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。
|
||||
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
|
||||
|
||||
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
|
||||
|
||||
@ -807,13 +849,13 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | 在顯示 dotnet 版本之前用的符號。 |
|
||||
| `heuristic` | `true` | 使用更快速的版本偵測法來保持 starship 的速度。 |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `dotnet` 模組。 |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -841,7 +883,7 @@ heuristic = false
|
||||
|
||||
The `elixir` module shows the currently installed version of [Elixir](https://elixir-lang.org/) and [Erlang/OTP](https://erlang.org/doc/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 現在資料夾中包含一個 `mix.exs` 檔案.
|
||||
- The current directory contains a `mix.exs` file.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -880,8 +922,8 @@ symbol = "🔮 "
|
||||
|
||||
The `elm` module shows the currently installed version of [Elm](https://elm-lang.org/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 現在資料夾中包含一個 `elm.json` 檔案
|
||||
- 現在資料夾中包含一個 `elm-package.json` 檔案
|
||||
- The current directory contains a `elm.json` file
|
||||
- The current directory contains a `elm-package.json` file
|
||||
- The current directory contains a `.elm-version` file
|
||||
- The current directory contains a `elm-stuff` folder
|
||||
- The current directory contains a `*.elm` files
|
||||
@ -920,10 +962,10 @@ format = "via [ $version](cyan bold) "
|
||||
|
||||
## 環境變數
|
||||
|
||||
The `env_var` module displays the current value of a selected environment variables. 這個模組只在下列條件其中之一達到時顯示:
|
||||
The `env_var` module displays the current value of a selected environment variables. The module will be shown only if any of the following conditions are met:
|
||||
|
||||
- `variable` 設定選項符合一個存在的環境變數。
|
||||
- 沒有設定 `variable` 選項,但是有設定 `default` 選項。
|
||||
- The `variable` configuration option matches an existing environment variable
|
||||
- The `variable` configuration option is not defined, but the `default` configuration option is
|
||||
|
||||
|
||||
::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character.
|
||||
@ -940,12 +982,12 @@ default = "unknown user"
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | ------------------------------ | -------------------------- |
|
||||
| `symbol` | | 顯示在變數數值之前的符號。 |
|
||||
| `variable` | | 要顯示的環境變數。 |
|
||||
| `default` | | 在選擇的變數值沒有定義時,顯示的預設值。 |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `disabled` | `false` | 停用 `env_var` 模組。 |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -982,8 +1024,8 @@ default = "unknown user"
|
||||
|
||||
The `erlang` module shows the currently installed version of [Erlang/OTP](https://erlang.org/doc/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 現在資料夾中包含一個 `rebar.config` 檔案.
|
||||
- 現在資料夾中包含一個 `erlang.mk` 檔案.
|
||||
- The current directory contains a `rebar.config` file.
|
||||
- The current directory contains a `erlang.mk` file.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -1017,6 +1059,35 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
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.
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | 這個模組的風格。 |
|
||||
|
||||
### 範例
|
||||
|
||||
```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`)
|
||||
|
||||
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.
|
||||
@ -1078,22 +1149,22 @@ us-central1 = "uc1"
|
||||
asia-northeast1 = "an1"
|
||||
```
|
||||
|
||||
## Git 分支
|
||||
## Git Branch
|
||||
|
||||
`git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | -------------------------------- | ------------------------------------------------------------------------------------ |
|
||||
| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
|
||||
| `format` | `"on [$symbol$branch]($style) "` | The format for the module. Use `"$branch"` to refer to the current branch name. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of git branch. |
|
||||
| `style` | `"bold purple"` | 這個模組的風格。 |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. |
|
||||
| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 You can use `""` for no symbol. |
|
||||
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. |
|
||||
| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. |
|
||||
| `disabled` | `false` | 停用 `git_branch` 模組。 |
|
||||
| `disabled` | `false` | Disables the `git_branch` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1155,7 +1226,7 @@ tag_symbol = "🔖 "
|
||||
|
||||
## Git State
|
||||
|
||||
`git_state` 模組會顯示在 git 儲存庫中的資料夾內,以及會在有作業正在進行時顯示,像是:_REBASING_、_BISECTING_ 等等。 如果有進展的資訊 (像是 REBASING 3/10),也會一併顯示出來。
|
||||
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -1170,7 +1241,7 @@ tag_symbol = "🔖 "
|
||||
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. |
|
||||
| `disabled` | `false` | 停用 `git_state` 模組。 |
|
||||
| `disabled` | `false` | Disables the `git_state` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1199,17 +1270,18 @@ The `git_metrics` module will show the number of added and deleted lines in the
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
||||
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
||||
| `added_style` | `"bold green"` | The style for the added 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. |
|
||||
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||
|
||||
### Variables
|
||||
@ -1235,14 +1307,14 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
## Git Status
|
||||
|
||||
`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------ | ----------------------------------------------- | ----------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `"="` | 這個分支有合併衝突。 |
|
||||
| `conflicted` | `"="` | This branch has merge conflicts. |
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
@ -1254,7 +1326,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `git_status` 模組。 |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1318,18 +1390,18 @@ diverged = "⇕⇡${ahead_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:
|
||||
|
||||
- 現在資料夾中含有一個 `go.mod` 檔案
|
||||
- 現在資料夾中含有一個 `go.sum` 檔案
|
||||
- 現在資料夾中含有一個 `glide.yaml` 檔案
|
||||
- 現在資料夾中含有一個 `Gopkg.yml` 檔案
|
||||
- 現在資料夾中含有一個 `Gopkg.lock` 檔案
|
||||
- The current directory contains a `go.mod` file
|
||||
- The current directory contains a `go.sum` file
|
||||
- The current directory contains a `glide.yaml` file
|
||||
- The current directory contains a `Gopkg.yml` file
|
||||
- The current directory contains a `Gopkg.lock` file
|
||||
- The current directory contains a `.go-version` file
|
||||
- 現在資料夾中含有一個 `Godeps` 資料夾
|
||||
- 現在資料夾中含有一個檔案具有 `.go` 副檔名
|
||||
- The current directory contains a `Godeps` directory
|
||||
- The current directory contains a file with the `.go` extension
|
||||
|
||||
### 選項
|
||||
|
||||
@ -1342,7 +1414,7 @@ The `golang` module shows the currently installed version of [Golang](https://go
|
||||
| `detect_files` | `["go.mod", "go.sum", "glide.yaml", "Gopkg.yml", "Gopkg.lock", ".go-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["Godeps"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold cyan"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `golang` 模組。 |
|
||||
| `disabled` | `false` | Disables the `golang` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1367,7 +1439,7 @@ format = "via [🏎💨 $version](bold cyan) "
|
||||
|
||||
The `helm` module shows the currently installed version of [Helm](https://helm.sh/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 現在資料夾中包含一個 `helmfile.yaml` 檔案
|
||||
- The current directory contains a `helmfile.yaml` file
|
||||
- The current directory contains a `Chart.yaml` file
|
||||
|
||||
### 選項
|
||||
@ -1404,17 +1476,17 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## 主機名稱
|
||||
|
||||
`hostname` 模組顯示系統的主機名稱。
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | --------------------------- | ---------------------------------------------------------- |
|
||||
| `ssh_only` | `true` | 只在連接到一個 SSH session 時顯示主機名稱。 |
|
||||
| `trim_at` | `"."` | 擷取出主機名稱的斷點,以第一個符合的為準。 `"."` 會讓它停在第一個點的符號。 `""` 會停用任何的截斷功能。 |
|
||||
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
|
||||
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
|
||||
| `format` | `"[$hostname]($style) in "` | The format for the module. |
|
||||
| `style` | `"bold dimmed green"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `hostname` 模組。 |
|
||||
| `disabled` | `false` | Disables the `hostname` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1455,7 +1527,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `java` 模組。 |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1476,9 +1548,9 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
## 工作
|
||||
## Jobs
|
||||
|
||||
`jobs` 模組顯示現在正在執行中的工作。 這個模組只會在有背景工作正在執行時顯示。 The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running.
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running.
|
||||
|
||||
The default functionality is:
|
||||
|
||||
@ -1502,13 +1574,13 @@ The `threshold` option is deprecated, but if you want to use it, the module will
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
|
||||
| `threshold`\* | `1` | 在超過指定值時顯示工作數量。 |
|
||||
| `threshold`\* | `1` | Show number of jobs if exceeded. |
|
||||
| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. |
|
||||
| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. |
|
||||
| `format` | `"[$symbol$number]($style) "` | The format for the module. |
|
||||
| `symbol` | `"✦"` | The string used to represent the `symbol` variable. |
|
||||
| `style` | `"bold blue"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `jobs` 模組。 |
|
||||
| `disabled` | `false` | Disables the `jobs` module. |
|
||||
\*: This option is deprecated, please use the
|
||||
|
||||
`number_threshold` and `symbol_threshold` options instead.
|
||||
@ -1627,7 +1699,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1687,15 +1759,15 @@ Long and automatically generated cluster names can be identified and shortened u
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## 換行
|
||||
## Line Break
|
||||
|
||||
`line_break` 模組將提示字元分成兩行。
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ---------- | ------- | ----------------------------- |
|
||||
| `disabled` | `false` | 停用 `line_break` 模組,讓提示字元變成一行。 |
|
||||
| ---------- | ------- | ------------------------------------------------------------------ |
|
||||
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
|
||||
|
||||
### 範例
|
||||
|
||||
@ -1747,27 +1819,27 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = "via [🌕 $version](bold blue) "
|
||||
```
|
||||
|
||||
## 記憶體使用量
|
||||
## Memory Usage
|
||||
|
||||
`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------- | ----------------------------------------------- | -------------------------- |
|
||||
| `threshold` | `75` | 將記憶體使用量隱藏,除非使用量超過指定值。 |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | 顯示在記憶體使用量之前的符號。 |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | 這個模組的風格。 |
|
||||
| `disabled` | `true` | 停用 `memory_usage` 模組。 |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1806,7 +1878,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
|
||||
| `style` | `"bold purple"` | 這個模組的風格。 |
|
||||
| `format` | `"on [$symbol$branch]($style) "` | The format for the module. |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes |
|
||||
| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 |
|
||||
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
|
||||
| `disabled` | `true` | Disables the `hg_branch` module. |
|
||||
|
||||
### Variables
|
||||
@ -1834,7 +1906,7 @@ truncation_symbol = ""
|
||||
|
||||
The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 現在資料夾中含有一個 `nim.cfg` 檔案
|
||||
- The current directory contains a `nim.cfg` file
|
||||
- The current directory contains a file with the `.nim` extension
|
||||
- The current directory contains a file with the `.nims` extension
|
||||
- The current directory contains a file with the `.nimble` extension
|
||||
@ -1874,7 +1946,7 @@ symbol = "🎣 "
|
||||
|
||||
## Nix-shell
|
||||
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. 這個模組會在 nix-shell 環境中顯示。
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -1885,7 +1957,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
|
||||
| `style` | `"bold blue"` | 這個模組的風格。 |
|
||||
| `impure_msg` | `"impure"` | A format string shown when the shell is impure. |
|
||||
| `pure_msg` | `"pure"` | A format string shown when the shell is pure. |
|
||||
| `disabled` | `false` | 停用 `nix_shell` 模組。 |
|
||||
| `disabled` | `false` | Disables the `nix_shell` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1914,10 +1986,10 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
|
||||
The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 現在資料夾中包含一個 `package.json` 檔案
|
||||
- The current directory contains a `package.json` file
|
||||
- The current directory contains a `.node-version` file
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- 現在資料夾中包含一個 `node_modules` 資料夾
|
||||
- The current directory contains a `node_modules` directory
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
|
||||
@ -1932,7 +2004,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `nodejs` 模組。 |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
|
||||
|
||||
### Variables
|
||||
@ -2036,23 +2108,23 @@ style = "bold yellow"
|
||||
symbol = "☁️ "
|
||||
```
|
||||
|
||||
## 套件版本
|
||||
## Package Version
|
||||
|
||||
The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**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
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
|
||||
> ⚠️ 顯示出來的版本是從你的現在資料夾之中擷取出來的,並非從套件管理員取得。
|
||||
|
||||
@ -2061,11 +2133,11 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | 顯示在套件的版本之前的符號。 |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | 這個模組的風格。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | 停用 `package` 模組。 |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2130,7 +2202,7 @@ format = "via [🦪 $version]($style) "
|
||||
|
||||
The `php` module shows the currently installed version of [PHP](https://www.php.net/). By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 現在資料夾中含有一個 `composer.json` 檔案
|
||||
- The current directory contains a `composer.json` file
|
||||
- The current directory contains a `.php-version` file
|
||||
- The current directory contains a `.php` extension
|
||||
|
||||
@ -2170,7 +2242,7 @@ format = "via [🔹 $version](147 bold) "
|
||||
|
||||
The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 現在資料夾中含有一個 `spago.dhall` 檔案
|
||||
- The current directory contains a `spago.dhall` file
|
||||
- The current directory contains a file with the `.purs` extension
|
||||
|
||||
### 選項
|
||||
@ -2213,14 +2285,14 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 目前資料夾中有一個 `.python-version` 檔案
|
||||
- 目前資料夾中有一個 `Pipfile` 檔案
|
||||
- The current directory contains a `.python-version` file
|
||||
- The current directory contains a `Pipfile` file
|
||||
- The current directory contains a `__init__.py` file
|
||||
- 目前資料夾中有一個 `pyproject.toml` 檔案
|
||||
- 目前資料夾中有一個 `requirements.txt` 檔案
|
||||
- 現在資料夾中含有一個 `setup.py` 檔案
|
||||
- 目前資料夾中有一個 `tox.ini` 檔案
|
||||
- 目前資料夾中有一個 `.py` 副檔名的檔案.
|
||||
- The current directory contains a `pyproject.toml` file
|
||||
- The current directory contains a `requirements.txt` file
|
||||
- The current directory contains a `setup.py` file
|
||||
- The current directory contains a `tox.ini` file
|
||||
- The current directory contains a file with the `.py` extension.
|
||||
- A virtual environment is currently activated
|
||||
|
||||
### 選項
|
||||
@ -2231,13 +2303,13 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | 這個模組的風格。 |
|
||||
| `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | 停用 `python` 模組。 |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2296,7 +2368,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
|
||||
## 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 `.Rd` extension.
|
||||
@ -2338,7 +2410,7 @@ format = "with [📐 $version](blue bold) "
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 這個模組在下列其中一個條件達成時顯示:
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
@ -2376,11 +2448,11 @@ symbol = "🔴 "
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 這個模組在下列其中一個條件達成時顯示:
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 目前資料夾中有一個 `Gemfile` 檔案
|
||||
- The current directory contains a `Gemfile` file
|
||||
- The current directory contains a `.ruby-version` file
|
||||
- 目前資料夾中有一個 `.rb` 檔案
|
||||
- The current directory contains a `.rb` file
|
||||
|
||||
### 選項
|
||||
|
||||
@ -2393,7 +2465,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `ruby` 模組。 |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2416,10 +2488,10 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 這個模組在下列其中一個條件達成時顯示:
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 目前資料夾中有一個 `Cargo.toml` 檔案
|
||||
- 現在資料夾中包含一個檔案具有 `.rs` 副檔名
|
||||
- The current directory contains a `Cargo.toml` file
|
||||
- The current directory contains a file with the `.rs` extension
|
||||
|
||||
### 選項
|
||||
|
||||
@ -2432,7 +2504,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `rust` 模組。 |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2499,7 +2571,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2539,7 +2611,7 @@ disabled = false
|
||||
|
||||
## 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.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -2611,7 +2683,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2669,7 +2741,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 這個模組在下列其中一個條件達成時顯示:
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2767,33 +2839,33 @@ format = "[🏎💨 $workspace]($style) "
|
||||
|
||||
## 時間
|
||||
|
||||
`time` 模組顯示目前的**當地**時間. `format` 設定值被 [`chrono`](https://crates.io/crates/chrono) crate 用來控制時間如何顯示。 請看 [chrono 的 strftime 文件](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)來了解有那些選項可以使用。
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"at [$time]($style) "` | The format string for the module. |
|
||||
| `use_12hr` | `false` | 啟用 12 小時格式。 |
|
||||
| `time_format` | 請看下列 | 用來顯示時間的 [chrono 格式字串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)。 |
|
||||
| `style` | `"bold yellow"` | 這個模組的時間的風格。 |
|
||||
| `utc_time_offset` | `"local"` | 設定相對於 UTC 的時差。 Range from -24 < x < 24. 允許使用浮點數來表示 30/45 分鐘時差的時區。 |
|
||||
| `disabled` | `true` | 停用 `time` 模組。 |
|
||||
| `use_12hr` | `false` | Enables 12 hour formatting |
|
||||
| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
|
||||
| `style` | `"bold yellow"` | The style for the module time |
|
||||
| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
|
||||
| `disabled` | `true` | Disables the `time` module. |
|
||||
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
|
||||
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 不然的話,它會被預設為 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting.
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
|
||||
### Variables
|
||||
|
||||
| 變數 | 範例 | 說明 |
|
||||
| --------- | ---------- | ----------------------------------- |
|
||||
| 時間 | `13:08:10` | The current time. |
|
||||
| time | `13:08:10` | The current time. |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
@ -2811,14 +2883,14 @@ utc_time_offset = "-5"
|
||||
time_range = "10:00:00-14:00:00"
|
||||
```
|
||||
|
||||
## 使用者名稱
|
||||
## Username
|
||||
|
||||
`username` 模組顯示現在使用中的使用者名稱。 這個模組在下列其中一個條件達成時顯示:
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 目前使用者為 root
|
||||
- 目前使用者並非登入時的使用者
|
||||
- 使用者透過 SSH session 進行連線
|
||||
- 變數 `show_always` 被設為 true
|
||||
- The current user is root
|
||||
- The current user isn't the same as the one that is logged in
|
||||
- The user is currently connected as an SSH session
|
||||
- The variable `show_always` is set to true
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2829,12 +2901,12 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------- | ----------------------- | -------------------------- |
|
||||
| `style_root` | `"bold red"` | 使用者為 root 時使用的風格。 |
|
||||
| `style_user` | `"bold yellow"` | 非 root 使用者時使用的風格。 |
|
||||
| ------------- | ----------------------- | ------------------------------------- |
|
||||
| `style_root` | `"bold red"` | The style used when the user is root. |
|
||||
| `style_user` | `"bold yellow"` | The style used for non-root users. |
|
||||
| `format` | `"[$user]($style) in "` | The format for the module. |
|
||||
| `show_always` | `false` | 總是顯示 `username` 模組。 |
|
||||
| `disabled` | `false` | 停用 `username` 模組。 |
|
||||
| `show_always` | `false` | Always shows the `username` module. |
|
||||
| `disabled` | `false` | Disables the `username` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2894,9 +2966,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
||||
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 `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
|
||||
# ~/.config/starship.toml
|
||||
[v]
|
||||
[vlang]
|
||||
format = "via [V $version](blue bold) "
|
||||
```
|
||||
|
||||
@ -2963,7 +3035,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 這個模組在下列其中一個條件達成時顯示:
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
@ -3036,7 +3108,7 @@ The order in which custom modules are shown can be individually set by including
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `說明` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
|
@ -48,30 +48,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
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
|
||||
@ -80,14 +56,6 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
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
|
||||
@ -104,6 +72,30 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
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
|
||||
@ -113,6 +105,22 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
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>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -160,8 +168,8 @@
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
如果想更新已安裝的 Starship,請重新執行上述指令。 指令只會更新 Starship 執行檔本身,不會影響到任何已撰寫的設定檔。
|
||||
|
||||
如果想更新已安裝的 Starship,請重新執行上述指令。 指令只會更新 Starship 執行檔本身,不會影響到任何已撰寫的設定檔。
|
||||
|
||||
**備註** —— 安裝腳本的預設值可以被覆蓋,請使用以下指令查看內置說明。
|
||||
|
||||
|
@ -112,6 +112,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
@ -272,6 +275,9 @@ deleted = "x"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
@ -375,6 +381,9 @@ symbol = "swift "
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user