nixos

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

commit 156f93fb413de4afcd7f81e27dc9a4c33460acb2
parent 91e253702d130f6596a6c2366902574ddc196580
Author: Toni Brown <me@tb148.net>
Date:   Tue, 24 Mar 2026 15:56:48 +0800

update time formatting

Diffstat:
Mconfig.nu | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/config.nu b/config.nu @@ -52,7 +52,10 @@ $env.PROMPT_COMMAND = {|| $"(ansi $theme.yellow)(whoami)@(sys host | get hostname)(ansi rst):(ansi $theme.blue)(pwd)(ansi rst)\n($last_exit_code)" } $env.PROMPT_COMMAND_RIGHT = {|| - $"(ansi $theme.overlay1)(date now | format date "%H:%M:%S")(ansi reset)" + let now = date now + let duration = $env.CMD_DURATION_MS | into duration -u ms + let then = $now - $duration + $"(ansi $theme.overlay1)($then | format date "%H:%M:%S") + ($duration) = ($now | format date "%H:%M:%S")(ansi reset)" } $env.PROMPT_INDICATOR = {|| let indicator_color = if $env.LAST_EXIT_CODE > 0 {ansi $theme.red} else {ansi $theme.green}