Skip to content

lesskey files can't include LESSHISTFILE #626

@timhillgit

Description

@timhillgit

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:

#env
LESS=-F

less exits as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions