beautypg.com

Autocompleting current and default value, Configuration object type categories, Edit an existing property value – Amer Networks E5 CLI User Manual

Page 16: Using categories with tab completion

background image

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. If "

.

" is entered instead of a property value and tab is pressed it will be replaced by the

current value of that property. This is useful when editing an existing list of items or a long text
value.

The "<" character before a tab can be used to automatically fill in the default value for a
parameter if no value has yet been set. If the "." character is used, all possible values will be
shown and these can then be edited with the back arrrow and backspace keys.

Example 1.6. Edit an existing property value

Edit the current value:

Device:/> add IP4Address example_ip Address=1.2.3.4
Device:/> set IP4Address example_ip Address=. (tab)
Device:/> set IP4Address example_ip Address=1.2.3.4

(the value was inserted)

The value can now be edited by using the arrow keys or backspace.

Device:/> set IP4Group examplegroup Members=ip1,ip2,ip3,ip5
Device:/> set IP4Group examplegroup Members=. (tab)
Device:/> set IP4Group examplegroup Members=ip1,ip2,ip3,ip5
(the value was inserted)
It is now possible to add or remove a member to the list without
having to enter all the other members again.

Edit the default value:

Device:/> add LogReceiverSyslog example Address=example_ip

LogSeverity=. (tab)

Device:/> add LogReceiverSyslog example Address=example_ip

LogSeverity=Emergency,Alert,Critical,Error,Warning,Notice,Info

Now it is easy to remove a log severity.

1.5.3. Configuration object type categories

Some object types are grouped together in a category in the CLI. This only matters when using
tab completion as they are used to limit the number of possible completions when tab
completing object types. The category can always be omitted when running commands if the
type name is entered manually.

Example 1.7. Using categories with tab completion

Accessing an IP4Address object with the use of categories:

Device:/> show ad (tab)
Device:/> show Adress (the category is autocompleted)
Device:/> show Adress ip4a (tab)
Device:/> show Adress IP4Address (the type is autocompleted)
Device:/> show Adress IP4Address example_ip

Chapter 1: Introduction

16

This manual is related to the following products: