Open nisbet-hubbard opened 3 weeks ago
Hm so you are setting HISTFILE=foo in oshrc
, and it's being ignored?
What about HISTFILE=foo osh
, so it's in the environment?
This might be an ordering issue ...
also bash does some weird stuff like calling libc
functions when you do LANG=C
, I'm not sure if it does something similar when doing HISTFILE=foo
, like readline.set_history_file('foo')
or something
Yes, I can confirm HISTFILE=foo
is in the environment. The problem isn’t foo’s being ignored, but that it’s being tampered with using ~/.local/share/oils/osh_history
.
So, osh overwrites foo with whatever is in ~/.local/share/oils/osh_history
whenever I exit osh.
Currently, even after setting osh’s $HISTFILE to a different location (
~/.bash_history
in our case) throughoshrc
, invokinghistory
upon entering an osh lists only the commands stored in the old~/.local/share/oils/osh_history
.At this moment, at least
~/.bash_history
remains intact.If you then invoke
history -a
, however, osh replaces the commands in~/.bash_history
(ie $HISTFILE) with those in~/.local/share/oils/osh_history
, with the result that now both $HISTFILE and thehistory
list are populated with the same commands from the old~/.local/share/oils/osh_history
.