codehaus


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?


On 2020-10-16 at 10:59:16 +1100,
Samuel Marks <samuelmarks at gmail.com> wrote:

> --optimizer Adam,learning_rate=0.01,something_else=3
> 
> That syntax isn?t so bad! =]
> 
> How would you suggest the help text for this looks? (don?t worry about
> implementation, just what goes to stdout/stderr)

    --optimizer name[,option=value...]

Obviously, you'll have to explain that the brackets and the words option
and value are meta syntax, but you're probably already doing that for
your current meta syntax anyway.