On Tue, 12 May 2020 at 10:51, Ludovic Courtès <[email protected]> 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.
