* [Suggestion] IGNORE_EOF like in bash
@ 2000-06-23 14:41 Christoph Lange
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Lange @ 2000-06-23 14:41 UTC (permalink / raw)
To: zsh-workers
Hi there,
I suggest that the IGNORE_EOF shell option should be implemented in the
same way as in bash. There, it is a shell variable rather than an option.
The best explanation is given in the bash manual page:
IGNOREEOF
Controls the action of an interactive shell on
receipt of an EOF character as the sole input. If
set, the value is the number of consecutive EOF
characters which must be typed as the first charac
ters on an input line before bash exits. If the
variable exists but does not have a numeric value,
or has no value, the default value is 10. If it
does not exist, EOF signifies the end of input to
the shell.
The advantage is that a user can set that variable to 3, for example, to log
out after three presses of ^D.
If you should not like to hard-code it into the shell, you should consider
the following workaround: the shell must not catch ^D on an empty command
line before any invocation of a zle widget. If ^D on an empty command is
passed to zle, too, users can write their own zle widget which ignores it,
let's say 3 times, and then logs out.
Regards,
Christoph
PS: Please send answers directly to me, since I don't subscribe the list.
--
"NSA GCHQ KGB CIA nuclear conspiration war weapon spy agent... Hi Echelon!"
Christoph Lange, langec@gmx.de, http://www.cul.de/home/yaph/, ICQ #51191833
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Suggestion] IGNORE_EOF like in bash
@ 2000-06-26 9:54 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2000-06-26 9:54 UTC (permalink / raw)
To: zsh-workers; +Cc: Christoph Lange
Christoph Lange wrote:
> Hi there,
>
> I suggest that the IGNORE_EOF shell option should be implemented in the
> same way as in bash. There, it is a shell variable rather than an option.
> The best explanation is given in the bash manual page:
>
> ...
>
> The advantage is that a user can set that variable to 3, for example, to log
> out after three presses of ^D.
I doubt that we'll change options to parameters any time soon (or
ever). One more reason for putting more of zle in shell code and using
styles there...
> If you should not like to hard-code it into the shell, you should consider
> the following workaround: the shell must not catch ^D on an empty command
> line before any invocation of a zle widget. If ^D on an empty command is
> passed to zle, too, users can write their own zle widget which ignores it,
> let's say 3 times, and then logs out.
That's rather irritating, indeed. Can anyone see a reason to not
change it?
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-06-26 9:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-23 14:41 [Suggestion] IGNORE_EOF like in bash Christoph Lange
2000-06-26 9:54 Sven Wischnowsky
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).