Hi Shawn, Thanks for taking a look at this.
On Wed, 2010-08-25 at 16:11 -0700, Shawn Walker wrote: > On 08/24/10 07:18 PM, Tim Foster wrote: > > > > http://cr.opensolaris.org/~timf/12723-usage-webrev > src/client.py: > line 4124: indent should match up with 'cmds' above Ok, I'll fix that - thanks. > I'm not sure I agree with having help exit with 2. An exit code of 2 > implies an error, but if the user specifically asked for help, why would > we exit with an error? Clearly, we did what the user asked for. I agree, that's how it's implemented at the moment, with --help or -? it'll always exit with a 0. Did you spot a case where it's not doing this? It should exit with a 2 if we try to get help for a non-existent subcommand, or use an illegal option eg. $ pkg facet --help Usage: pkg facet [-H] [<facet_spec>] $ echo $? 0 $ pkg help facet Usage: pkg facet [-H] [<facet_spec>] $ echo $? 0 $ pkg facet --noodles pkg facet: illegal option -- noodles Usage: pkg facet [-H] [<facet_spec>] $ echo $? 2 $ pkg --help > /dev/null 2>&1 $ echo $? 0 $ pkg noodles --help > /dev/null 2>&1 $ echo $? 2 cheers, tim _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
