Subject: bug#40549: More usability issues:

From: zimoun <[email-masked]>
Date: Wed, 13 May 2020 20:02:03 +0200

Dear Arne,

On Wed, 13 May 2020 at 18:32, Arne Babenhauserheide <[email-masked]> wrote:

> And please don’t do radical changes on guix package. That would break
> the workflow of every slightly longer term guix user.

I do not want to do radical changes.  The parser of the command-line
is SRFI-37.  So it is documented and the command-line follows guide
lines that will not change.

The change I am asking for is only the short-name option with optional
argument.  In such case the optional argument is not optional.  Other
said, the issue is rooted in a bad practise and, AFAIK, Guix does not
follow what other GNU tools follow: no short-name with optional
argument.  And the Guile implementation of SRFI-37 says that the
semantic of short-name with optional argument leads to an issue.  But
now, it is here so what do we do?

In the end, there is annoyance.  And the goal is to discuss what could
be changed to reduce the annoyance, on all sides.

For example, I am always annoyed by:

   guix package -I -p /tmp/profile

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).

Today, the Guix manual is lying because the optional argument for
short-name is *not* optional depending on its position.  And that
leads to surprise:

   guix package -I -p /tmp/profile # fails
   guix package -p /tmp/profile -I # works

And this is really really annoying!  It is hard to understand why such
different behaviour.

Instead of what I am proposing, what do you suggest?

Best regards,
simon