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
4.2.7(3)-maint
(2)$ echo a
a
(2)$ exit
exit
(1)$ cat history
HISTFILE=history
echo $BASH_VERSION
echo a
exit

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.

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

Reply via email to