Typing incomplete keywords, Configuring command aliases – H3C Technologies H3C S7500E Series Switches User Manual

Page 18

Advertising
background image

1-7

Key

Function

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.

Typing Incomplete Keywords

You can input a command comprising incomplete keywords that can uniquely identify the complete

command.

For example, in user view, commands starting with an s include startup saved-configuration and

system-view.

z

To enter system view, type sy.

z

To set the configuration file for next startup, type st s.

You can also press Tab to have an incomplete keyword automatically completed.

Configuring Command Aliases

The command alias function allows you to replace the first keyword of a command with your preferred

keyword. For example, if you configure show as the replacement of the display keyword for each

display command, to execute the display xx command, input the command alias show xx.

Note the following when configuring command aliases:

z

When you input a command alias, the system displays and saves the command in its original

format instead of its alias. In other words, you can define and use a command alias but the

command is not restored in its alias format.

z

When you define a command alias, the cmdkey and alias arguments must be in their complete

form.

z

With the command alias function enabled, when you input an incomplete keyword, which partially

matches both a defined alias and the keyword of a command, the alias wins; to execute the

command whose keyword partially matches your input, input the complete keyword. When you

input a character string that partially matches multiple aliases, the system gives you prompts.

z

If you press Tab after you input the keyword of an alias, the original format of the keyword is

displayed.

z

You can replace only the first keyword of a non-undo command instead of the complete command;

and you can replace only the second keyword of undo commands.

Follow these steps to configure command aliases:

Advertising