bug-bash
[Top][All Lists]
Advanced

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

Re: "unset HISTFILESIZE" not working in .bashrc


From: perryh
Subject: Re: "unset HISTFILESIZE" not working in .bashrc
Date: Mon, 16 Feb 2009 01:01:46 -0800
User-agent: nail 11.25 7/29/05

Chet Ramey <chet.ramey@case.edu> wrote:

> HISTFILESIZE doesn't exist until bash tries to load the history
> list from the history file (taken from $HISTFILE).  At that point,
> if it doesn't have a value, it's set to $HISTSIZE.  That doesn't
> happen until after the startup files are read, as you guessed.
>
> If you want to avoid history file truncation, your best bet is
> to set HISTFILESIZE to some very large value.

Actually, what I want is to prevent writing to the history file
at all when bash exits.  (Not all the time, just in certain cases
that other logic in .bashrc will be able to detect.  Unsetting
HISTFILESIZE unconditionally was a simplified test case.)

Should I unset HISTFILE, or set it to /dev/null, instead of
trying to mess with HISTFILESIZE?




reply via email to

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