From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZkTB-0004X2-CB for guix-patches@gnu.org; Thu, 11 Jan 2018 16:33:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZkT8-0000Am-5i for guix-patches@gnu.org; Thu, 11 Jan 2018 16:33:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:44655) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eZkT7-0000AA-T7 for guix-patches@gnu.org; Thu, 11 Jan 2018 16:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eZkT7-0002dB-K7 for guix-patches@gnu.org; Thu, 11 Jan 2018 16:33:01 -0500 Subject: [bug#30053] [PATCH 1/3] Improve appearance of tabular output. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: Date: Thu, 11 Jan 2018 22:32:29 +0100 In-Reply-To: (Steve Sprang's message of "Tue, 9 Jan 2018 14:34:46 -0800") Message-ID: <878td4nksy.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Steve Sprang Cc: 30053@debbugs.gnu.org Hello Steve, Long time no see! ;-) Steve Sprang skribis: > I noticed when listing installed or available packages that the output > is often pretty jumbled up because columns in each row have an > inconsistent width. > > This series of patches adds a new procedure for printing tabular data > (pretty-print-table) and modifies the code for --list-installed, > --list-available, and --list-generations to utilize it. I have a disappointing explanation I=E2=80=99m afraid: the reason columns l= ook this way is because they are tab-separated, which in turn makes it easy to filter with =E2=80=98cut=E2=80=99: --8<---------------cut here---------------start------------->8--- $ guix package -A | cut -f1 | head 0ad 0ad-data 0xffff 4store 4ti2 a2ps aalib abbaye abc abcde --8<---------------cut here---------------end--------------->8--- An example from the manual (info "(guix) Invoking guix build"): guix build --quiet --keep-going \ `guix package -A | cut -f1,2 --output-delimiter=3D@` The idea was to have this shell-scripting-friendly format, and to provide fancier output in other commands, such as --search (which is in fact script-friendly as well thanks to recutils). Silly? Awesome? Ugly? What do people think? :-) Thank you, Ludo=E2=80=99.