#999708 posh(1) man page: -c description is incorrect

Package:
posh
Source:
posh
Description:
Policy-compliant Ordinary SHell
Submitter:
Vincent Lefevre
Date:
2021-11-15 12:24:03 UTC
Severity:
normal
#999708#5
Date:
2021-11-15 12:20:49 UTC
From:
To:
In the posh(1) man page:

SYNOPSIS
       posh [+-aCefilnuvx] [+-o option]
            [[-c command-string [command-name] | -s | file ] [argument...]]
[...]
       -c command-string
           the shell executes the command(s) contained in command-string

This is incorrect. "-c" is not an option that takes a string argument,
but an option that takes 0 arguments: when one writes "posh -c foo",
"foo" is an argument of posh, not an argument of the -c option.

The difference is that one may have other options between "-c" and
the actual arguments. So

  posh -c -- "echo foo"

will execute "echo foo", not "--".

As a comparison, see the bash(1), dash(1) and ksh93(1) man pages.

However, the mksh(1) man page has the same issue (I reported the bug).