nixos

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 9fd86d52d498f4cdaf39ac216cf16e830dc96587
parent 6566b7d233d6e0c2ce29c43dfdadc00640401dda
Author: Toni Brown <me@tb148.net>
Date:   Tue, 24 Mar 2026 22:32:11 +0800

pad exit codes

Diffstat:
Mconfig.nu | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config.nu b/config.nu @@ -51,7 +51,7 @@ def color [color: string] {$"(ansi $color)($in)(ansi rst)"} $env.PROMPT_COMMAND = {|| let user_host = $"(whoami)@(sys host | get hostname)" - let last_exit_code = if $env.LAST_EXIT_CODE > 0 {$env.LAST_EXIT_CODE} else {""} + let last_exit_code = if $env.LAST_EXIT_CODE > 0 {$env.LAST_EXIT_CODE | fill -a right -c '0' -w 3} else {""} ($user_host | color $theme.yellow) + ("@" | color $theme.text) + (pwd | color $theme.blue) + "\n" + ($last_exit_code | color $theme.red) } $env.PROMPT_COMMAND_RIGHT = {||