You can edit commands in a CLI that supports multi-line edition. Each command can contain a maximum of 510 characters. The keywords in the commands are case insensitive. Whether a command parameter is case sensitive or not depends on what the parameter is.
Table 1 lists keys that are frequently used for command editing.
Key |
Function |
---|---|
Common key |
Inserts a character at the current location of the cursor if the editing buffer is not full, and the cursor moves to the right. Otherwise, an alarm is generated. |
Backspace |
Deletes the character on the left of the cursor and the cursor moves to the left. When the cursor reaches the head of the command, an alarm is generated. |
Left cursor key ← or Ctrl+B |
Moves the cursor to the left by the space of a character. When the cursor reaches the head of the command, an alarm is generated. |
Right cursor key → or Ctrl+F |
Moves the cursor to the right by the space of a character. When the cursor reaches the end of the command, an alarm is generated. |
Incomplete Keyword
You can enter incomplete keywords on the device. In the current view, you do not need to enter complete keywords if the entered characters can match a unique keyword. This function improves operating efficiency.
For example, to execute the display current-configuration command, you can enter d cu, di cu, or dis cu. However, you cannot enter d c or dis c because they do not match unique keywords.
The maximum length of a command (including the incomplete command) to be entered is 510 characters. If a command in incomplete for m is configured, the system saves it to the configuration file in its complete form, which may exceed the 510-character limit. In this case, the command in incomplete form cannot be restored after the system restarts. Therefore, when you configure a command in incomplete form, pay attention to the length of the command.
Tab
Enter an incomplete keyword.
[HUAWEI] info-
Press Tab.
[HUAWEI] info-center
Enter an incomplete keyword.
[HUAWEI] info-center log
Press Tab.
[HUAWEI] info-center loghost
Press Tab to switch from one matched keyword to another. In this case, the cursor closely follows the end of a word.[HUAWEI] info-center logbuffer
Stop pressing Tab when the desired keyword is displayed.
Enter an incorrect keyword.
[HUAWEI] info-center loglog
Press Tab.
[HUAWEI] info-center loglog
The system displays information in a new line, but the keyword loglog remains unchanged and there is no space between the cursor and the keyword. This indicates that this keyword does not exist.