Upon digging a little further (I really shouldve done this before submitting the first report), I have discovered what I think may be the problem. When I logout, bash saves the complete history (upto HISTSIZE lines) to the .bash_history file, however the problem occurs when bash starts up. It sets up its environment, setting HISTSIZE to 500, then reads in (at most) 500 lines from the .bash_history file. It then processes the .bashrc and HISTSIZE is set to 5000, but by then the history has already been truncated to the initial value of 500 lines.

There are a couple of solutions I can see to this..

1) Read in the .bash_history file upon startup, upto EOF. Once completed, set HISTSIZE to the number of lines read from the file. This has a problem that you are reading an unknown number of lines, so may need some upper limit set.

2) Process the .bashrc file before reading in the .bash_history file, so that if the user does wish to change these values, it is possible. This would seem to be the easiest option, however I have not looked too in-depth at how this could be accomplished.

David Murn


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to