Disable Control-D Exit in BASH?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Derek Neighbors
Date:  
Subject: Disable Control-D Exit in BASH?
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