Skip to content

Commit

Permalink
Changes made to for comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
KSchopmeyer committed Mar 31, 2020
1 parent 964d699 commit a5e9830
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
43 changes: 31 additions & 12 deletions docs/pywbemcli/cmdlineinterface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,39 @@ The command line can contain the following components:
* **GENERAL-OPTIONS** - General options; they apply to all commands.
See :ref:`Using the pywbemcli command line general options` for information
on the pywbemcli general options.
* **COMMAND-GROUP** - A name of a group of commands.
See :ref:`Pywbemcli command groups and commands`
* **COMMAND** - A name of a command, normally within a command group.
There are however some special commands (``repl`` and ``help``) that are not
in any command group.
* **COMMAND-OPTIONS** - Command options; they apply only to a particular
command.

* **COMMAND** - A name of a command which may consist of:
* <group name> <command name> for those commands that are defined in
groups (ex. `class find`).
* Just the group name (ex. `class`).
* <command name> for those commands that are not part of a group. (``repl``
and ``help``) that are not in any command group.
* **ARGS** - Arguments for a command.
* **CMD-OPTIONS** - Command options; they apply only to a particular
command.


Options are prefixed with the characters ``-`` for the short form or ``--`` for
the long form (ex. ``-n`` or ``--namespace``). The other components do not
begin with ``-``.

Command groups are named after the objects the commands operate on
(ex. ``class``, ``instance``, ``qualifier``, ``server``).
(ex. ``class``, ``instance``, ``qualifier``, ``server``). Executing

.. code-block::text
$ pywbemcli --help
...
Commands:
class Command group for CIM classes.
...
returns the list of command groups under the title `COMMANDS`.

Commands are named after actions on these objects
(ex. ``get``, ``create``, ``delete``).
(ex. ``get``, ``create``, ``delete``). The list of commands for each group
is listed with the command `pywbemcli <group name> --help`.

For example, the command:

Expand Down Expand Up @@ -91,7 +107,7 @@ command group name and arguments/options:

.. code-block:: text
$ pywbemcli [GENERAL-OPTIONS] [COMMAND-GROUP] COMMAND [COMMAND-OPTIONS] [ARGS]
$ pywbemcli [GENERAL-OPTIONS] COMMAND [COMMAND-OPTIONS] [ARGS]
The following example enumerates classes in the ``root/cimv2`` namespace of the
WBEM server on ``localhost``:
Expand Down Expand Up @@ -175,7 +191,10 @@ user):

.. code-block:: text
pywbemcli> [GENERAL-OPTIONS] [COMMAND-GROUP] COMMAND [ARGS] [CMD-OPTIONS]
pywbemcli> [GENERAL-OPTIONS] COMMAND [ARGS] [CMD-OPTIONS]
where: COMMAND can be either a group name and
a command (ex. class find or repl)
pywbemcli> :INTERNAL-COMMAND
Expand Down Expand Up @@ -247,7 +266,7 @@ list of the supported command groups and commands without command group.
The usage line in this help text shows the usage in command mode. In
interactive mode, the ``pywbemcli`` word is omitted.

Typing ``COMMAND-GROUP --help``, or ``COMMAND-GROUP -h`` in the pywbemcli shell
Typing ``COMMAND --help``, or ``COMMAND -h`` in the pywbemcli shell
displays help information for the specified pywbemcli command group, for
example:

Expand Down
2 changes: 1 addition & 1 deletion docs/pywbemcli/cmdshelp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ Help text for ``pywbemcli help`` (see :ref:`help command`):

::

Usage: pywbemcli [OPTIONS] help
Usage: pywbemcli [GENERAL-OPTIONS] help

Show help message for interactive mode.

Expand Down
5 changes: 4 additions & 1 deletion pywbemtools/pywbemcli/pywbemcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def create_server_instance(svr_name):
ctx.invoke(repl)


@cli.command('help')
@cli.command('help', options_metavar=GENERAL_OPTS_TXT)
@click.pass_context
def repl_help(ctx): # pylint: disable=unused-argument
"""
Expand All @@ -614,6 +614,9 @@ def repl_help(ctx): # pylint: disable=unused-argument
help Show this help message.
:?, :h, :help Show help message about interactive mode.
<UP>, <DOWN> Scroll through pwbemcli command history.
COMMAND: May be two words (class enumerate) for commands that are withon
a group or a single word for special commands like repl.
""")


Expand Down

0 comments on commit a5e9830

Please sign in to comment.