GNU bug report logs -
#40549
[usability] revert last generation
Previous Next
Reported by: Tom Zander <tomz <at> freedommail.ch>
Date: Sat, 11 Apr 2020 09:25:01 UTC
Severity: normal
Done: zimoun <zimon.toutoune <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Tue, 12 May 2020 at 10:51, Ludovic Courtès <ludo <at> gnu.org> wrote:
> Nothing new here, and everything is properly documented.
Using optional argument with short-option names is unusual, AFAIK.
And for sure, there is an ambiguity; as we are seeing here. :-)
However, the only mention of that is in the commentaries of srfi-37.
--8<---------------cut here---------------start------------->8---
;;; `required-arg?' and `optional-arg?' are mutually exclusive
;;; booleans and indicate whether an argument must be or may be
;;; provided. Besides the obvious, this affects semantics of
;;; short-options, as short-options with a required or optional
;;; argument cannot be followed by other short options in the same
;;; program-arguments string, as they will be interpreted collectively
;;; as the option's argument.
--8<---------------cut here---------------end--------------->8---
http://git.savannah.gnu.org/cgit/guile.git/tree/module/srfi/srfi-37.scm#n51
Well, using short-option with optional-argument is not recommended by
POSIX, neither GNU (if I understand well)
https://pubs.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap12.html#tag_12_02
https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
Therefore, it deserves to document it, IMHO.
This bug report was last modified 3 years and 259 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.