Using Command-Line Editing
This section provides information about the command-line editor.
Basic Editing
Here are a few basic command-line editing notes:
- Case—Keywords are not case sensitive; that is, they can be entered in uppercase, lowercase, or a mix of both. Filenames may be case sensitive. Local filenames are case sensitive; remote filenames are case sensitive if the host system treats filenames as case sensitive. Passwords are case sensitive.
- Abbreviating keywords—You may abbreviate keywords using as few characters as you want, as long as the characters provide a unique abbreviation.
- Executing a command—Always use the <Enter> key.
Command-Line Editing Keys
You can use several keys to edit the command-line. Table 7 defines the keys for editing the command-line.
Left Arrow1
Right Arrowa
Transposes character to left of cursor with character located at cursor
Allows the "?" character to be used as a character instead of as a request for help
In all modes, reboots the system. This feature is useful if a command is taking a prolonged time to complete and hangs the console. The command has no effect if you access the system via Telnet.
Set the boot option flag by using the service ctrl-x-reboot command from Global Configuration mode.
Recalls most recent entry from delete buffer; recalled characters overwrite or are inserted in current line depending on overwrite/insert toggle
In all modes, except User Exec mode, returns you to Privileged Exec mode
Footnote: 1
Footnote: Arrow keys function only on ANSI-compatible terminals, such as VT100s.
Command History Keys
The CLI maintains two separate command histories. The first command history maintains only Exec mode commands. The second history maintains all commands entered in any of the configuration modes. The appropriate history will automatically be restored as you transition between Global Configuration mode and Exec mode.
Table 8 defines the keys related to command history.
Up Arrow1 or Ctrl+p
Recalls commands in history buffer, starting with most recent command. Repeat key sequence to recall successively older commands.
Down Arrowa or Ctrl+n
Returns to more recent commands in history buffer after recalling commands with Up Arrow or Ctrl+p. Repeat key sequence to recall successively more recent commands.
Begin a reverse search for a previously entered string in the history buffer by providing a character string when prompted. Enter Ctrl+r to continue searching. Ctrl+h or Del deletes the last character in the string and starts a search on the new string.
Footnote: 1
Footnote: Arrow keys function only on ANSI-compatible terminals, such as VT100s.
Pagination Keys
If the system needs to display more text than you can fit on the screen, the output pauses and the
--More--prompt appears. Table 9 defines the pagination keys that you can use when the--More--prompt appears. For more information, see The - - More - - Prompt.
Displays all output lines that do not contain the text string
Displays all output lines starting at the first line that contains the text string