XG Series User's Guide
Chapter 5 Command Reference
Mode and Terminal Operation Commands
355
5.17.4
Command Alias
This section explains about commands related to command alias.
5.17.4.1 alias
Function
Set the command alias information.
Available Model
XG0224 / XG0448 / XG0440DC / XG0440DCR / XG2600
Syntax
alias <alias> "<command>"
Options
<alias>
Specify a command alias name to be assigned, with up to 80 characters.
This name must begin with an alphabetical character, and it can be followed by
alphanumeric characters and hyphens (-).
<command>
Specify a command name and command options, to be replaced during execution of
command alias, using a pair of double quotation marks.
If no name or option is enclosed by a pair of double quotation marks (""), the definition is
deleted.
Use Mode
Operation mode (user class/admin class)
Configuration mode (admin class)
Explanation
Combine the command name and some command options, and set them as a new
command. Up to 30 commands can be set.
Specifying the set command alias will delete the previously registered command and the
specified one is set.
The set command alias is reflected immediately, and it can be used promptly.
The set command alias, if executed, will be replaced with the set command name and
command options to execute the command.
When executing the command, the options that were input following the command alias
are assumed to be input succeeding the command name and command options that
were replaced with the command alias.
An input line remains in the command execution history without being replaced with a
command alias.
Caution
The following command alias names cannot be registered.
•
"exit", "end", "quit", "up", "top", "delete", "show", "clear", "commit", "discard", "save",
"load", "reset", "moff"
Other normal command names can be registered as command aliases; however, note
that the operations of the registered normal commands are changed.
This command is an operation command; however, the contents specified in the admin
class can be saved as the configuration by executing the
command. This
command setting can be deleted using the
command in the configuration mode.
The contents set in the user class are discarded at logout or execution of the
command, and they cannot be saved.
Default
It is assumed that no data is registered.
Execution Example
# alias history "show logging command brief"
# history
1 alias history "show logging command brief"
2 history
#