mirror of
https://github.com/RGBCube/ncc
synced 2025-07-27 10:07:44 +00:00
nushell: show exit code in prompt
This commit is contained in:
parent
43e0439341
commit
0eb9a36ce6
1 changed files with 7 additions and 1 deletions
|
@ -222,7 +222,13 @@ do --env {
|
|||
$"(ansi cyan)($pwd)(ansi reset)"
|
||||
}
|
||||
|
||||
$"(ansi light_yellow_bold)($left_char)━━━(ansi reset) ($body)(char newline)"
|
||||
let middle = if $env.LAST_EXIT_CODE == 0 {
|
||||
"━"
|
||||
} else {
|
||||
$"┫(ansi light_red_bold)($env.LAST_EXIT_CODE)(ansi light_yellow_bold)┣"
|
||||
}
|
||||
|
||||
$"(ansi light_yellow_bold)($left_char)($middle)━(ansi reset) ($body)(char newline)"
|
||||
}
|
||||
|
||||
$env.PROMPT_INDICATOR = $"(ansi light_yellow_bold)┃(ansi reset) "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue