• No results found

CLI Help Feature

In document C4 CMTS Technical Manual (Page 46-50)

Command completion and positional help are two features that serve as memory joggers for users who are unable to remember the entire command string or parameter placement.

Use of Question Mark (?) Entering the question mark (?) at the command line prompt will display a list of the available commands. To get specific help on a command mode, command name, keyword, or an argument, use any of the following commands:

<Ctrl> + T Transposes the character to the left of the cursor with the character located at the cursor.

<Ctrl> + U Deletes all characters on line to left of cursor position.

<Ctrl> + W Deletes word directly before cursor.

<Ctrl> + Z Enters command and then returns to root prompt.

Table 2-3: CLI Editing Shortcuts (Continued)

Keystroke(s) Result

Table 2-4: Command Help

Command Result

C4# help

General CLI usage information. Informs the user what “?” does, what <cr>

means in the help display, show-all commands and the use of “|”.

C4# ? Lists all commands appropriate to the command mode.

Entering the question mark (?) after entering the complete name of a command or command option, will enable the CLI to list the available commands and options.

Entering the question mark (?) in the middle of a command name, enables the CLI to list the possible command completions that match the letters you have entered so far; the letters that you typed are redisplayed. When you find the value you need, type it without losing your place in the argu-ment. Leave a space between the keyword and the question mark. The question mark will not invalidate the command.

When using context-sensitive help, the space (or lack of a space) before the question mark (?) is significant. To obtain a list of commands that begin with a particular character sequence, type in those characters followed immediately by the question mark (?). Do not include a space.

Interactive Mode help The use of help and the ? mark in interactive mode are not the same. To list the options available for a specific command, type help at the prompt.

To see all the enhanced options, enter a space, question mark (?) followed by the enter key. The behavior differences are shown in the two examples below:

Example 1

C4(config)# interface cable 15/0

Entering cable interface configuration mode for slot 15 MAC port 0 C4(config-cable)# help

authorization-module - Modify authorization module values

cable - Downstream and upstream parameter configuration description - Interface specific description

C4#

abbreviated-command-entry? Lists commands in the current mode that begin with a particular character string.

C4#

abbreviated-command-entry <space> Completes a partial command name.

C4#

abbreviated-command-entry <Tab> Completes a partial command name.

C4# command ? Lists the available command and options.

C4# command option ? Lists the next available syntax option for the command.

Table 2-4: Command Help

Command Result

igmp - Static join a multicast group on this port ip - IP address of Cable Interface

proxy-arp - Enable proxy ARP for this cable interface restore - Restore the CAM interface

restricted-proxy-arp - Restrict proxy ARP to CPEs behind different CMs shutdown - Shutdown both the MAC and Downstream for the interface spare-group - Configure a CAM sparing group

subscriber - Commands for subscriber management voice-limits - Set voice data limits

<cr>

Example 2 While in interactive mode, if you enter a space and then a question mark (?) followed by the enter key, a list of commands along with the available show commands will display as shown below. The additional information that you get by using ? instead of help is shown in blue.

C4(config-cable)# ?

authorization-module - Modify authorization module values

cable - Downstream and upstream parameter configuration

restricted-proxy-arp - Restrict proxy ARP to CPEs behind different CMs

Use of the Carriage Return

<CR> The <CR> (carriage return symbol) at the end of a command help output indicates that you have the option to press Enter to complete the command and that the arguments and keywords in the list preceding the

<CR> symbol are optional. If there is a mandatory parameter that needs to be entered, no <CR> will appear.

Error Indicator The CLI provides error isolation in the form of an error indicator, a caret symbol (^). The ^ symbol appears at the point in the command string where the user has entered incorrect or unrecognized command syntax.

For example, the ^ symbol in the following output shows the point at which the error occurred in the command (e.g. clock is misspelled):

C4# configure clokc

^

Error: Invalid parameter

Command Completion Command completion for command names and options is available at each level of the hierarchy. There are several options you can use to complete commands.

You can abbreviate commands or keywords: enter only as many charac-ters of the keyword as needed to keep it unambiguous. For example, you can abbreviate the configure command to config. After entering the command at the system prompt, press <Enter> to execute the command.

If you enter a unique set of characters and press the <Tab> key or

<Space Bar>, the system will complete the command name. If you enter a set of characters that could indicate more than one command, the system will respond with the list of possible matches as shown in the following example:

C4# configure cable mod <Space Bar>

modem modulation-profile

Command completion will then work if you type either an “e” for “modem”

or “u” for “modulation-profile” and press the <Tab> key or <Space Bar>. The system will complete the command name.

After the command is complete at the system prompt, press <Enter> to execute the command.

In document C4 CMTS Technical Manual (Page 46-50)

Related documents