From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4688 invoked from network); 10 Dec 2003 19:00:11 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 10 Dec 2003 19:00:11 -0000 Received: (qmail 2356 invoked by alias); 10 Dec 2003 18:59:44 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6861 Received: (qmail 2292 invoked from network); 10 Dec 2003 18:59:43 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 10 Dec 2003 18:59:43 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.193.203.32] by sunsite.dk (MessageWall 1.0.8) with SMTP; 10 Dec 2003 18:59:42 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id hBAIxZ322946; Wed, 10 Dec 2003 19:59:36 +0100 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1AU4vf-00006q-00>; Wed, 10 Dec 2003 15:03:03 +0100 Date: Wed, 10 Dec 2003 15:03:03 +0100 From: DervishD To: Bart Schaefer Cc: Zsh Users Subject: Re: Why Zsh doesn't warn me again? Message-ID: <20031210140303.GB394@DervishD> Mail-Followup-To: Bart Schaefer , Zsh Users References: <20031209152026.GA4153@DervishD> <1031210062709.ZM28621@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1031210062709.ZM28621@candle.brasslantern.com> User-Agent: Mutt/1.4i Organization: Pleyades User-Agent: Mutt/1.4i Hi Bart :) * Bart Schaefer dixit: > As far as I can tell, that isn't specifically documented anywhere, it's > just the behavior that was considered most logical. And that's (almost) true. A bit unexpected, maybe. > The second problem is that typing the EOF character (ctrl-D) is not the > same as using `exit'. OK, I was supposing that the code that interpreted EOF wasn't at the same level than the code that interpreted exit or logout, but I wasn't sure... > It takes at least _two_ commands after an attempt > to exit before zsh will warn you again on an EOF. OK. I was testing with just one command O:) > This happens because EOF is interpreted earlier in the command loop, > so zsh fails to properly decrement the attempted-to-exit counter (a > global called "stopmsg" if you look at the C source). I'd say this > is a bug. If EOF is intended as a synonim for 'exit', yes, it's a bug. Otherwise... > } How can I change this (without IGNORE_EOF'ing) so Zsh act like the > } doc says? > Use the "stty" command to set the EOF character to something other > than ctrl-D, and then bind ^D to a function similar to this one: [...] Nice, thanks, but I think I must get used to use 'exit' or 'logout' instead of EOF... It's a bad habit anyway, because sometimes I've exited a terminal accidentally with backgrounded jobs because I've hitted ^D twice due to a bad finger movement (a trembling finger...). Using a command to exit is less error-prone. > (Remember to change the eof character before you freeze the tty, if you > happen to be using ttyctl.) Thanks :)) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/