home/nushell: Display command duration unconditionally

This commit is contained in:
Mikael 2024-10-01 13:57:34 +02:00
parent 039596413d
commit e6f83125e6
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0

View file

@ -258,11 +258,10 @@ in {
} }
PROMPT_COMMAND_RIGHT: { PROMPT_COMMAND_RIGHT: {
let duration = $env.CMD_DURATION_MS | into int [
(ansi light_red)
if $duration >= 2000 { ($env.CMD_DURATION_MS | into int | into duration --unit ms)
[ (ansi light_red) ($duration | into duration --unit ms) ] | str join ] | str join
}
} }
PROMPT_INDICATOR: { " " } PROMPT_INDICATOR: { " " }