[PATCH] Fix option parser: treat current option as argument of the prvious option
simon.mcvittie at collabora.co.uk
Mon Apr 8 03:05:18 PDT 2013
On 08/04/13 05:49, Chengwei Yang wrote:
> There is a bug in option parser if the previous option need an argument.
> In that case, the current option will be treated as argument of the
> previous option regardless what in fact it is.
This is a very common convention for command-line tools. I don't think
this is a bug. Use --print-pid=1, --print-address=1 (making the default
- in this case stdout - explicit) instead of the form with no argument.
Arguably, command-line options with an optional argument are a design
flaw - each command-line option should either have a mandatory argument
or no argument - but for dbus-daemon it's too late, since we already
have --print-address[=DESCRIPTOR] and --print-pid[=DESCRIPTOR].
More information about the dbus