[Nix-dev] less: When assumptions ruin the world

Michael Raskin 7c6f434c at mail.ru
Fri Jan 2 13:01:01 CET 2015

>> No, they can't choose.  I would choose to use `less` as a pager when I
>> need it, and otherwise I would use my terminal.  I can't make that
>> choice without corrupting the PAGER variable (which I use for other
>> things!).
>I'm not a fan of using less for nix tools. But it seems you're
>inconsistent here. Which other programs use $PAGER for legitimate
>reasons? And what reasons are good for that? I'm asking not to insult
>you, but rather to make my own future decisions better.

When I explicitly launch man, I am going to read the top of the man page
and some place in the middle, so "less" is useful.

When I launch some nix build-related tool I expect to monitor current
progress, and read the last 50 lines if something fails (something like
tail -f, but for a stream).

For nix-store --help a pure listing of all the options without any other
text would probably be an improvement over showing man page (for my

For git logs, by the way, tac would fit my use case better than less.

But the PAGER really matters for man, so I keep it set to 'less -R'

The original poster probably has other motivations and workflow
patterns, but that's my experience.

More information about the nix-dev mailing list