Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-75

Option shortName attribute doesn't work in forge shell

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0.0.Alpha2
    • Fix Version/s: 1.0.6.Final
    • Component/s: UI - Shell
    • Labels:
      None

      Description

      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

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gastaldi George Gastaldi
                Reporter:
                maschmid Marek Schmidt
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: