Disable Control-D Exit in BASH?
Robert Bushman
plug-discuss@lists.plug.phoenix.az.us
Thu, 6 Feb 2003 11:44:58 -0700 (MST)
Thanks for the pointer Derek, that's a nice tips page!
The syntax that worked for me is:
bob@galaxy-auto-build:~$ set -o ignoreeof
bob@galaxy-auto-build:~$ <Ctrl-d>
Use "exit" to leave the shell.
On Thu, 6 Feb 2003, Derek Neighbors wrote:
> Robert Bushman said:
> > Hopefully this is an easy one - how dow I disable
> > Control-d quick-exit in Bash (I tend to fatfinger
> > the keyboard).
>
> set options
> ignoreeof
>
> Ordinarily, issuing Ctrl-D at the prompt will log you out of an
> interactive shell. This can be annoying if you regularly need to type
> Ctrl-D in other situations, for example, when trying to disconnect from a
> Telnet session. In such a situation, hitting Ctrl-D once too often will
> close your shell, which can be very frustrating. This option disables the
> use of Ctrl-D to exit the shell.
>
> >From the "Working More Productively with Bash":
> http://www.caliban.org/bash/index.shtml
>
> -derek
>
>
----------------------------------------------------------------------
It is not whether you fall down.
It is whether you get back up.
- Vince Lombardi
----------------------------------------------------------------------