Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Why Zsh doesn't warn me again?
- X-seq: zsh-users 6861
- From: DervishD <raul@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Why Zsh doesn't warn me again?
- Date: Wed, 10 Dec 2003 15:03:03 +0100
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <1031210062709.ZM28621@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Pleyades
- References: <20031209152026.GA4153@DervishD> <1031210062709.ZM28621@xxxxxxxxxxxxxxxxxxxxxxx>
Hi Bart :)
* Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author