If in the current view, the character string you have typed can already uniquely identify a keyword, you
do not need to type the complete keyword.
For example, in user view, commands starting with an
s
include
save
,
startup
saved-configuration
,
and
system-view
.
z
To save the current configuration, type
sa
.
z
To set the configuration file for next startup, type
st s
.
z
To enter system view, type
sy
.
You can also press
Tab
to have a partial keyword automatically completed, and check that the keyword
is the one you intended to use.
Editing command lines
Table 1-5
lists some shortcut keys you can use to edit command lines.
Table 1-5
Editing functions
Key
Function
Common keys
If the edit buffer is not full, insert the character at the position of the
cursor and move the cursor to the right.
Backspace
Deletes the character to the left of the cursor and move the cursor
back one character.
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-6
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
1-14