Use print -P for time to prevent changing on ^L

This commit is contained in:
Erin 2023-01-18 14:01:15 -05:00
parent c9acb2bf4b
commit 61370f555d

View file

@ -33,8 +33,10 @@ function build_rprompt {
fi
fi
# add current time, including timezone if remote, and collapse it if we're out of room
RPROMPT="%<#<$RPROMPT at %D{%T$([ -n "$is_remote" ] && echo ' %Z')}"
# add exit time, including timezone if remote, and collapse it if we're out of room
timeformat="%D{%T$([ -n "$is_remote" ] && echo ' %Z')}"
exittime="$(print -P "$timeformat")"
RPROMPT="$RPROMPT at $exittime"
# that's an RPROMPT!
export RPROMPT