From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: small hack to prettify output of list-installed Date: Mon, 22 Jul 2019 16:25:24 +0200 Message-ID: <20190722162524.39eddcc7@scratchpost.org> References: <20190719103258.61378b09@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/R_kMtg6ql9P3mgixA6_p=ad"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36347) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpZFq-00024g-DS for guix-devel@gnu.org; Mon, 22 Jul 2019 10:25:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpZFp-0007lb-BV for guix-devel@gnu.org; Mon, 22 Jul 2019 10:25:30 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:35934) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hpZFp-0007jb-4u for guix-devel@gnu.org; Mon, 22 Jul 2019 10:25:29 -0400 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Robert Vollmert Cc: guix-devel@gnu.org --Sig_/R_kMtg6ql9P3mgixA6_p=ad Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 t= ool. 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 edit= ing, 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. --Sig_/R_kMtg6ql9P3mgixA6_p=ad Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl01x1QACgkQ5xo1VCww uqW2QAf/bXRKy8MzQUtkXfukPw44+Nipn0JQEehI1qOSd3KnwdBlvHBxNWQtlq79 Ns195IsDgUtQcDGCHmIi2a45Xb/P3Z+7EPxcmZt70LZzdabZaekngU6g+QeeFXYN nUgEbq87EtWuNHXJEpWBRCLCIm8nY+KRNC9mLwJnKKAAUFqu2mpvbMc3NvTbWxIS RtqY4Oa2GVRTuM2vZ5lpz0Q5+1Ey4qjkhMzwDFU2IZLeoakUCyi4xO9XS+ZETcu3 XNlNV3M8sowBj4XMAArfiVoR2xIY5DKvgQzOw6DVfy77lK1Lia5Om4FYx8cfEm4C 7Aw2bsrLk7R9U+bNInvG+LYwGTLoXA== =M/fC -----END PGP SIGNATURE----- --Sig_/R_kMtg6ql9P3mgixA6_p=ad--