I wrote:
>On most of my Fedora systems, bash remembers the last commands entered
>prior to a restart. After the system restarts, a new bash window shows
>the last previous command when I press the up-arrow key and multiple
>presses continue to show previous commands in reverse order.
>
>On one system only, nothing happens when I press that key. On that
>one system after I've entered commands, up-arrow shows the previous
>commands in reverse order as I expect. Except that it doesn't go back
>beyond the first new command after the restart. This happens on each
>new bash window on that system, even after other windows have started
>to respond to the up-arrow key.
>
>On both the working systems and the one misbehaving, I see:
>
>$ set | grep HIST
>HISTCONTROL=ignoredups
>HISTFILE='~/.bash_history'
>HISTFILESIZE=1000
>HISTSIZE=1000
Stan Marsh answered:
>I don't think it likes the ~ in HISTFILE. Try writing it out as
>/home/dave (or whatever is your home directory).
>
>I just did a test where I set HISTFILE='~/.bash_history' then exited
>the shell and it did not write anything to $HOME/.bash_history, so
>this seems to confirm it. Of course, you do claim that it is that way
>on both the working and non-working system, which leaves me wondering
>how it could work at all. Maybe version of BASH or something else
>like that...
It seems that you are right, Stan. Thanks!
The ~ setting was in /etc/bashrc and is now overridden in ~/.bashrc.
And while I wrote that it was the same on all systems, that was me
thinking ~ and $HOME were equivalent so I didn't mention the difference.
This may be related to the fact that the (formerly) misbehaving system
is my oldest and has been DNF-updated since at least FC30.
--
Dave Close, Compata, Irvine CA "Some subjects are so serious that
dave@compata.com, +1 714 434 7359 one can only joke about them."
dhclose@alumni.caltech.edu -- Niels Bohr