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

Re: PATCH: exit after 10 EOF's

Bart Schaefer wrote:
> On Sun, 19 Sep 2004, Duncan Sinclair wrote:
> > But in the absence of any special binding I don't see what's wrong with 
> > giving in and exiting after <some number> of the standard ignoreeof 
> > warnings have been printed.
> You may have hit on the solution.  Rather than counting the number of EOF 
> key presses, count the number of warnings printed.  Thus suppressing the 
> warning is the same as suppressing the exit behavior (which is not true of 
> the code as patched by 20363).  I'd settle for that, I think.

Yes, that sounds OK.  If we could somehow make it (without too much
tortuous code) that any zle -N widget, no matter what it contains,
suppresses the warning and the EOF behaviour, I would be fairly happy.

My main remaining unhappiness is with the structure of the code, which
is why the message and the exiting are separate as patched; the same
test occurs in two places (not counting the main loop in the main
shell).  However, maybe that can be fixed, too.


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