[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66358: Some options are really subcommands + ignore arguments
From: |
Maxim Cournoyer |
Subject: |
bug#66358: Some options are really subcommands + ignore arguments |
Date: |
Tue, 24 Oct 2023 10:48:18 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi Simon,
Simon Tournier <zimon.toutoune@gmail.com> writes:
> Hi,
>
> On Mon, 09 Oct 2023 at 14:25, Tobias Geerinckx-Rice via Bug reports
> for GNU Guix <bug-guix@gnu.org> wrote:
>
>> I think it would be less surprising if these ‘single, mutually exclusive
>> actions’ should always be (sub)subcommands, e.g., ‘guix archive import’,
>> ‘guix archive authorize’, …
>
> I am proposing to error for ambiguous cases as,
>
> $ ./pre-inst-env guix archive --import --authorize hello < /tmp/hello.nar
> guix archive: error: ambiguous options: "authorize" with "import"
>
> See attached patch. WDYT?
>
> Please note that it errors when at least 2 options are ambiguous. So if
> there is 3, you get the “two first ones“.
It seems a reasonable improvement to me, but I think *all* the
incompatible errors should be accumulated and printed in one go.
--
Thanks,
Maxim