Update prompt
Signed-off-by: Aleksandar 'The Cobra' Widulski <thecobra@riseup.net>
This commit is contained in:
parent
1bf51a1f8e
commit
c2ac59eba6
11
.prompt
11
.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}"
|
||||
|
|
Loading…
Reference in New Issue