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

Re: How to restart zle without invoking 'accept-line'?



On Oct 30,  9:30am, Thiago Padilha wrote:
} 
} This code propagates accept-line to the main zle widget(user presses
} enter), but how can I handle like ctrl+c which would normally cause zle to
} restart without executing the command?

For that specific case I believe this will do it:

setopt localtraps
trap 'zle send-break' INT QUIT


There are really only three ways to restart ZLE:  accept-line (and all the
variants), send-break, and push-line-or-edit.



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