Alexander Jones wrote:
We should also consider that Arg_parser (where the issue originates)
is used by more than just ed. I use it for my personal C/C++ projects,
and other consumers may need null-string arguments.
Glad to know that someone found Arg_parser useful. :-)
I wrote Arg_parser to only accept non-empty option-arguments because I have
never found an use for empty option-arguments. (And nobody ever requested
support for empty option-arguments in arg-parser-bug).
I have found just one POSIX utility that accepts an empty option-argument
(join -e ""), and it does not seem to do anything useful. (It replaces empty
fields with the empty string, changing nothing).
This said, I can easily extend Arg_parser to accept four types of
option-arguments to cover all possibilities (if someone finds an use for 'yme'):
no = 'no argument'
yes = 'non-empty argument required'
maybe = 'optional argument'
yme = 'argument required, but it may be the empty string'
Best regards,
Antonio.