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

Re: PATCH: exit after 10 EOF's



On Wed, 15 Sep 2004, Bart Schaefer wrote:

> No, it's not being treated as EOF.  It's being treated as a key bound to 
> the EOF character (and not explicitly bound to anything else).

I'll clarify that by noting that "explicitly bound" is important, as it's 
*implicitly* bound to delete-char-or-list.

> > and I don't think it's useful.
> 
> I disagree.

Here's an example of why.

  count-ctrl-D() { zle -M $((++ctrlD)) }
  zle -N count-ctrl-D
  bindkey \^D count-ctrl-D
  setopt ignoreeof

Now start typing ctrl-D at the beginning of an empty line.  With the patch 
you introduced, the shell will exit before displaying "10".  Without the 
patch, you can go on counting forever.

I haven't searched the archives, but I'm pretty sure someone (maybe me) 
made similar arguments the last time something about ignoreeof behavior
came up (which would have been several years ago).



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