beautypg.com

Tab completion, Inline help, Section 1.5.1, “inline help – Amer Networks E5 CLI User Manual

Page 15

background image

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:

Device:/> add Add (tab)
Device:/> add Address ("ress" was autocompleted)
Device:/> add Address i (tab)
Device:/> add Address IP4 ("IP4" was autocompleted)
Device:/> add Address IP4

(tab, or double tab if IP4 were entered manually)

A list of all types starting with IP4 is listed.
Device:/> add Address IP4a (tab)
Device:/> add Address IP4Address ("Address" was autocompleted)
Device:/> add Address IP4Address example_ip a (tab)
Device:/> add Address IP4Address example_ip Address=

("Address=" was autocompleted)

Device:/> add Address IP4Address example_ip Address=1.2.3.4

Tab completion of references:

Device:/> set Address IP4Group examplegroup Members= (tab, tab)
A list of valid objects is displayed.
Device:/> set Address IP4Group examplegroup Members=e (tab)
Device:/> 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:

Device:/> set IP4Address example_ip ? (tab)
A help text describing all available properties is displayed.

Getting inline help for the Address property:

Device:/> set IP4Address example_ip Address=? (tab)

Chapter 1: Introduction

15

This manual is related to the following products: