]
George Gastaldi reassigned FORGE-75:
------------------------------------
Assignee: (was: George Gastaldi)
Option shortName attribute doesn't work in forge shell
------------------------------------------------------
Key: FORGE-75
URL:
https://issues.jboss.org/browse/FORGE-75
Project: Forge
Issue Type: Bug
Components: Shell
Affects Versions: 1.0.0.Alpha2
Reporter: Marek Schmidt
The Option shortName property in a plugin does not work as advertised in the reference
guide.
Creating the example plugin from the "3.5.1. --named options" chapter:
public class ExamplePlugin implements Plugin {
@Command("perform")
public void exampleCommand(
@Option(name="one", shortName="o") String one,
@Option(name="two") String two,
PipeOut out) {
out.println(">> option one equals: " + one);
out.println(">> option two equals: " + two);
}
}
Trying to use the shortName for the first argument doesn't work:
[no project] tmp $ exampleplugin perform -o one --two two
***INFO*** The command [perform] takes [0] unnamed argument(s), but found [1].
***INFO*** Swallowed unknown token [one] for command [perform].
>> option one equals: null
>> option two equals: two
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: