|
From: | Tobias Geerinckx-Rice |
Subject: | Re: Newbie user question: What do the columns shown by "guix package -I" mean? |
Date: | Sun, 26 Feb 2023 21:31:58 +0100 |
Rodrigo Morales 写道:
Thanks! That's what I was looking for.
I'm glad to hear it!
A related question: I didn't understand the part "retain backwards compatibility with isatty/stderr/etc."
First of all: I worded this poorly, as is my wont. I should have said ‘by using’ instead of ‘with’. We're not trying to be compatible with isatty or stderr…
Wat I meant was Guix could use the ‘isatty’ Guile procedure to show decorate the columns only when the output is a TTY (‘interactive’), or print a header line to ‘stderr’ so it won't be captured by a pipe.
I think that any such solution would be fragile, do the wrong thing in at least one case, and add too much complexity just to sometimes add a header.
Why not simply always add a header?Someone might be using ‘guix package -I’ in a script, and parsing its output. In fact I guarantee you that several people are doing so behind closed doors right now! Adding a header would break such scripts.
I, personally, would welcome breaking their scripts—in exchange for adding a ‘--format=<something machine-readable>’ option like we already do for ‘guix search’. A real API that's actually reliable and supportable. I think that's fair.
I just think I'd be outvoted and don't feel like starting a fight :-)
Kind regards, T G-R
signature.asc
Description: PGP signature
[Prev in Thread] | Current Thread | [Next in Thread] |