Handle skipped commands in bash

Part of #142640
This commit is contained in:
Daniel Imms 2022-02-14 15:59:09 -08:00
parent 458dda86af
commit 6e63b1e1ee

View file

@ -15,6 +15,8 @@ else
fi
IN_COMMAND_EXECUTION="1"
LAST_HISTORY_ID=$(history | tail -n1 | awk '{print $1;}')
prompt_start() {
printf "\033]633;A\007"
}
@ -32,7 +34,14 @@ command_output_start() {
}
command_complete() {
printf "\033]633;D;%s\007" "$STATUS"
local HISTORY_ID=$(history | tail -n1 | awk '{print $1;}')
if [[ "$HISTORY_ID" == "$LAST_HISTORY_ID" ]]; then
printf "\033]633;D\007"
else
printf "\033]633;D;%s\007" "$STATUS"
LAST_HISTORY_ID=$HISTORY_ID
fi
update_cwd
}