fix(status): Make status module work even when the status is 0 (#3750)

Co-authored-by: Izhak Jakov <jizhak@ca.ibm.com>
This commit is contained in:
Izhak Jakov
2022-03-16 16:05:13 -04:00
committed by GitHub
parent 52fa4bbab4
commit 86953272a7
3 changed files with 58 additions and 9 deletions
+5 -4
View File
@@ -3083,7 +3083,7 @@ format = '[📦 \[$env\]]($style) '
## Status
The `status` module displays the exit code of the previous command.
The module will be shown only if the exit code is not `0`.
If $success_symbol is empty (default), the module will be shown only if the exit code is not `0`.
The status code will cast to a signed 32-bit integer.
::: tip
@@ -3103,7 +3103,7 @@ This module is not supported on nu shell.
| ----------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
@@ -3140,8 +3140,9 @@ This module is not supported on nu shell.
[status]
style = "bg:blue"
symbol = "🔴"
format = '[\[$symbol $common_meaning$signal_name$maybe_int\]]($style) '
symbol = "🔴 "
success_symbol = "🟢 SUCCESS"
format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) '
map_symbol = true
disabled = false
```