From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 362 invoked from network); 15 Sep 2004 16:03:48 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 15 Sep 2004 16:03:48 -0000 Received: (qmail 29386 invoked from network); 15 Sep 2004 16:03:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 Sep 2004 16:03:42 -0000 Received: (qmail 14841 invoked by alias); 15 Sep 2004 16:03:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20373 Received: (qmail 14829 invoked from network); 15 Sep 2004 16:03:30 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 15 Sep 2004 16:03:30 -0000 Received: (qmail 28897 invoked from network); 15 Sep 2004 16:02:31 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 15 Sep 2004 16:02:29 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id i8FG2Qiv009922 for ; Wed, 15 Sep 2004 09:02:26 -0700 Date: Wed, 15 Sep 2004 09:02:26 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-workers@sunsite.dk To: zsh-workers@sunsite.dk Subject: Re: PATCH: exit after 10 EOF's In-Reply-To: Message-ID: References: <200409131118.i8DBIM5B005245@news01.csr.com> <200409150946.i8F9k81A008659@news01.csr.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 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).