Clear AUTO_COMMAND in the precmd hook.
precmd is always triggered before a new prompt is returned, but preexec is only called before an actual command is executed. This means that using builtins (or using ^C or enter) on an empty commandline will result in a new notification for the previous command that has already completed before.
This commit is contained in:
parent
0985a33107
commit
64855fba1c
1 changed files with 1 additions and 0 deletions
|
@ -54,6 +54,7 @@ function _auto_notify_send() {
|
||||||
if [[ -n "$AUTO_COMMAND" && $elapsed -gt $AUTO_NOTIFY_THRESHOLD ]]; then
|
if [[ -n "$AUTO_COMMAND" && $elapsed -gt $AUTO_NOTIFY_THRESHOLD ]]; then
|
||||||
_auto_notify_message "$AUTO_COMMAND" "$elapsed"
|
_auto_notify_message "$AUTO_COMMAND" "$elapsed"
|
||||||
fi
|
fi
|
||||||
|
AUTO_COMMAND=""
|
||||||
}
|
}
|
||||||
|
|
||||||
function _auto_notify_track() {
|
function _auto_notify_track() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue