# nice PS4 with ellapsed seconds (to two decimal places)
zmodload zsh/system # to get actual pid
setopt PROMPT_SUBST
if [[ $TERM == (xterm|rxvt|screen|linux|console|Eterm|putty)* ]]; then
# first color is for main shell process, second is subshell
PS4_PID_COLORS=(cyan magenta)
PS4='+%B${SECONDS} %F{${PS4_PID_COLORS[1+($$ != ${sysparams[pid]})]}}%N%f:%F{yellow}%i%f>%b '
else
PS4='+%B${SECONDS} ${sysparams[pid]} %N:%i>%b '
fi
# two digits after the decimal point
typeset -g -F 2 SECONDS
# typeset -F 2 SECONDS # do it twice, some bug I don't understand
# vim: ft=zsh noet ts=4 sts=4 sw=4