In version v678 of less if a lesskey file sets LESSHISTFILE then the file can't be parsed. This causes all of the environment variables, even those earlier in the file, to not be set.
Reproducing the bug
I created ~/.config/lesskey with the following content:
#env
LESS=-F
LESSHISTFILE=-
I then ran less ~/.config/lesskey. I would expect that less would immediately exit after displaying the contents of the file, but it does not. If I instead use the following lesskey file:
less exits as expected.
In version v678 of less if a lesskey file sets LESSHISTFILE then the file can't be parsed. This causes all of the environment variables, even those earlier in the file, to not be set.
Reproducing the bug
I created
~/.config/lesskeywith the following content:I then ran
less ~/.config/lesskey. I would expect that less would immediately exit after displaying the contents of the file, but it does not. If I instead use the following lesskey file:less exits as expected.