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: Steve Sprang
Subject: [bug#30053] [PATCH 1/3] Improve appearance of tabular output.
Date: Thu, 11 Jan 2018 15:32:35 -0800

Hi Ludovic,

On Thu, Jan 11, 2018 at 1:32 PM, Ludovic Courtès <address@hidden> wrote:
> Long time no see!  ;-)

Yeah, it's been a while!

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

I'm still inserting a tab between columns, so I believe 'cut' still
works as expected in this case. Initially, I was separating columns
with a few spaces, but that broke some of the tests that were relying
on cut, so I switched back to tab.

> An example from the manual (info "(guix) Invoking guix build"):
>
>      guix build --quiet --keep-going \
>        `guix package -A | cut -f1,2 address@hidden

Argh, this use case fails because of the extra inserted whitespace.

> 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?  :-)

Another potential drawback of this patch is that it tends to make
output lines longer than before. This might make line-wrapping less
pleasant when using smaller terminal windows/screens.

-Steve





reply via email to

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