made example current

This commit is contained in:
Marcel Otte 2014-12-09 20:55:57 +01:00
parent 6f01a1287b
commit 7d0aad767e
1 changed files with 11 additions and 10 deletions

View File

@ -8,26 +8,27 @@ public class Example {
CmdOptions.i().createOption("name").// give the option a name which you
// can
// remember within your project
addCommand("--name") // it's always good to define a long
addLongCommand("--name"). // it's always good to define a
// long
// commandline parameter with a
// describing name
.addCommand("-n") // of course, programmer are always lazy so
addCommand("-n"). // of course, programmer are always lazy so
// give them an possibility to shortcut your
// option
.addDefaultParameter("whatever")// a default parameter is good
addDefaultParameter("whatever").// a default parameter is good
// if you need the option within
// your program, but don't care
// when it's omitted on
// execution
.setDescription("an example option.");// And of course a
setDescription("an example option.");// And of course a
// description... for
// the help readers, the
// few among us...
CmdOptions
.i()
.createOption("complex")
.addCommand("--complex")
.addLongCommand("--complex")
// see above
// yes you can omit a default parameter, but you have to
// check later in your project if that option is set.
@ -42,7 +43,7 @@ public class Example {
// here you are able to add some more alternatives for that
// option, so here you can use "--complex", "-c", "-i" and
// "--ccp" to trigger this option.
.addCommand("-i").addCommand("--ccp");
.addCommand("-i").addLongCommand("--ccp");
}