guix-patches
[Top][All Lists]
Advanced

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

[bug#30053] [PATCH 1/3] Improve appearance of tabular output.


From: Ludovic Courtès
Subject: [bug#30053] [PATCH 1/3] Improve appearance of tabular output.
Date: Thu, 11 Jan 2018 22:32:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello Steve,

Long time no see!  ;-)

Steve Sprang <address@hidden> 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’m afraid: the reason columns look
this way is because they are tab-separated, which in turn makes it easy
to filter with ‘cut’:

--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 address@hidden

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’.





reply via email to

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