
October 2006
CLI Basics
35
Prefix Prompt
You can set the CLI to display the current command prefix
as
the command prompt
by entering the following command:
-> prompt prefix
After entering this command, your command prompt will
include current stored prefix information until a new prompt is
specified. For example, the following is a prompt for a user
who has begun configuring VLAN 32:
-> vlan 32
To set the prompt back to the default arrow (
->
), enter the
following syntax, exactly as shown, at the prefix prompt:
prompt string ->
Command History
You can view a list of up to 30 of the most recently executed
commands via the
show history
command. For example:
-> show history
1 aaa authentication default local
2 password
3 system timezone pst
4 system daylight savings time enable
5 system time 14:58:00
6 system date 11/06/2002
7 system contact "JSmith [email protected]"
8 system name EngSwitch3
9 system location "NMS Lab--NE Rack"
10 show system
11 modify boot parameters
12 show history
Note that the most recent commands are displayed
lower
in the
list. For this reason, the
show history
command will always be
listed last.
You can recall commands from the history list by entering an
exclamation point (
!
). For example:
-> !4
-> show temperature
The CLI prints the fourth command from the history list (in
this case,
show temperature
) at the CLI prompt.
You can also recall the
last
command in the history list by
entering two exclamation points (
!!
). For example:
-> !!
-> show history
To specify the number of commands displayed in the history
list (1 - 30), use the
history size
command. For example:
-> history size 10
To view the current history list settings, use the
show history
parameters
command. For example:
-> show history parameters
History size: 30
CurrentSize: 10
Index Range: 1-10