From: "Linus Björnstam" <linus.internet@fastmail.se>
To: zimoun <zimon.toutoune@gmail.com>, "Guile User" <guile-user@gnu.org>
Subject: Re: SRFI-37 and short-name option with optional argument
Date: Tue, 12 May 2020 22:28:50 +0200 [thread overview]
Message-ID: <ed63b262-aa6f-4ea9-b681-4e893d537b3f@www.fastmail.com> (raw)
In-Reply-To: <CAJ3okZ1VpMdPw+j_qyPCwSPYRNJmL1b+hDcH-HkuvPic1-ddMQ@mail.gmail.com>
I Sony have an answer to your question, but using (ice-9 getopt-long)is usually the library guilers reach for unless they want to install third party libraries: https://www.gnu.org/software/guile/manual/html_node/getopt_002dlong.html#getopt_002dlong
--
Linus Björnstam
On Tue, 12 May 2020, at 22:14, zimoun wrote:
> Dear,
>
> The semantic of short-name option with optional argument is not clear
> as the comment says:
>
> http://git.savannah.gnu.org/cgit/guile.git/tree/module/srfi/srfi-37.scm#n58
>
> Let consider that the option '-a, --long-a' has an optional argument
> and '-b, --long-b' another option. Currently, from my tests using
> SRFI-37:
>
> -a X -b # OK (1)
> -aX -b # OK (2)
> --long-a -b # OK
>
> -a -b # KO (3)
>
> The semantic of (3) is ambiguous, obviously. :-)
>
> So, it seems that the argument is not optional for the short-name
> case. One way to resolve such case is to remove the form (1) when the
> short-name '-a' accepts an optional argument.
>
> Does it make sense?
>
>
> Thank you in advance for your wise advice.
>
> Best regards,
> simon
>
>
next prev parent reply other threads:[~2020-05-12 20:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 20:14 SRFI-37 and short-name option with optional argument zimoun
2020-05-12 20:28 ` Linus Björnstam [this message]
2020-05-15 15:21 ` zimoun
2020-05-15 17:04 ` Zelphir Kaltstahl
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://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed63b262-aa6f-4ea9-b681-4e893d537b3f@www.fastmail.com \
--to=linus.internet@fastmail.se \
--cc=guile-user@gnu.org \
--cc=zimon.toutoune@gmail.com \
/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.
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).