[Top][All Lists]

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

Re: no local bash_history created or written to if existing (~/.bash_his

From: Chet Ramey
Subject: Re: no local bash_history created or written to if existing (~/.bash_history
Date: Mon, 07 Mar 2011 22:22:55 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv: Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7

On 3/6/11 2:53 PM, Doug McMahon wrote:
> with the current bash used in ubuntu 11.04 there no longer is a
> ~/.bash_history created
> If there is an existing ~/.bash_history in place or one is inadvertently
> created, *see below, then it will not be written to

Demonstrably false:

(1)$ ./bash
(2)$ HISTFILE=history
(2)$ echo $BASH_VERSION
(2)$ echo a
(2)$ exit
(1)$ cat history
echo a

One thing that has changed is that an interactive shell will no longer
attempt to write the history file if it's killed by a signal, since that
causes many functions to be executed that are not safe to call from a
signal handler.  If you're in the habit of trying to exit the shell by
closing the terminal window, which causes the shell to be killed by SIGHUP
(I think, maybe SIGTERM), the history will not be saved.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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