From: Alex Kost <alezost@gmail.com>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: 27820@debbugs.gnu.org
Subject: bug#27820: guix package -u: order of argument is significant
Date: Wed, 26 Jul 2017 23:49:19 +0300 [thread overview]
Message-ID: <87379ihqk0.fsf@gmail.com> (raw)
In-Reply-To: <877eyv7ev4.fsf@elephly.net> (Ricardo Wurmus's message of "Wed, 26 Jul 2017 10:59:43 +0200")
Ricardo Wurmus (2017-07-26 10:59 +0200) wrote:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> 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’s
>>> not the case could we just “unread” the argument and parse it as the
>>> next option?
>>
>> I thought about it but in theory “-” is perfectly legitimate, so I
>> thought we’d 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 “-”. And even if we
> did (or the user has some oddly named packages in GUIX_PACKAGE_PATH),
> they could write “^-”. Or we could demand that the argument be quoted
> (“'--foo'” or “"--foo"”) 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.
--
Alex
next prev parent reply other threads:[~2017-07-26 20:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 11:19 bug#27820: guix package -u: order of argument is significant Hartmut Goebel
2017-07-25 19:40 ` Mark H Weaver
2017-07-25 21:11 ` Ludovic Courtès
2017-07-25 21:23 ` Ricardo Wurmus
2017-07-26 8:14 ` Ludovic Courtès
2017-07-26 8:59 ` Ricardo Wurmus
2017-07-26 17:58 ` Mark H Weaver
2017-07-31 21:07 ` Ludovic Courtès
2017-07-26 20:49 ` Alex Kost [this message]
2017-07-26 8:28 ` Hartmut Goebel
2017-07-26 9:03 ` Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87379ihqk0.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=27820@debbugs.gnu.org \
--cc=rekado@elephly.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).