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

Ertugrul Söylemez ertesx at gmx.de
Fri Jan 2 13:15:06 CET 2015


Hi Paul,

>> 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.

Personally I don't use PAGER much anymore, because most of my use cases
have vanished by replacing applications.  For example my mail client is
Emacs now, so I don't need an external pager any longer.  I just use
Emacs itself to view, for example, text attachments.

Of course new use cases could pop up any time.  For example I could
choose to pipe the output of `ledger reg` through PAGER by default.

The reasonable use case of PAGER is the scenario where you have an
interactive program that either does not have a built-in pager or gives
you the choice to use an external one, similar to how the EDITOR and
BROWSER variables are used.


Greets,
Ertugrul


More information about the nix-dev mailing list