Displaying and executing history commands – H3C Technologies H3C S5120 Series Switches User Manual
Page 30

1-16
Key
Function
Left arrow key or Ctrl+B
The cursor moves one character space to the left.
Right arrow key or Ctrl+F
The cursor moves one character space to the right.
Tab
If you press Tab after entering part of a keyword, the system automatically
completes the keyword:
z
If finding a unique match, the system substitutes the complete keyword
for the incomplete one and displays it in the next line.
z
If there is more than one match, you can press Tab repeatedly to display
in cycles all the keywords starting with the character string that you typed.
z
If there is no match, the system does not modify the incomplete keyword
and displays it again in the next line.
Displaying and Executing History Commands
The CLI automatically saves the commands recently used in the history command buffer. You can
access commands in the history command buffer and execute them again.
Table 1-5 Access history commands
To do…
Use the key/command…
Result
Display history commands
display history-command
Displays valid history commands you
used
Access the previous history
command
Up arrow key or Ctrl+P
Displays the previous history command, if
any
Access the next history
command
Down arrow key or Ctrl+N
Displays the next history command, if any
You may use arrow keys to access history commands in Windows 200X and XP Terminal or Telnet.
However, the up and down arrow keys are invalid in Windows 9X HyperTerminal, because they are
defined differently. You can press Ctrl+P or Ctrl+N instead.
Note that:
z
The commands saved in the history command buffer are in the same format in which you typed the
commands. If you typed an incomplete command, the command saved in the history command
buffer is also an incomplete one.
z
If you execute the same command repeatedly, the device saves only the earliest record. However,
if you execute the same command in different formats, the system saves them as different
commands. For example, if you execute the display cu command repeatedly, the system saves
only one command in the history command buffer. If you execute the command in the format of
display cu and display current-configuration respectively, the system saves them as two
commands.
z
By default, the CLI can save up to ten commands for each user. You can use the
history-command max-size command to set the capacity of the history command buffer for the