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