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 8 defines the keys for editing the command-line.
Footnote1 : 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 9 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.
Footnote1 : 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 10 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