unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Robert Vollmert <rob@vllmrt.net>
Cc: guix-devel@gnu.org
Subject: Re: small hack to prettify output of list-installed
Date: Mon, 22 Jul 2019 16:25:24 +0200	[thread overview]
Message-ID: <20190722162524.39eddcc7@scratchpost.org> (raw)
In-Reply-To: <A35F95D0-606C-4C1F-BBA3-4F87B5EC4860@vllmrt.net>

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2019-07-22 14:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19  7:46 small hack to prettify output of list-installed Robert Vollmert
2019-07-19  8:32 ` Danny Milosavljevic
2019-07-19 16:21   ` Robert Vollmert
2019-07-22 14:25     ` Danny Milosavljevic [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190722162524.39eddcc7@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=rob@vllmrt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).