glassfish
  1. glassfish
  2. GLASSFISH-12906

Need to provide all cli command with --usage as an option

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: command_line_interface
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      12,906

      Description

      Need to provide all cli command with "--usage" as an option.

      User either have to type the cli command with wrong option in order to get the
      available usage option.
      Or User have to either type -? or --help to get help version of the available
      option.

      ./asadmin export-http-lb-config -?
      ./asadmin export-http-lb-config --help

      We asadmin command have --usage as an option, it will provide a much better
      GlassFish user experience.

      Since user may only need hints of those available options.

      Instead of saying --usage is a "Invalid option".

      asadmin> export-http-lb-config --usage
      Invalid option: --usage
      Usage: asadmin [asadmin-utility-options] export-http-lb-config
      [--targets <targets>] [--config <config>] [--lbname <lbname>]
      [--property <property>] [?|-help[=<help(default:false)>]] file_name
      Command export-http-lb-config failed.

      asadmin> export-http-lb-config -?

      NAME :
      export-http-lb-config -

      SYNOPSIS :
      export-http-lb-config [--targets=targets] [--config=config]
      [--lbname=lbname] [--property=property] file_name

      OPTIONS :
      --lbname

      --targets

      --config

      --property

      OPERANDS :
      file_name -

      Command export-http-lb-config executed successfully.

      asadmin> export-http-lb-config --help

      NAME :
      export-http-lb-config -

      SYNOPSIS :
      export-http-lb-config [--targets=targets] [--config=config]
      [--lbname=lbname] [--property=property] file_name

      OPTIONS :
      --lbname

      --targets

      --config

      --property

      OPERANDS :
      file_name -

      Command export-http-lb-config executed successfully.

        Activity

        Hide
        Tom Mueller added a comment -

        Just to confirm the idea...

        First, it is possible to enter --usage for any command today and the usage
        message will be printed (since --usage isn't a valid option for any command).

        The problem with this is two-fold:

        1) The command prints "invalid option" before the usage message. It it
        desirable that it not do that.

        2) The command returns a failure exit code. When requesting a usage message, it
        is desirable that it returns a success exit code, similar to what happens with
        the help command.

        Show
        Tom Mueller added a comment - Just to confirm the idea... First, it is possible to enter --usage for any command today and the usage message will be printed (since --usage isn't a valid option for any command). The problem with this is two-fold: 1) The command prints "invalid option" before the usage message. It it desirable that it not do that. 2) The command returns a failure exit code. When requesting a usage message, it is desirable that it returns a success exit code, similar to what happens with the help command.
        Hide
        Homer Yau added a comment -

        This is are request for adding "--usage" as an option for display
        those available options in short format for user to use for any command.

        This will increase usability and productivity. Instead of typing wrong options or long help man. page to display the usable options.

        Show
        Homer Yau added a comment - This is are request for adding "--usage" as an option for display those available options in short format for user to use for any command. This will increase usability and productivity. Instead of typing wrong options or long help man. page to display the usable options.
        Hide
        Tom Mueller added a comment -

        Clear the Fix version since this issue isn't going to be fixed for 3.1.

        Show
        Tom Mueller added a comment - Clear the Fix version since this issue isn't going to be fixed for 3.1.

          People

          • Assignee:
            Bill Shannon
            Reporter:
            Homer Yau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: