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

Ertugrul Söylemez ertesx at gmx.de
Fri Jan 2 16:30:11 CET 2015

Hi Eelco,

>> There is a very good reason for this principle.  If a program does
>> more than what it's intended to do, then it hurts composability.
> There shouldn't be an issue with composability here, because Nix will
> only run the pager when stdout is a terminal. So things work fine if
> you pipe Nix into another command.

Let me give you an example where this assumption fails:  Listing the
current generations from your shell profile.  In fact something very
similar happened to me, which motivated me to start this thread:  The
change broke my assumption that Nix can be used safely from a shell

Nothing bad happened, but one day was wasted, because a script stopped
for `less` without my knowledge.

I really believe that projects should start as non-interactive script-
and command-line-friendly programs /by default/.  I'd go as far as to
call this a good design principle.  Frontends can always be made.


More information about the nix-dev mailing list