unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Guile User <guile-user@gnu.org>
Subject: SRFI-37 and short-name option with optional argument
Date: Tue, 12 May 2020 22:14:21 +0200	[thread overview]
Message-ID: <CAJ3okZ1VpMdPw+j_qyPCwSPYRNJmL1b+hDcH-HkuvPic1-ddMQ@mail.gmail.com> (raw)

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



             reply	other threads:[~2020-05-12 20:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 20:14 zimoun [this message]
2020-05-12 20:28 ` SRFI-37 and short-name option with optional argument Linus Björnstam
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=CAJ3okZ1VpMdPw+j_qyPCwSPYRNJmL1b+hDcH-HkuvPic1-ddMQ@mail.gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guile-user@gnu.org \
    /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).