So this was happening because for some reason my XDG_DATA_HOME
environment variable was not set (it should be set to ~/.local/share).
I can see my old history under ~/.local/share/fish/fish_history. I was
able to recover the history by doing "set -U XDG_DATA_HOME
"$HOME/.local/share"

HTH,
-mandeep

On Tue, Aug 22, 2023 at 2:20 PM Mandeep Sandhu
<mandeepsandhu....@gmail.com> wrote:
>
> Hmmm, never mind, I seem to have magically got my history back!
>
> When I first tried after my laptop crashed, I wasn't getting anything
> in shell history...tried with "up arrow"  and also the "history"
> command (which listed only 4 prior commands). Somehow when I opened
> another shell after a while, all my previous history started showing
> again. Almost like it recovered a previous version of it.
>
> Long live mystical powers of fish-shell!
>
> On Tue, Aug 22, 2023 at 10:03 AM Mandeep Sandhu
> <mandeepsandhu....@gmail.com> wrote:
> >
> > Hey everyone,
> >
> > I recently had my fish command history completely lost after my laptop
> > crashed (damn nvidia graphics!). I'm on ubuntu 22.04 running fish
> > 3.6.1.
> >
> > Looks like the crash happened at a time when fish was updating history
> > file (I thought this was an atomic operation and shouldn't cause loss
> > of data?).
> >
> > Is there any way to recover the history?
> >
> > Any tips appreciated.
> >
> > Thanks,
> > -mandeep


_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to