[Bug 327874] Re: Behaviour for unset HISTFILESIZE in bashrc not in accordance with man page

Johan Boulé bohan.launchpad at retropaganda.info
Sat Sep 14 23:01:50 UTC 2013


I have been hit by this too. What value can we set HISTFILESIZE not to
have it truncated then ? Empty value ?

** Changed in: bash (Ubuntu)
       Status: Invalid => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/327874

Title:
  Behaviour for unset HISTFILESIZE in bashrc not in accordance with man
  page

Status in “bash” package in Ubuntu:
  Confirmed

Bug description:
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/327874/+subscriptions




More information about the foundations-bugs mailing list