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

Re: zsh exits after delete-char-or-list and two ^Cs



On Wed, 25 Aug 2004, Danek Duvall wrote:

> This happens with 4.0.6, 4.2.0 and 4.2.1, the first two on Linux, the 
> latter on Solaris.  If I use delete-char-or-list, then hit control-C 
> twice, the first time cancels the command-line where I hit ^D, and the 
> second one exits the shell.

Looks like the interrupt handler isn't getting reset after the first 
ctrl-C.  I don't yet know why not, but this means that the default SIGINT
handler is called on the second ^C, which of course ends the process.

There also appears to be a bug in 4.2.x with "zle -I" and "zle -R".  This 
should work:

	TRAPINT() { zle -I && zle send-break }

because "zle -I" is supposed to return zero only when zle is active. 
However, I get:

	TRAPINT:zle: widgets can only be called when ZLE is active

In any case there are numerous workarounds involving trapping ^C or using 
"stty" to disable interrupt ... but they all have drawbacks.



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