docopt/docopt.java

Inital text omitted

Opened this issue · 2 comments

Initial text in usage file is not ouput as part of usage. Given a usage text of

Insert data into a solr cloud instance that is already up and running.
A prefix of 'java -jar ' is presumed for all usage below.

Usage:
  insert_test_data.jar <zkHost>

I only get the following output:

Usage:
  insert_test_data.jar <zkHost>

What's the point of supporting text above Usage: if it never gets printed...

(this is using the version that was helpfully published to central... 'com.offbytwo:docopt:0.6.0.20150202')

The text above (an below, for that matter) "Usage:" will be printed if the --help option is specified.

Based on what you've described, I assume that you are running your JAR with no arguments. If so, what you are seeing is expected behavior.

Does that help?

Hmm, based on my memory, the clojure one did not require --help. To me that was preferable. Without the initial instructions regarding java -jar, one winds up having to repeat the java -jar on every line which is just a lot of clutter that makes the usage hard to read.

It seems like if there is no options section specifying --help as an option then there shouldn't be a hidden --help option, and everything should print every time.