< Home

history-command max-size

Function

The history-command max-size command sets the size of the historical command buffer.

The undo history-command max-size command restores the default size of the historical command buffer.

By default, a maximum of 10 previously-used commands can be saved in the buffer.

Format

history-command max-size size-value

undo history-command max-size

Parameters

Parameter Description Value
size-value Specifies the size of the historical command buffer. The value is an integer ranging from 0 to 256.

Views

User interface view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The CLI can automatically save the historical commands that you enter. This function is similar to that of Doskey. You can invoke and run the historical commands at any time.

Precautions

  • If the historical command buffer is used up and a new command is entered, the command line interface deletes the earliest command in the buffer in the sequence the commands were entered.
  • The formats of the saved historical commands are the same as those of the commands entered by users. If the commands entered by a user are incomplete, the saved historical commands are also incomplete.
  • If a user runs the same command several times, only the earliest command is saved as a historical command. However, if the same command is entered with different formats, they are saved as different commands.

Example

# Set the size of the historical command buffer to 20.

<HUAWEI> system-view
[HUAWEI] user-interface console 0
[HUAWEI-ui-console0] history-command max-size 20
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >