Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zle-line-finish behavior and documentation
On 2016-01-14 18:22:56 -0800, Bart Schaefer wrote:
> On Jan 14, 3:56pm, Vincent Lefevre wrote:
> }
> } BTW, is there something similar executed when the command line is
> } aborted?
>
> There's not. All you can do is test [[ -n $ZLE_LINE_ABORTED ]] when
> you get back to zle-line-init.
OK, but if the goal is to reset the previous prompt, that's too late.
There would also be other two problems:
1) $ZLE_LINE_ABORTED gets empty when one does Ctrl-C on an empty line.
2) $ZLE_LINE_ABORTED is not reset when a command line is not aborted.
FYI, I currently have:
zle reset-prompt
in zle-line-finish() to update the time. However that's mainly useful
to have the correct time when I started some command. After doing
Ctrl-C on the command line, this is less useful.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author