summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCedric Beust <cedric@beust.com>2012-07-04 13:23:31 -0700
committerCedric Beust <cedric@beust.com>2012-07-04 13:23:31 -0700
commitc675ef5201552ed809a1cb12e18f2fc3e25a7c9a (patch)
treeba05d29f0fb3584b69ba5a89604976c6f0f1404a /doc
parent369d387138b6da9e77e01d82273ef6271580eb47 (diff)
downloadjcommander-c675ef5201552ed809a1cb12e18f2fc3e25a7c9a.tar.gz
Added: @Parameter(help = true)
Diffstat (limited to 'doc')
-rw-r--r--doc/index.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/index.html b/doc/index.html
index 5f76020..0dc79b3 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -560,6 +560,17 @@ JCommander jc = new JCommander(new Args());
jc.setDefaultProvider(DEFAULT_PROVIDER);
</pre>
+<h2><a class="section" name="Help_parameter">Help parameter</a></h2>
+
+If one of your parameters is used to display some help or usage, you need use the <tt>help</tt> attribute:
+
+<pre class="brush: java">
+ @Parameter(names = "--help", help = true)
+ private boolean help;
+</pre>
+
+If you omit this boolean, JCommander will instead issue an error message when it tries to validate your command and it finds that you didn't specify some of the required parameters.
+
<h2><a class="section" name="Complex">More complex syntaxes (commands)</a></h2>
Complex tools such as <tt>git</tt> or <tt>svn</tt> understand a whole set of commands, each of which with their own specific syntax: