fish: add time info to prompt

This commit is contained in:
dogeystamp 2023-01-21 17:15:54 -05:00
parent 195902be40
commit 6d9c8e364a
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38

View File

@ -16,6 +16,19 @@ function fish_right_prompt
set usercolor (set_color $col)
end
set -l duration "$cmd_duration$CMD_DURATION"
if test $duration -gt 100
set duration (math $duration / 1000)s
else
set duration
end
printf '%s%s %s%s%s' \
(set_color brgrey) \
$duration \
(set_color brblue) \
(date +"%H:%M") \
(set_color normal)
printf '%s ' \
(fish_git_prompt)
printf '%s%s@%s%s'\