unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Re: Long command line arguments using SRFI 37
@ 2019-01-06 12:07 tantalum
  2019-01-06 22:57 ` Zelphir Kaltstahl
  0 siblings, 1 reply; 6+ messages in thread
From: tantalum @ 2019-01-06 12:07 UTC (permalink / raw)
  To: zelphirkaltstahl; +Cc: guile-user

i dont know if it is possible, but the source code of srfi-37 is available, on my machine it is at /usr/share/guile/2.2/srfi/srfi-37.scm. i didnt see an option for the "--name value" case at first glance.

apparently the --name=value syntax is to allow for long options with optional values. otherwise "--name value" and "value --name" might be ambiguous. https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html

from the linked code:
     ;; seed - What is the seed???

seed is the initial value for what is "loads" in the code. it is the initial value for what eventually becomes the result of the call to args-fold. like the init parameter of fold.



^ permalink raw reply	[flat|nested] 6+ messages in thread
* Long command line arguments using SRFI 37
@ 2019-01-04 18:55 Zelphir Kaltstahl
  2019-01-04 20:04 ` Amirouche Boubekki
  2019-01-05 13:22 ` Catonano
  0 siblings, 2 replies; 6+ messages in thread
From: Zelphir Kaltstahl @ 2019-01-04 18:55 UTC (permalink / raw)
  To: guile-user

Hi Guile Users,

I have a question regarding the usage of SRFI 37. Is it possible to have
long arguments, which one can use as follows:

guile main.scm --argument value

This is what I am used to with other command line programs. It seems to
me, when I use SRFI 37, I can only get it to allow the following style
of command line arguments:

guile main.scm --argument=value
guile main.scm --argument="some value"

It is not really a big issue, but I think it would still be great to
have a way of allowing the first style as well, as I just spend an hour
or so trying to figure out what was wrong with my program, until I took
a look at my example code (see link below) again and checked how it
behaved with style 1 and noticed it has the same error.

I have the example code, where I am trying to use SRFI 37, on:

https://gitlab.com/zelphir-kaltstahl-projects/guile-scheme-tutorials-and-examples/blob/dev/command-line-arguments/using-srfi-37.scm

Maybe I am missing something or doing something wrong?

Regards,

Zelphir



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

end of thread, other threads:[~2019-01-07 14:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-06 12:07 Long command line arguments using SRFI 37 tantalum
2019-01-06 22:57 ` Zelphir Kaltstahl
  -- strict thread matches above, loose matches on Subject: below --
2019-01-04 18:55 Zelphir Kaltstahl
2019-01-04 20:04 ` Amirouche Boubekki
2019-01-05 13:22 ` Catonano
2019-01-07 14:08   ` Zelphir Kaltstahl

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