Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Getting back a command after hitting CTRL-C



2008/6/17 Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>:
>> Well, that is the idea, every time it annoys you, you remember to use
>> the other keybinding instead :). You can of course change the interrupt
>> key with stty, but then you won't be able to interrupt actual commands with
>> ctrl-c anymore.
> [...]
>
> which you could work around with some precmd/prexec hook I
> suppose.
>
> This seems to work:
>
> trap 'zle kill-buffer; zle -R' INT

Aha, zsh always complains to me that i'm trying to use zle outside widget
functions, so i just assumed it would here too. (you can't use them in
preexec/precmd for example).

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author