I'll weigh in:

  ed -p '' should provide an empty prompt (no error).
  ed -p''  should produce an error.

Contrary to Antonio's assertion as I understand it, empty arguments are very common and useful as place-holders. For instance in the context of a script:

  ed -p "$an_unset_variable"  file

should never be the equivalent of

  ed -p file

Moreover, POSIX tends to lean towards permissiveness (e.g., using 0 as an address), so if where there's ambiguity, don't generate an error if there's a reasonable alternative.

I appreciate that there are option parsers which require an argument to follow directly after a short option - e.g.,

  cmd -oarg

works but

  cmd -o arg

does not.  That's a bug in the option parser and a separate issue.
-AM

Reply via email to