[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make Ctrl-d not log off the shell?

From: Dieter Wilhelm
Subject: Re: How to make Ctrl-d not log off the shell?
Date: Thu, 17 May 2007 10:48:41 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux)

Tyler Smith <address@hidden> writes:

> On 2007-05-16, mowgli <address@hidden> wrote:
>> How do you make pressing Ctrl-d not log off the shell and instead ask
>> a question like Do you really want to quit? typing y quits the shell.

> (add-hook 'comint-mode-hook 
>         '(lambda ()
>             (define-key comint-mode-map "\C-d" 'delete-char)))

This might be an alternative at least when using a bash shell or

I mitigated such a problem for terminals and for the *shell* buffer
with placing the following in my .bashrc:

  export IGNOREEOF=1 # only ^D twice is exiting now

Since it prints a warning  before typing the decisive (in this case
second) C-d.

    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

reply via email to

[Prev in Thread] Current Thread [Next in Thread]