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.
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.