This section provides information about the command-line editor.
Here are a few basic command-line editing notes:
You can use several keys to edit the command line. Table 8 defines the keys for editing the command line. Arrow keys functions only on ANSI-compatible terminals, such as VT100s.
-
Table 8: Command-Line Editing Keys
|
Key(s) |
Function |
|---|---|
|
Delete or Backspace |
Removes characters to left of cursor |
|
Left Arrow |
Moves cursor one character to left |
|
Right Arrow |
Moves cursor one character to right |
|
Ctrl+a |
Moves cursor to beginning of command line |
|
Ctrl+b |
Moves cursor back one character |
|
Ctrl+d |
Deletes character at cursor |
|
Ctrl+e |
Moves cursor to end of command line |
|
Ctrl+f |
Moves cursor forward one character |
|
Ctrl+h |
Deletes character to left of cursor |
|
Ctrl+k |
Deletes all characters from cursor to end of command line |
|
Ctrl+l |
Redisplays system prompt and command line |
|
Ctrl+o |
Toggles overwrite/insert mode |
|
Ctrl+t |
Transposes character to left of cursor with character located at cursor |
|
Ctrl+u |
Deletes entire command line |
|
Ctrl+v |
Allows the “ ?” character to be used as a character instead of as a request for help |
|
Ctrl+w |
Deletes the previous word |
|
Ctrl+x |
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 through Telnet. Set the boot option flag by using the service ctrl-x-reboot command from Global Configuration mode. |
|
Ctrl+y |
Recalls most recent entry from delete buffer; recalled characters overwrite or are inserted in current line depending on overwrite/insert toggle |
|
Ctrl+z |
In all modes except User Exec mode, executes any command typed immediately before the command sequence and then changes the mode to Privileged Exec mode. In User Exec mode, only executes any command typed immediately before the command sequence. |
|
Esc+b |
Moves cursor back one word |
|
Esc+Backspace |
Deletes previous word |
|
Esc+d |
Deletes current or next word |
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. Arrow keys functions only on ANSI-compatible terminals, such as VT100s.
Table 9: Command History 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.
Table 10: Pagination Keys