commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremiah Voris" <>
Subject [CLI] Help Formatting
Date Tue, 07 Mar 2006 22:10:08 GMT
I just downloaded cli 1.0 and have begun playing with it. It seems
fairly straightforward but I am running into one oddity and am not
sure if it is just that I'm missing something or if there is a bug. It
seems as if descriptions that line wrap loose track of where they
should cut off the line after they wrap.

In other words, let's say you have 150 characters of description text
and an indent of 25 characters to display your options within. The
description text for the first line will go on for about 50 characters
or so and then wrap. On that wrapped line, it will start at the
correct indent position but it looks like it is feeding a string
longer than 50 or so characters long for that second and any
subsequent description lines. The result is nasty wrapping that
clutters up the help description.

Again, I'm not sure if I'm doing something wrong, so here's some
simple code to show what I'm doing:

Options options = new Options();
						"Here is a very long description "
						+ "that should wrap over three lines "
						+ "and you should notice how the "
						+ "wrapping messes up after the first "
						+ "line.")

HelpFormatter help = new HelpFormatter();
help.printHelp("Application", options, true);

So I guess my question is, am I doing something wrong?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message