With the new @Acronym annotation, only the long name option exists in the
option enum for a command. As a consequence, the command's toString()
representation always prints the long option names.
It would be nice to provide a way to print short option names if they are
passed to the command through the acronym, e.g. for the "ls" command, if one
writes
ls(Ls.Options.l.a)
the command to string should be
ls -la
instead of
ls --longFormat --allFiles
One way to achieve this is by adding a new method to OptionSet:
boolean useOptionAcronym()
This flag should then be set in the generated OptionSet. There are different
possibilities to do this
(a) when the first chosen option is an acronym
(b) when the last chosen option is an acronym
(c) when any chosen option is an acronym
Note: it is not very practical to distinguish between acronym and long option
name on a per-option basis.
Original issue reported on code.google.com by terz...@gmail.com on 15 Jul 2012 at 12:26
Original issue reported on code.google.com by
terz...@gmail.com
on 15 Jul 2012 at 12:26