Jason McIntyre <j...@kerhand.co.uk> wrote:

> On Wed, Nov 23, 2022 at 11:31:57PM +1059, Reuben mac Saoidhea wrote:
> > i hate to harp on about it, but:
> > 
> > in case you happen to discover the `command' command,
> > beware that its description in sh(1) is wrong.
> > 
> > sh(1) says:
> >     command -vV command args ...
> > 
> 
> actually openbsd's sh(1) pages says:
> 
>       command [-p | -V | -v] command [arg ...]
> 
> > in fact it is:
> >     command -vV command ...
> > 
> 
> yes, -v and -V are different. instead of invoking command, they identify
> information about "command", such as path used to run it.
> 
> so we could do like posix and show two differing forms:
> 
>       command [-p] command_name [argument]
>       command [-p][-v|-V] command_name
> 
> however one of the goals of sh(1) was brevity. to that end it is
> combined, and i think it is obvious that if you are asking "command" to
> identify whether something is a function (or whatever) then it would be
> silly to specify it with arguments.

Correct.  Manual page SYNOPSIS are not a formal exact grammar.

To provide another example,

SYNOPSIS
     ls [-1AaCcdFfgHhikLlmnopqRrSsTtux] [file ...]

I suspect there are mixtures ls arguments which create highly unexpected
results, or even terminate the ls command before outputting an unexpected
result.  That is fine.  We document the wider end of the possibility
spectrum, not the narrow.

All of us are sick of this thread.  It contains no solutions.  I'm now
going to say that a solution for one manual pages, must provide diffs
for *all the commands in bin* as a starting proposal..  That won't happen,
so let's just stop it.

Reply via email to