Public bug reported:

Binary package hint: bash

This is on Ubuntu 8.04.2 for amd64, with bash package version 3.2-0ubuntu18.
(but in fact the problem occurs similarly on Red Hat Enterprise Linux 5.3, for 
example)

According to man bash "If HISTFILESIZE is not set, no truncation is
performed." In my experience however, unsetting HISTFILESIZE in
~/,bashrc results in HISTFILESIZE being given a default value of 500,
and the history file is truncated accordingly.

To reproduce the bug, append the following line to ~/.bashrc: 
unset HISTFILESIZE

Then, open a new terminal, and type
echo $HISTFILESIZE

This will return "500".
In contrast, when we change our entry in ~/.bashrc to
export HISTFILESIZE=0

when we now open a new terminal, we find HISTFILESIZE is indeed set to
0.

Summary: effectively we can't unset this value in .bashrc, and the man
page suggests otherwise. Desired behaviour: leave the history
untruncated if we unset HISTFILESIZE in .bashrc.


PS, for completeness: I'm also using the setting "shopt -s histappend" in 
.bashrc. As the man page specifies, this only results in the history being 
truncated on starting a new bash rather than on closing the old one.

** Affects: bash (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Behaviour for unset HISTFILESIZE in bashrc not in accordance with man page
https://bugs.launchpad.net/bugs/327874
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to