From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: bug#27820: guix package -u: order of argument is significant Date: Wed, 26 Jul 2017 23:49:19 +0300 Message-ID: <87379ihqk0.fsf@gmail.com> References: <5977294D.1020304@crazy-compilers.com> <87fudkb8zm.fsf@netris.org> <8760egcjdc.fsf@gnu.org> <87eft46wir.fsf@elephly.net> <874ltzbool.fsf@gnu.org> <877eyv7ev4.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daTFv-0004Gu-K3 for bug-guix@gnu.org; Wed, 26 Jul 2017 16:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daTFq-0006ES-PK for bug-guix@gnu.org; Wed, 26 Jul 2017 16:50:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55049) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1daTFq-0006EI-Le for bug-guix@gnu.org; Wed, 26 Jul 2017 16:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1daTFq-0000W7-Fu for bug-guix@gnu.org; Wed, 26 Jul 2017 16:50:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <877eyv7ev4.fsf@elephly.net> (Ricardo Wurmus's message of "Wed, 26 Jul 2017 10:59:43 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ricardo Wurmus Cc: 27820@debbugs.gnu.org Ricardo Wurmus (2017-07-26 10:59 +0200) wrote: > Ludovic Court=C3=A8s writes: > >> Ricardo Wurmus skribis: [...] >>> This seems good to me. I just wonder if there are legitimate cases >>> where a package regexp would look like a command line option. If that= =E2=80=99s >>> not the case could we just =E2=80=9Cunread=E2=80=9D the argument and pa= rse it as the >>> next option? >> >> I thought about it but in theory =E2=80=9C-=E2=80=9D is perfectly legiti= mate, so I >> thought we=E2=80=99d rather not try to be smart. Thoughts? > > Is it really legitimate? The regular expression is supposed to match on > package names and we have no packages starting with =E2=80=9C-=E2=80=9D. = And even if we > did (or the user has some oddly named packages in GUIX_PACKAGE_PATH), > they could write =E2=80=9C^-=E2=80=9D. Or we could demand that the argum= ent be quoted > (=E2=80=9C'--foo'=E2=80=9D or =E2=80=9C"--foo"=E2=80=9D) in that case. > > It just seems like a really rare edge case to *want* it to behave as it > does now. I am on "not try to be smart" side. Mark described why "-foo" is a legitimate regexp, so I think it's better to allow users to be free in a choice of regexps. --=20 Alex