From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qDPRFroKvV4pOgAA0tVLHw (envelope-from ) for ; Thu, 14 May 2020 09:09:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sAAgEboKvV6KYgAAB5/wlQ (envelope-from ) for ; Thu, 14 May 2020 09:09:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 46A8F94053E for ; Thu, 14 May 2020 09:09:11 +0000 (UTC) Received: from localhost ([::1]:40436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZ9rb-0002e1-So for larch@yhetil.org; Thu, 14 May 2020 05:09:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZ9rS-0002Yk-O4 for bug-guix@gnu.org; Thu, 14 May 2020 05:09:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48681) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZ9rS-0001jI-C9 for bug-guix@gnu.org; Thu, 14 May 2020 05:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZ9rS-0007bJ-6q for bug-guix@gnu.org; Thu, 14 May 2020 05:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#40549: More usability issues: Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 14 May 2020 09:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40549 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Arne Babenhauserheide X-Debbugs-Original-Cc: 40549@debbugs.gnu.org, Tom Zander , bug-guix@gnu.org Received: via spool by 40549-submit@debbugs.gnu.org id=B40549.158944730329161 (code B ref 40549); Thu, 14 May 2020 09:09:02 +0000 Received: (at 40549) by debbugs.gnu.org; 14 May 2020 09:08:23 +0000 Received: from localhost ([127.0.0.1]:60226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZ9qp-0007aG-9V for submit@debbugs.gnu.org; Thu, 14 May 2020 05:08:23 -0400 Received: from mail-qt1-f176.google.com ([209.85.160.176]:39384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZ9qn-0007Zr-RV for 40549@debbugs.gnu.org; Thu, 14 May 2020 05:08:22 -0400 Received: by mail-qt1-f176.google.com with SMTP id l1so2246571qtp.6 for <40549@debbugs.gnu.org>; Thu, 14 May 2020 02:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=5g1MYKtBgdkCpnQgMpXleMlxs+cU+alC74x6Ot30COI=; b=KkFs7h2fNp4QcUwp5/3Tv2taE1YIz9j7ZANCVQfj08xwQV+MHWTlEppIyblrFMVqxq XZhXwYfOJrGuvDnAwQ9Bm8KAr0DdT4dx/6BDvvX0ho6SXnk65WEpIroT4O98un3pVqP/ zpkzvW38eTCvHkfJ/Ns7O6zDOCPP13OUYjp/s4XJ6IU6vHgSnrNKapflm9Qqivg7qyxK HyfUMFcYZ50wPJgS8f5obBVnLQBEPeGMz6U3puWw+7acpDgK0WpuCljb6dbs3S6EteXe xgkeRC7sDsQ65I75c9JkHcbVpcU7WOWIlBcfE8sr5wxy1D1ACvcpkTRPWhrCGhKmFvbR 7gnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=5g1MYKtBgdkCpnQgMpXleMlxs+cU+alC74x6Ot30COI=; b=BtPrK/ylLQZpayuRfp+acGbzFZiWbMCv4mrQq4Mk3bfAEa/T50X9rWV0bFUBzt9Y+d iCrEafRMu55VGvRBvIcG9ZzCDVs23SpfaIQJTGAZDUH1t8OlvfDFRu6xx1uL1Y4sfxKg ZwZEc/KgFwYLTGgXXvk021mPPlL/ZZB40T65gdHnukUx1v+hPijXa9oH7LERpuibG7RI U8ec/SkLe/l6IqOvd/DPtcLDuZphGR/L1rueTVa/bjbiQmZ4bi2l6TEhL9DI7yUwSR6j 51cTBa62qK9bsD7d6nCoPDcZ3NevAAN7XqF8gVd5GCYB3V2yEEyzL6YVdF51afW2v1Ce 2S1g== X-Gm-Message-State: AOAM532nGFv0E0DuksoVzgmkNBH8E1XSQn52rDBxiqosf1UpPSzu/rej z0nINQ3kRJ5BXf1p9jq62A76ytYw1vkflBW7w8c= X-Google-Smtp-Source: ABdhPJxOpWn7XCzDzqPolcJHzmA/IhH9hPiR4vyWSoLmdXNTszEwn8JNdU362JF1vL9htuBSvJeON7PshQNsBiKiNTY= X-Received: by 2002:aed:3949:: with SMTP id l67mr3202988qte.313.1589447296198; Thu, 14 May 2020 02:08:16 -0700 (PDT) MIME-Version: 1.0 References: <6171889.DvuYhMxLoT@cherry> <1804825.CQOukoFCf9@cherry> <5565734.MhkbZ0Pkbq@cherry> <87zhabx0br.fsf@web.de> <87o8qrwts1.fsf@web.de> In-Reply-To: <87o8qrwts1.fsf@web.de> From: zimoun Date: Thu, 14 May 2020 11:08:04 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 40549@debbugs.gnu.org, tomz@freedommail.ch Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 X-Spam-Score: 1.59 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=KkFs7h2f; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Scan-Result: default: False [1.59 / 13.00]; GENERIC_REPUTATION(0.00)[-0.53934313198111]; MX_INVALID(1.00)[cached]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; R_DKIM_REJECT(1.00)[gmail.com:s=20161025]; DWL_DNSWL_BLOCKED(0.00)[209.51.188.17:from]; FREEMAIL_FROM(0.00)[gmail.com]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.05), country: US(-0.00), ip: 209.51.188.17(-0.54)]; DKIM_TRACE(0.00)[gmail.com:-]; MAILLIST(-0.20)[mailman]; FREEMAIL_TO(0.00)[web.de]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[zimontoutoune@gmail.com,bug-guix-bounces@gnu.org]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[draketo.de:url,gnu.org:url]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[40549@debbugs.gnu.org]; HAS_LIST_UNSUB(-0.01)[]; DNSWL_BLOCKED(0.00)[209.51.188.17:from]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : SPF not aligned (relaxed),none] X-TUID: XbDhmC/1Pmkh Dear Arne, On Wed, 13 May 2020 at 20:53, Arne Babenhauserheide wrote= : > zimoun writes: > > It would like it works. And to do so, I accept that "guix package -I > > regexp -p /tmp/profile" does not anymore and would be replaced by > > "guix package -Iregexp -p /tmp/profile" which already works (as > > specified by SRFI-37). > > Wow, this surprised me. I expected > > guix package -Iregexp > > to be equivalent to > > guix package -I -r -e -g -e -x -p > > which is how getopt long works in the shell. I am not familiar with getopt but I think getopt does what the POSIX specif= ies. Your expectation is legitimate when all the flags does not require a mandatory argument. For example, ls -artl but it is not true when one of the flags requires one mandatory argument, for example, ls -aIrtl then 'rtl' is seen as the argument of the option '-I, --ignore=3D'. Well, the correct is: ls -aI '' -rtl And the specification e.g., [1], says that "ls -aI'' -rtl" should too; as for example "cut -f1 -d" and "cut -f 1 -d" both are allowed. I should misread but all that perfectly works and is clearly specified by SRFI-37. What is missing is the corner case: how to deal with short-name option with optional argument? There is 2 incompatible rules as I try to explain here [2]. The choice of the Guile implementation leads to break the permutation rule for the short-name with optional argument and maintain consistency with the space between flag and argument. Another choice is to break the consistency with the space between flag and argument and so it does not break the permutation rule; as Tom mentioned with the Git example of '-S[], --gpg-sign[=3D]'. The issue is that the semantic of short-name of optional argument is ambiguous considering all the other rules. [1] https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html [2] http://issues.guix.gnu.org/40549#16 > > Instead of what I am proposing, what do you suggest? > > What I would suggets would break -Iregexp and as such deviate from > SRFI-37, so it wouldn=E2=80=99t be optimal. Just to note that the Guile implementation of SRFI-37 is "aware" of this corner case as it is mentioned in their commentary, already said here [3]. :-) http://git.savannah.gnu.org/cgit/guile.git/tree/module/srfi/srfi-37.scm#n51 [3] http://issues.guix.gnu.org/40549#10 > It would first need another SRFI so it=E2=80=99s no shortterm fix :-) >From my point of view, different fixes are possible depending on what we accept to break (here for "guix package" and probably similar cases with other subcommand exist): - nothing =3D> improve the manual - remove the short-name -u, -l, -d, -I, -A - remove the argument for the short-name and keep it for the long-name onl= y. - remove '-X value' and allow only -'Xvalue' for X in {u, l, d, I, A} =3D> new / amend SRFI-37 - other that my imagination is missing Well, I have asked advices on guile-user [4]. I do not know if the issue could be seen as a bug of SRFI-37. [4] https://lists.gnu.org/archive/html/guile-user/2020-05/msg00034.html > The commandline handling I want is this: > https://www.draketo.de/english/free-software/shell-argument-parsing Thank you for the link. For my understanding -- even after reading the stackoverflow link -- your handling does not address the short-name with optional argument. Does it mean you consider that should not happen? Best regards, simon