CLI Editor Features

Context Sensitive Help

Cisco IOS CLI offers context sensitive help. This is a useful tool for a new user because at any time during an EXEC session, a user can type a question mark (?) to get help. Two types of context sensitive help are available – word help and command syntax help.

Word help can be used to obtain a list of commands that begin with a particular character sequence. To use word help, type in the characters in question followed immediately by the question mark (?). Do not include a space before the question mark. The router will then display a list of commands that start with the characters that were entered. The following is an example of word help:

Router# co?
configure connect copy

Command syntax help can be used to obtain a list of command, keyword, or argument options that are available based on the syntax the user has already entered. To use command syntax help, enter a question mark (?) in the place of a keyword or argument. Include a space before the question mark. The router will then display a list of available command options with standing for carriage return. The following is an example of command syntax help:

Router# configure ?

memory Configure from NV memory
network Configure from a TFTP network host
overwrite-network Overwrite NV memory from TFTP network host=20
terminal Configure from the terminal

Command Syntax Check

If a command is entered improperly (e.g. typo or invalid command option), the router will inform the user and indicate where the error has occurred. A caret symbol (^) will appear underneath the incorrect command, keyword, or argument. The following example displays what happens if the keyword “ethernet” is spelled incorrectly.

Router(config)#interface ethernat
^
% Invalid input detected at ‘^’ marker.

Command Abbreviation

Commands and keywords can be abbreviated to the minimum number of characters that identifies a unique selection. For example, you can abbreviate the “configure” command to “conf” because “configure” is the only command that begins with “conf”. You could not abbreviate the command to “con” because more than one command could fit this criteria. The router will issue the following error message if you do not supply enough characters.

cisco(config)#i
% Ambiguous command: “i”

Hot Keys

For many editing functions, the IOS CLI editor provides hot keys. The following table lists some editing shortcuts that are available.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s