mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: Add configuration to change the character for non-zero sta… (#133)
Prompt can now switch characters in addition to switching character color. Add configuration options in so that users can do either, both, or neither.
This commit is contained in:
committed by
Matan Kushner
parent
994a865d4d
commit
39598ec691
@@ -89,16 +89,18 @@ discharging_symbol = "💀"
|
||||
The `character` module shows a character (usually an arrow) beside where the text
|
||||
is entered in your terminal.
|
||||
|
||||
The character will be green if the status of your
|
||||
last command had a successful status code (zero), and will be red if the last
|
||||
command had an unsuccessful status code (non-zero).
|
||||
The character will tell you whether the last command was successful or not. It
|
||||
can do this in two ways: by changing color (red/green) or by changing its shape
|
||||
(➜/✖). The latter will only be done if `use_symbol_for_status` is set to `true`.
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | ------- | ---------------------------------------------------- |
|
||||
| `symbol` | `"➜"` | The symbol used before the text input in the prompt. |
|
||||
| `disabled` | `false` | Disables the `character` module. |
|
||||
| `symbol` | `"➜"` | The symbol used before the text input in the prompt. |
|
||||
| `error_symbol` | `"✖"` | The symbol used before text input if the previous command failed. |
|
||||
| `use_symbol_for_status` | `false` | Indicate error status by changing the symbol. |
|
||||
| `disabled` | `false` | Disables the `character` module. |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -107,6 +109,8 @@ command had an unsuccessful status code (non-zero).
|
||||
|
||||
[character]
|
||||
symbol = "❯"
|
||||
error_symbol = "✗"
|
||||
use_symbol_for_status = true
|
||||
```
|
||||
|
||||
## Command Duration
|
||||
|
||||
Reference in New Issue
Block a user