diff --git a/.prompt b/.prompt index 9096c9f..2b88d5a 100644 --- a/.prompt +++ b/.prompt @@ -38,12 +38,7 @@ __sig() { j=0 for i in $@; do if [[ $j != 0 ]]; then - printf '%s' "$WHT" - [[ $(eval echo \${$((j+1))}) == ";" - || $(eval echo \${$((j-1))}) == ";" ]] && - printf ";" || - printf "|" - printf '%s' "$RED" + printf '%s|%s' "$WHT" "$RED" fi j=$((j+1)) case $i in @@ -102,6 +97,10 @@ __prompt() { # Get relative times + # Remove decimal point, simulating multiplying by 1 million + PROMPT_RT1M="${PROMPT_RT%.*}${PROMPT_RT#*.}" + LAST_RT1M="${LAST_RT%.*}${LAST_RT#*.}" + # Subtract and divide by 1 million to get a more accurate difference CMD_TIME="$(((PROMPT_RT1M-LAST_RT1M)/1000000))" CMD_TIME="${CMD_TIME:-0}"