mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
docs(i18n): new Crowdin updates (#3085)
* New translations README.md (French) * New translations README.md (Korean) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Arabic) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Russian) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Turkish) * New translations README.md (Arabic) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Indonesian) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Japanese) * New translations README.md (German) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (German) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Portuguese) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Indonesian) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Korean) * New translations README.md (French) * New translations README.md (Japanese) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Chinese Traditional) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Indonesian) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Japanese)
This commit is contained in:
+111
-38
@@ -1,12 +1,12 @@
|
||||
# Configuration
|
||||
# ڕێکخستن
|
||||
|
||||
To get started configuring starship, create the following file: `~/.config/starship.toml`.
|
||||
بۆ دەسکردن بە ڕێکخستنی Starship، پەڕگەیەک دروست بکە بەم جۆرە: `~/.config/starship.toml`.
|
||||
|
||||
```sh
|
||||
mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
```
|
||||
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
هەموو ڕێکخستنەکان بۆ Starship ئەنجام ئەدرێن لەم پەڕگەی [TOML](https://github.com/toml-lang/toml)ـەدا:
|
||||
|
||||
```toml
|
||||
# Inserts a blank line between shell prompts
|
||||
@@ -59,17 +59,17 @@ By convention, most modules have a prefix of default terminal color (e.g. `via`
|
||||
|
||||
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.
|
||||
|
||||
#### Variable
|
||||
#### گۆڕاو
|
||||
|
||||
A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`.
|
||||
|
||||
For example:
|
||||
بۆ نموونە:
|
||||
|
||||
- `$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.
|
||||
|
||||
#### Text Group
|
||||
#### کۆمەڵە نووسین
|
||||
|
||||
A text group is made up of two different parts.
|
||||
|
||||
@@ -77,7 +77,7 @@ The first part, which is enclosed in a `[]`, is a [format string](#format-string
|
||||
|
||||
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:
|
||||
بۆ نموونە:
|
||||
|
||||
- `[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:
|
||||
بۆ نموونە:
|
||||
|
||||
- `(@$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.
|
||||
@@ -212,6 +212,7 @@ $nodejs\
|
||||
$ocaml\
|
||||
$perl\
|
||||
$php\
|
||||
$pulumi\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
@@ -385,7 +386,7 @@ style = "bold red"
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
discharging_symbol = "💦"
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
@@ -402,13 +403,13 @@ The character will tell you whether the last command was successful or not. It c
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
`error_symbol` is not supported on elvish and nu shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
@@ -788,7 +789,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Docker Context
|
||||
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
|
||||
### Options
|
||||
|
||||
@@ -983,7 +984,7 @@ default = "unknown user"
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | | The symbol used before displaying the variable value. |
|
||||
| `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. |
|
||||
@@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| Option | Default | Description |
|
||||
| ---------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `fill` module |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -1558,13 +1560,13 @@ The default functionality is:
|
||||
- 1 job -> `symbol` is shown.
|
||||
- 2 jobs or more -> `symbol` + `number` are shown.
|
||||
|
||||
::: warning
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
This module is not supported on tcsh and nu.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
The `threshold` option is deprecated, but if you want to use it, the module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
@@ -2110,7 +2112,7 @@ symbol = "☁️ "
|
||||
|
||||
## Package Version
|
||||
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `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`, `helm` and `shards` 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
|
||||
@@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**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
|
||||
- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` 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.
|
||||
@@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
|
||||
format = "via [🔹 $version](147 bold) "
|
||||
```
|
||||
|
||||
## Pulumi
|
||||
|
||||
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
|
||||
|
||||
::: tip
|
||||
|
||||
By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version).
|
||||
|
||||
:::
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
|
||||
| `style` | `"bold 5"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `pulumi` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| version | `v0.12.24` | The version of `pulumi` |
|
||||
| stack | `dev` | The current Pulumi stack |
|
||||
| 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
|
||||
|
||||
### Example
|
||||
|
||||
#### With Pulumi Version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[pulumi]
|
||||
format = "[🛥 ($version )$stack]($style) "
|
||||
```
|
||||
|
||||
#### Without Pulumi version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
[pulumi]
|
||||
symbol = "🛥 "
|
||||
format = "[$symbol$stack]($style) "
|
||||
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
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:
|
||||
@@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------ | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `"[$indicator]($style) "` | The format for the module. |
|
||||
| `style` | `"white bold"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
| --------- | ------- | ---------------------------------------------------------- |
|
||||
| indicator | | Mirrors the value of `indicator` for currently used shell. |
|
||||
| style\* | | Mirrors the value of option `style`. |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Examples
|
||||
|
||||
@@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
fish_indicator = ""
|
||||
powershell_indicator = "_"
|
||||
unknown_indicator = "mystery shell"
|
||||
style = "cyan bold"
|
||||
disabled = false
|
||||
```
|
||||
|
||||
@@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions
|
||||
|
||||
### Options
|
||||
|
||||
@@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💠"` | A format string shown before the terraform workspace. |
|
||||
| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold 105"` | The style for the module. |
|
||||
@@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
:::
|
||||
|
||||
::: warning Command output is printed unescaped to the prompt
|
||||
|
||||
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell.
|
||||
|
||||
Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html).
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
@@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
files = ["foo"] # can specify filters but wildcards are not supported
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
format = " transcending [$output]($style)"
|
||||
|
||||
[custom.time]
|
||||
command = "time /T"
|
||||
files = ["*.pst"]
|
||||
extensions = ["pst"] # filters *.pst files
|
||||
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user