guix-patches
[Top][All Lists]
Advanced

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

[bug#33448] [PATCH] describe: Add json format.


From: Ludovic Courtès
Subject: [bug#33448] [PATCH] describe: Add json format.
Date: Wed, 21 Nov 2018 22:36:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Oleg Pykhalov <address@hidden> skribis:

> address@hidden (Ludovic Courtès) writes:

[...]

>> Last question: what use case do you have in mind regarding the JSON
>> format?  I’m asking because we don’t have tools that can consume it so
>> far.
>
> Well, I wanted to get a command line way to select things in ‘guix
> channel’ output, e.g. to get a current ‘guix’ channel commit:
>
> ./pre-inst-env guix describe --profile=$HOME/.config/guix/current 
> --format=json | jq --raw-output 'map(select(.name == "guix"))'[0].commit
>
>
> I didn't think that ‘recsel’ actually could be used in the same way:
>
> ./pre-inst-env guix describe --profile=$HOME/.config/guix/current 
> --format=recutils | recsel -e 'name = "guix"' -P commit

I see, that makes sense.  It’s OK to have both JSON and recutils.

Thank you!

Ludo’.





reply via email to

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