all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Guix command line flag consistency
@ 2017-04-14 20:57 Mike Swierczek
  2017-04-15 17:43 ` Hartmut Goebel
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Swierczek @ 2017-04-14 20:57 UTC (permalink / raw)
  To: guix-devel

Hello.  I started taking GuixSD for a spin and love it.   Thanks for all 
of your work!

I hope this question isn't too elementary.

I see that the 'guix package' command line tool, and possibly all of the 
Guix command line tools, use the Scheme SRFI 37 convention for argument 
handling.   It seems a little unintuitive to me as an outsider trying to 
learn Guix.  I wrote 'guix package --search git' and got an error message.

I'd much prefer if both the short and long command line arguments 
accepted their argument in any arrangement.
--long-flag=foo
--long-flag foo
--long-flagfoo
-short-flag=foo
-short-flag foo
-short-flagfoo

Obviously this is a headache for the persons writing the command line 
parser.  But I think it's more friendly to people new to the project.  
What do you think?

-Mike

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Guix command line flag consistency
  2017-04-14 20:57 Guix command line flag consistency Mike Swierczek
@ 2017-04-15 17:43 ` Hartmut Goebel
  2017-04-15 19:34   ` Mike Swierczek
  0 siblings, 1 reply; 4+ messages in thread
From: Hartmut Goebel @ 2017-04-15 17:43 UTC (permalink / raw)
  To: guix-devel

Am 14.04.2017 um 22:57 schrieb Mike Swierczek:
> I'd much prefer if both the short and long command line arguments
> accepted their argument in any arrangement. 

I also stumbled over "--show=foo" failing. I suggest guix should follow
the GNU command lien parsing conventions. Maybe this could be extended
with the possibility to unambiguous shorten long options.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Guix command line flag consistency
  2017-04-15 17:43 ` Hartmut Goebel
@ 2017-04-15 19:34   ` Mike Swierczek
  2017-04-22 22:46     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Swierczek @ 2017-04-15 19:34 UTC (permalink / raw)
  To: guix-devel

On 04/15/2017 01:43 PM, Hartmut Goebel wrote:

> Am 14.04.2017 um 22:57 schrieb Mike Swierczek:
>> I'd much prefer if both the short and long command line arguments
>> accepted their argument in any arrangement.
> I also stumbled over "--show=foo" failing. I suggest guix should follow
> the GNU command lien parsing conventions. Maybe this could be extended
> with the possibility to unambiguous shorten long options.
>
Good idea on unambiguous shortening of long options.  That sounds good too.

I don't mind trying to implement all of this, I just want to make sure 
the team likes the idea first.

-Mike

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Guix command line flag consistency
  2017-04-15 19:34   ` Mike Swierczek
@ 2017-04-22 22:46     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2017-04-22 22:46 UTC (permalink / raw)
  To: Mike Swierczek; +Cc: guix-devel

Hello,

Mike Swierczek <mike@swierczek.io> skribis:

> On 04/15/2017 01:43 PM, Hartmut Goebel wrote:
>
>> Am 14.04.2017 um 22:57 schrieb Mike Swierczek:
>>> I'd much prefer if both the short and long command line arguments
>>> accepted their argument in any arrangement.
>> I also stumbled over "--show=foo" failing. I suggest guix should follow
>> the GNU command lien parsing conventions. Maybe this could be extended
>> with the possibility to unambiguous shorten long options.
>>
> Good idea on unambiguous shortening of long options.  That sounds good too.
>
> I don't mind trying to implement all of this, I just want to make sure
> the team likes the idea first.

An interesting option (heh!) would be to implement what argp does, which
is to allow users to write a prefix of the long option if it’s
unambiguous:

  https://www.gnu.org/software/libc/manual/html_node/Argp.html

Apart from that, the conventions we follow are indeed those:

  https://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html

though the parser we use, (srfi srfi-37), has small differences.

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-22 22:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-14 20:57 Guix command line flag consistency Mike Swierczek
2017-04-15 17:43 ` Hartmut Goebel
2017-04-15 19:34   ` Mike Swierczek
2017-04-22 22:46     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.