HP 6125XLG R2306-HP 6125XLG Blade Switch Fundamentals Configuration Guide - Page 12

Entering a string or text type value for an argument, Abbreviating commands

Page 12 highlights

Entering a string or text type value for an argument Generally, a string type argument value can contain any printable character (in the ASCII code range of 32 to 126) other than the question mark (?), quotation mark ("), backward slash (\), and space, and a text type argument value can contain any printable character other than the question mark. However, a specific argument might have more requirements. For more information about the specific requirements for an argument, see the relevant command reference. Abbreviating commands You can enter a command line quickly by entering incomplete keywords that uniquely identify the complete command. In user view, for example, commands starting with an s include startup saved-configuration and system-view. To enter the command system-view, you only need to type sy. To enter the command startup saved-configuration, type st s. You can also press Tab to complete an incomplete keyword. Configuring and using command keyword 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 saves the keyword, instead of its alias, to the running configuration. • If a string you entered for a command partially matches an alias and a keyword, the command indicated by the alias is executed. To execute the command indicated by the keyword, enter the complete keyword. • If a string you entered for a command partially matches multiple aliases, the system displays an error message. • If you enter a string that partially matches an alias and a keyword and press Tab, the keyword indicated by the alias is displayed. Pressing Tab again displays the keyword. Configuration procedure To configure a command keyword alias: Step Command 1. Enter system view. system-view 2. Enable the command keyword alias function. command-alias enable 3. Configure a command keyword alias. command-alias mapping cmdkey alias Remarks N/A By default, the command keyword alias function is disabled. By default, no command keyword alias is configured. You must enter the cmdkey and alias arguments in their complete form. 5

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155

5
Entering a string or text type value for an argument
Generally, a string type argument value can contain any printable character (in the ASCII code range of
32 to 126) other than the question mark (?), quotation mark ("), backward slash (\), and space, and a
text type argument value can contain any printable character other than the question mark. However, a
specific argument might have more requirements. For more information about the specific requirements
for an argument, see the relevant command reference.
Abbreviating commands
You can enter a command line quickly by entering incomplete keywords that uniquely identify the
complete command. In user view, for example, commands starting with an
s
include
startup
saved-configuration
and
system-view
. To enter the command
system-view
, you only need to type
sy
. To
enter the command
startup
saved-configuration
, type
st s
.
You can also press
Tab
to complete an incomplete keyword.
Configuring and using command keyword 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 saves the keyword,
instead of its alias, to the running configuration.
If a string you entered for a command partially matches an alias and a keyword, the command
indicated by the alias is executed. To execute the command indicated by the keyword, enter the
complete keyword.
If a string you entered for a command partially matches multiple aliases, the system displays an
error message.
If you enter a string that partially matches an alias and a keyword and press
Tab
, the keyword
indicated by the alias is displayed. Pressing
Tab
again displays the keyword.
Configuration procedure
To configure a command keyword alias:
Step
Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enable the command keyword
alias function.
command-alias enable
By default, the command keyword
alias function is disabled.
3.
Configure a command
keyword alias.
command-alias mapping
cmdkey alias
By default, no command keyword
alias is configured.
You must enter the
cmdkey
and
alias
arguments in their complete form.