guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: small hack to prettify output of list-installed


From: Danny Milosavljevic
Subject: Re: small hack to prettify output of list-installed
Date: Mon, 22 Jul 2019 16:25:24 +0200

Hi Robert,

> Hmm. What do you think about patching /bin/ls to not offer columnized
> output, to encourage users to learn about /bin/column and friends?

/bin/ls does turn off columnized output as soon as stdout is a pipe,
for composability.  Maybe that's a good middle ground (if a little
magical).

The power of UNIX (if there is any) comes from the composability of simple
tools so that you can build pipelines of stuff, in order to make the whole
do more than the parts.

Stuffing unrelated things into one executable flow breaks that paradigm
(if it can't be disabled).
Even when it can be disabled, it's kinda dirty to have to modeswitch each tool.

The downside of UNIX is that the stdout outputs have to be machine-readable
(and -parseable) by default, otherwise composition won't work right.

The terminal is supposed to do all of: soft wrapping, tabulation, line editing,
scrolling, windowing.  See also http://rtfm.etla.org/xterm/ctlseq.html

In the end it's not so bad to do it manually, but there are reasons it was
designed the way it is, and over the years those seem to be forgotten.

Attachment: pgpJF6vZvyaUd.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]