This is one way you could do something similar in zsh: https://stackoverflow.com/a/17915260/102182
Instead, this seems to work:
TRAPDEBUG() {
case "$WIDGET" in
zle-line-finish)
zle reset-prompt
;;
*)
;;
esac
}
(I don't know if further cases will be required.)This updates the prompt after "enter" is pressed, but before the command is executed.