3

less used to save my search history to $HOME/.lesshst. A few days ago it stopped saving any new search patterns. I still see the old search patterns in $HOME/.lesshst, but the new ones are not saved there anymore.

I tried adding something to .lesshst manually. The added words became visible in less (hit / and then UpArrow). So, the .lesshst file is writable, but less itself cannot save patterns in there, perhaps.

What could be the issue? How to fix it?

This less is running in GitBash on Windows 10.

0

1 Answer 1

1

I could identify the culprit and found a workaround. The issue is due to the mounted persistent drive in Azure, where my $HOME and .lesshst is located. This machine is a DevTest Lab VM.

Those Azure persistent disks, which survive VMs re-creation, has some major problems with file writing. It's not just less. Even mv in GitBash and simple writing to files from Java also have problems.

So, I relocated my .lesshst to a more robust storage (to a NAS drive) using LESSHISTFILE env variable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .