GNU bug report logs - #50296
[PATCH 0/2] Add 'guix home' command.

Previous Next

Package: guix-patches;

Reported by: Andrew Tropin <andrew <at> trop.in>

Date: Tue, 31 Aug 2021 09:31:01 UTC

Severity: normal

Tags: patch

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #43 received at 50296 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Tropin <andrew <at> trop.in>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 50296 <at> debbugs.gnu.org
Subject: Re: [bug#50296] [PATCH 1/2] scripts: Add 'guix home'.
Date: Wed, 01 Sep 2021 08:20:17 +0300
[Message part 1 (text/plain, inline)]
On 2021-08-31 15:09, zimoun wrote:

> Hi,
>
> On Tue, 31 Aug 2021 at 14:12, Andrew Tropin <andrew <at> trop.in> wrote:
>> On 2021-08-31 12:53, zimoun wrote:
>> > On Tue, 31 Aug 2021 at 12:40, Andrew Tropin <andrew <at> trop.in> wrote:
>> >
>> >> +(define-command (guix-home . args)
>> >> +  (synopsis "build and deploy home environments")
>> >> +
>> >> +  (define (parse-sub-command arg result)
>> >> +    ;; Parse sub-command ARG and augment RESULT accordingly.
>> >> +    (if (assoc-ref result 'action)
>> >> +        (alist-cons 'argument arg result)
>> >> +        (let ((action (string->symbol arg)))
>> >> +          (case action
>> >> +            ((build
>> >> +              reconfigure
>> >> +              extension-graph shepherd-graph
>> >> +              list-generations describe
>> >> +              delete-generations roll-back
>> >> +              switch-generation search
>> >> +              import)
>> >> +             (alist-cons 'action action result))
>> >> +            (else (leave (G_ "~a: unknown action~%") action))))))
>> >
>> > For parsing the actions, I would define elsewhere the list.  Then if the
>> > action is unknown, you could use ’string-closest’ and so return an hint
>> > if there is a typo.
>
> [...]
>
>> Sounds good, the same "issue" exists for guix system subcommands, it
>> would be cool to have such functionality, but I would like to have those
>> changes to both guix system and guix home after wip-guix-home merged,
>> because backporting changes to rde is a little tedious.
>
> Your point is to hint both "guix system" and "guix home" in the same
> time because they share the same pattern.  Right?
>
>> Also, it seems related to subcommands/--arguments discussion and maybe
>> better to talk about it in a separate thread.
>
> Yes, and from my understanding, your answer is keep consistency with
> "guix system". :-)
>
> Cheers,
> simon

Yep, corret (:

[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 339 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.