[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ed -p '' errors, but shouldn't
From: |
Antonio Diaz Diaz |
Subject: |
Re: ed -p '' errors, but shouldn't |
Date: |
Fri, 14 Jun 2024 16:44:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 |
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.
Re: ed -p '' errors, but shouldn't, Antonio Diaz Diaz, 2024/06/13
- Re: ed -p '' errors, but shouldn't, jackson, 2024/06/13
- Re: ed -p '' errors, but shouldn't, jackson, 2024/06/13
- Re: ed -p '' errors, but shouldn't, Alexander Jones, 2024/06/14
- Re: ed -p '' errors, but shouldn't,
Antonio Diaz Diaz <=