D-Link DFL-260E CLI Guide for DFL-260E - Page 15

Inline help, 5.2. Autocompleting Current and Default value - manual

Page 15 highlights

1.5. Tab completion Chapter 1. Introduction 1.5. Tab completion By using the tab function key in the CLI the names of commands, options, objects and object properties can be automatically completed. If the text entered before pressing tab only matches one possible item, e.g. "activate" is the only match for "acti", and a command is expected, the name will be autocompleted. Should there be more than one match the part common to all matches will be completed. At this point the user can either enter more characters or press tab again, which will display a list of the possible completions. This can also be done without entering any characters, but the resulting list might be long if there are many possible completions, e.g. all commands. Example 1.4. Tab completion An example of tab completion when using the add command: gw-world:/> add Add (tab) gw-world:/> add Address ("ress" was autocompleted) gw-world:/> add Address i (tab) gw-world:/> add Address IP4 ("IP4" was autocompleted) gw-world:/> add Address IP4 (tab, or double tab if IP4 were entered manually) A list of all types starting with IP4 is listed. gw-world:/> add Address IP4a (tab) gw-world:/> add Address IP4Address ("Address" was autocompleted) gw-world:/> add Address IP4Address example_ip a (tab) gw-world:/> add Address IP4Address example_ip Address= ("Address=" was autocompleted) gw-world:/> add Address IP4Address example_ip Address=1.2.3.4 Tab completion of references: gw-world:/> set Address IP4Group examplegroup Members= (tab, tab) A list of valid objects is displayed. gw-world:/> set Address IP4Group examplegroup Members=e (tab) gw-world:/> set Address IP4Group examplegroup Members=example_ip ("example_ip" was autocompleted) 1.5.1. Inline help It is possible to get help about available properties of configuration objects while a command line is being typed by using the ? character. Write ? instead of a property name and press tab and a help text for the available properties is shown. If ? is typed in stead of a property value and tab is pressed a help text for that property which contains more information such as data type, default value, etc. is displayed. Example 1.5. Inline help Get inline help for all properties of an IP4Address: gw-world:/> set IP4Address example_ip ? (tab) A help text describing all available properties is displayed. Getting inline help for the Address property: gw-world:/> set IP4Address example_ip Address=? (tab) A more detailed help text about Address is displayed. 1.5.2. Autocompleting Current and Default value Another special character that can be used together with tab completion is the period "." character. 15

  • 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
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198

1.5. Tab completion
By using the tab function key in the CLI the names of commands, options, objects and object prop-
erties can be automatically completed. If the text entered before pressing tab only matches one pos-
sible item, e.g. "activate" is the only match for "acti", and a command is expected, the name will be
autocompleted. Should there be more than one match the part common to all matches will be com-
pleted. At this point the user can either enter more characters or press tab again, which will display a
list of the possible completions. This can also be done without entering any characters, but the res-
ulting list might be long if there are many possible completions, e.g. all commands.
Example 1.4. Tab completion
An example of tab completion when using the
add
command:
gw-world:/> add Add (tab)
gw-world:/> add Address ("ress" was autocompleted)
gw-world:/> add Address i (tab)
gw-world:/> add Address IP4 ("IP4" was autocompleted)
gw-world:/> add Address IP4
(tab, or double tab if IP4 were entered manually)
A list of all types starting with IP4 is listed.
gw-world:/> add Address IP4a (tab)
gw-world:/> add Address IP4Address ("Address" was autocompleted)
gw-world:/> add Address IP4Address example_ip a (tab)
gw-world:/> add Address IP4Address example_ip Address=
("Address=" was autocompleted)
gw-world:/> add Address IP4Address example_ip Address=1.2.3.4
Tab completion of references:
gw-world:/> set Address IP4Group examplegroup Members= (tab, tab)
A list of valid objects is displayed.
gw-world:/> set Address IP4Group examplegroup Members=e (tab)
gw-world:/> set Address IP4Group examplegroup Members=example_ip
("example_ip" was autocompleted)
1.5.1. Inline help
It is possible to get help about available properties of configuration objects while a command line is
being typed by using the
?
character. Write
?
instead of a property name and press tab and a help
text for the available properties is shown. If
?
is typed in stead of a property value and tab is pressed
a help text for that property which contains more information such as data type, default value, etc. is
displayed.
Example 1.5. Inline help
Get inline help for all properties of an IP4Address:
gw-world:/> set IP4Address example_ip ? (tab)
A help text describing all available properties is displayed.
Getting inline help for the Address property:
gw-world:/> set IP4Address example_ip Address=? (tab)
A more detailed help text about Address is displayed.
1.5.2. Autocompleting Current and Default value
Another special character that can be used together with tab completion is the period "
.
" character.
1.5. Tab completion
Chapter 1. Introduction
15