RFR: 8189102: All tools should support -?, -h and --help

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Mon Nov 20 13:46:49 UTC 2017


Hi Max, 

I think there are so many tools mixing both kinds of
options, that it's rather a gain if all at least document
the same, up to date help message, than if the documentation 
is skipped for some.

After my change, all the help messages are quite similar.
I updated them to use the same wording while trying to
keep the sentence structure in accordance with the other
documented flags, see below.

Best regards,
  Goetz.


 
-? -h --help               display this help message
-? -h --help              display this help message
-h, --help (Print this help message.)
-?, --help                   Print this help message
-? -h --help                 Print this help message
--help, -h, -?  Display command line options and exit
-? -h --help                     Print this help message
-h -? --help                  Print this help message
-? -h --help
-? -h --help          : display this help message and exit
-? -h --help       :  display this help message and exit
-? -h --help      print this help message and exit
-? | -h | --help     to print this help message
jmap -? -h --help  to print this help message
usage: jps [-? -h --help]
-? -h --help to print this help message
-? -h --help  Prints this help message.
-? -h --help print this help message
-? -h --help          Print this synopsis of standard options and exit
Use "keytool -? -h or --help" for all available commands
--help        print this help message to the output stream
-?, -h, --help                       Print this help message
-h, --help, -?                        Print this help message
-?, -h, --help                       Print this help message
-? -h --help         Print this help message and exit
-?, -h, --help                  print this help message
-?, -h, --help                print this help message
-? -h --help           Print this help message
-?, -h, --help[:compat]    Give this, or optionally the compatibility, help
[-? -h --help]              Print this help message
jstatd -?|-h|--help


> -----Original Message-----
> From: Weijun Wang [mailto:weijun.wang at oracle.com]
> Sent: Sonntag, 19. November 2017 01:28
> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>
> Cc: core-libs-dev at openjdk.java.net; compiler-dev at openjdk.java.net;
> serviceability-dev (serviceability-dev at openjdk.java.net) <serviceability-
> dev at openjdk.java.net>
> Subject: Re: RFR: 8189102: All tools should support -?, -h and --help
> 
> I am OK with all commands supporting --help, but I am not sure if every tool
> should show it on the help screen if the tools's other options are still using
> the old single-"-" style. It looks like the tools are half-converted.
> 
> Is there a timetable to add "--" support to all tools?
> 
> Thanks
> Max
> 
> > On Nov 17, 2017, at 7:23 PM, Lindenmaier, Goetz
> <goetz.lindenmaier at sap.com> wrote:
> >
> > Hi,
> >
> > please review this change. I also filed a CSR for this:
> > http://cr.openjdk.java.net/~goetz/wr17/8189102-
> helpMessage/webrev.02/
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8189102
> > CSR: https://bugs.openjdk.java.net/browse/JDK-8191477
> >
> > See the webrev for a detailed description of the changes.
> >
> > If required, I'll make break-out changes to be reviewed separately.
> >
> > I had posted a RFR before, but improved the change to
> > give a more complete overview of currently supported flags
> > for the CSR:
> > http://mail.openjdk.java.net/pipermail/hotspot-dev/2017-
> October/028615.html
> >
> > Best regards,
> >  Goetz.
> >



More information about the compiler-dev mailing list