On Sun, Jun 09, 2024 at 07:37:14PM +0200, Antonio Diaz Diaz wrote:
> It is simple. Posix states that for an option with a mandatory
> option-argument, as with '-p <string>', the following two forms must be
> equivalent:
> 
>   -p <string>
>   -p<string>
> 
> This is only possible if <string> is not the empty string.
> 
> So, AFAICT, ed's current behavior is the only one that meets the above POSIX
> requirement.

I am sorry, but I really can't understand how your logic even makes
sense:  ed -p '' foo   is not equivalent to  ed -p'' foo  in GNU ed.
Just like  ed -p foo  (i.e.  ed -p'' foo  ) is not equivalent to
ed -p '' foo  in GNU ed.

Anyway you can only see an ambiguity if you grossly misinterpret the
text, I just can't see it.

Both the text of getopt and utility syntax guidelines are just saying
that  -pfoo  should be accepted as equivalent to  -p foo

o/
 emanuele6

Reply via email to