6
clock
cluster
Typing commands
Editing command lines
Table 2 lists some shortcut keys you can use to edit command lines.
Table 2 Editing functions
Ke
Function
Common keys
If the edit buffer is not full, pressing a common key inserts the character at the
position of the cursor and moves the cursor to the right.
Backspace
Deletes the character to the left of the cursor and moves 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:
• If finding a unique match, the system substitutes the complete keyword for
the incomplete one and displays it in the next line.
• 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.
• If there is no match, the system does not modify the incomplete keyword
and displays it again in the next line.
Typing incomplete keywords
You can input a command comprising incomplete keywords that uniquely identify the complete
command.
In user view, for example, command system-view, to enter system view, type sy.
You can also press Tab to have an incomplete keyword automatically completed.
Configuring command aliases
The command keyword alias function allows you to replace the first keyword of a non-undo command or
the second keyword of an undo command with your preferred keyword when you execute the command.
For example, if you configure show as the alias for the display keyword, you can enter either show clock
or display clock to execute the display clock command.
Usage guidelines
• After you successfully execute a command by using a keyword alias, the system displays and saves
the keyword, instead of its alias.
• When you define a command alias, the cmdkey and alias arguments must be in their complete
form.