zowe / imperative

Imperative CLI Framework
Eclipse Public License 2.0
24 stars 27 forks source link

Update syntax diagrams in help #105

Closed ghost closed 6 years ago

ghost commented 6 years ago

When issuing a help command on a group that contains a required positional, it is displayed in the help as using the optional brackets.

Currently we see

USAGE
 -----

   cli [group]

 GROUPS
 ------

   sub-group This is a sub-group
USAGE
 -----

   cli [command]

 COMMANDS
 ------

   command This is a command

What we would like to see

USAGE
 -----

   cli <group>

   Where <group> is one of the following: 

 GROUPS
 ------

   sub-group This is a sub-group
USAGE
 -----

   cli <command>

   Where <command> is one of the following: 

 COMMANDS
 ------

   command This is a command
ghost commented 6 years ago

New look taken from zowe-cli:

$ zd plugins --help

 DESCRIPTION
 -----------

   Install and manage plug-ins

 USAGE
 -----

   zowe plugins <command>

   Where <command> is one of the following:

 COMMANDS
 --------

   install   Install a plug-in
   list      list installed plug-ins
   uninstall Uninstall a plug-in
   update    update a plug-in
   validate  Validate a plug-in

 GLOBAL OPTIONS
 --------------

   --response-format-json  | --rfj (boolean)

      Produce JSON formatted data from a command

   --help  | -h (boolean)

      Display help text
$ zd --help

 DESCRIPTION
 -----------

   Welcome to Zowe CLI!

   Zowe CLI is a command line interface (CLI) that provides a simple and
   streamlined way to interact with IBM z/OS.

   For additional Zowe CLI documentation, visit https://zowe.github.io/docs-site.

   For Zowe CLI support, visit https://zowe.org.

 USAGE
 -----

   zowe <group>

   Where <group> is one of the following:

 GROUPS
 ------

   bp-sample | bsp       Brightside sample plugin
   endevor               CA Endevor SCM plug-in for listing Endevor environment
                         information, working with elements and packages located
                         in specified Endevor instance.
   plugins               Install and manage plug-ins
   profiles              Create and manage configuration profiles
   provisioning | pv     Perform z/OSMF provisioning tasks on Published Templates
                         in the Service Catalog and Provisioned Instances in the
                         Service Registry.
   zos-console | console Issue z/OS console commands and collect responses
   zos-files | files     Manage z/OS data sets
   zos-jobs | jobs       Manage z/OS jobs
   zos-tso | tso         Issue TSO commands and interact with TSO address spaces
   zosmf                 Interact with z/OSMF

 OPTIONS
 -------

   --version  | -V (boolean)

      Display the current version of Zowe CLI

 GLOBAL OPTIONS
 --------------

   --response-format-json  | --rfj (boolean)

      Produce JSON formatted data from a command

   --help  | -h (boolean)

      Display help text

@jelaplan / @MikeBauerCA is this what we were looking for?

MikeBauerCA commented 6 years ago

@AHumanFromCA, it looks pretty good to me. Could you please share what zd files --help outputs?

ghost commented 6 years ago
$ zd files --help

 DESCRIPTION
 -----------

   Manage z/OS data sets, create data sets, and more

 USAGE
 -----

   zowe zos-files <group>

   Where <group> is one of the following:

 GROUPS
 ------

   create | cre  Create data sets
...
MikeBauerCA commented 6 years ago

Thanks @AHumanFromCA! Looks good