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

Forge - Shell in CLI interactive mode, show * for required option and ? for optional

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 2.16.0.Final
    • 2.15.2.Final
    • UI - Shell
    • None

    Description

      When using forge commands in interactive mode, the CLI shows options line by line. Its a bit confusing which are mandatory ,and which are optional.

      Today it shows ? for all options, eg

      Press <ENTER> to confirm, or <CTRL>+C to cancel.
      ? componentName (Name of component type to add): [0-179] 165
      ? file (The XML file to use (either Spring or Blueprint)) [META-INF/spring/foo.xml]:
      ? timerName (The name of the timer):
      ***ERROR*** timerName must be specified.
      

      Notice that both file and timerName has a starting ? on the CLI. But both options is required. So its IMHO better to show a * instead to indicate required.

      Here is an example where I am a bit further down in the CLI for the same command

      Press <ENTER> to confirm, or <CTRL>+C to cancel.
      ? componentName (Name of component type to add): [0-179] 165
      ? file (The XML file to use (either Spring or Blueprint)) [META-INF/spring/foo.xml]:
      ? timerName (The name of the timer):  foo
      ? time (A java.util.Date the first event should be generated. If using the URI the pattern expected is: yyyy-MM-dd HH:mm:ss or yyyy-MM-dd'T'HH:mm:ss.):
      ? period (If greater than 0 generate periodic events every period milliseconds. The default value is 1000.) [1000]:  2000
      ? delay (The number of milliseconds to wait before the first event is generated. Should not be used in conjunction with the time option. The default value is 1000.) [1000]:
      

      The time, period, and delay option is optional. But some of them have a default value which is shown nicely.

      But again this ticket is about changing the ? to a * for the required options.

      Attachments

        Activity

          People

            rhn-support-ggastald George Gastaldi
            cibsen@redhat.com Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: