docs(config): custom shell is used for when command (#6312)

Co-authored-by: Tim Siegel <trs@jelly.home>
This commit is contained in:
Tim Siegel 2024-10-14 16:04:20 -04:00 committed by GitHub
parent c0ba95589c
commit 2f120bee9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4808,7 +4808,7 @@ Format strings can also contain shell specific prompt sequences, e.g.
| Option | Default | Description |
| ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. |
| `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. |
| `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the `shell` returns a `0` status code from executing it. |
| `require_repo` | `false` | If `true`, the module will only be shown in paths containing a (git) repository. This option alone is not sufficient display condition in absence of other options. |
| `shell` | | [See below](#custom-command-shell) |
| `description` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. |
@ -4828,7 +4828,7 @@ Format strings can also contain shell specific prompt sequences, e.g.
| Variable | Description |
| -------- | -------------------------------------- |
| output | The output of shell command in `shell` |
| output | The output of `command` run in `shell` |
| symbol | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` |
@ -4843,7 +4843,7 @@ Format strings can also contain shell specific prompt sequences, e.g.
If unset, it will fallback to STARSHIP_SHELL and then to 'sh' on Linux, and 'cmd /C' on Windows.
The `command` will be passed in on stdin.
The `command` (and `when`, if applicable) will be passed in on stdin.
If `shell` is not given or only contains one element and Starship detects PowerShell will be used,
the following arguments will automatically be added: `-NoProfile -Command -`.