[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Using Command Completion in Configuration Mode

The CLI command completion functions also apply to the commands in configuration mode and to configuration statements. Specifically, to display all possible commands or statements, type the partial string followed immediately by a question mark; to complete a command or statement that you have partially typed, press Tab or the Spacebar.

Command completion also applies to identifiers, with one slight difference. To display all possible identifiers, type a partial string followed immediately by a question mark. To complete an identifier, you must press Tab. This scheme allows you to enter identifiers with similar names; then press the Spacebar when you are done typing the identifier name.

Examples: Using Command Completion in Configuration Mode

List the configuration mode commands:


user@host# ?
Possible completions:
<[Enter]>  Execute this command
activate   Remove the inactive tag from a statement
annotate   Annotate the statement with a comment
commit     Commit current set of changes
copy       Copy a statement
deactivate Add the inactive tag to a statement
delete     Delete a data element
edit       Edit a sub-element
exit       Exit from this level
help       Provide help information
insert     Insert a new ordered data element
load       Load configuration from an ASCII file
quit       Quit from this level
rename     Rename a statement
rollback   Roll back database to last committed version
run        Run an operational-mode command
save       Save configuration to an ASCII file
set        Set a parameter
show       Show a parameter
status     Display database user status
top        Exit to top level of configuration
up         Exit one level of configuration 

List all the statements available at a particular hierarchy level:


[edit]
user@host# edit ?
Possible completions:
> accounting-options  Accounting data configuration
> chassis             Chassis configuration
> class-of-service    Class-of-service configuration
> firewall            Define a firewall configuration
> forwarding-options  Configure options to control packet sampling 
> groups              Configuration groups
> interfaces          Interface configuration
> policy-options      Routing policy option configuration
> protocols           Routing protocol configuration
> routing-instances   Routing instance configuration
> routing-options     Protocol-independent routing option configuration
> snmp                Simple Network Management Protocol
> system              System parameters

user@host# edit protocols ?
Possible completions:
<[Enter]>          Execute this command
> bgp              BGP options
> connections      Circuit cross-connect configuration
> dvmrp            DVMRP options
> igmp             IGMP options
> isis             IS-IS options
> ldp              LDP options
> mpls             Multiprotocol Label Switching options
> msdp             MSDP options
> ospf             OSPF configuration
> pim              PIM options
> rip              RIP options
> router-discovery ICMP router discovery options
> rsvp             RSVP options
> sapSession       Advertisement Protocol options
> vrrp             VRRP options
|                  Pipe through a command

[edit]
user@host# edit protocols

List all commands that start with a particular letter or string:


user@host# edit routing-options a?
Possible completions:
> aggregate           Coalesced routes
> autonomous-system   Autonomous system number

[edit]
user@host# edit routing-options a

List all configured Asynchronous Transfer Mode (ATM) interfaces:

user@host# edit interfaces at?
Possible completions:
<interface_name> Interface name
at-2/1/1
at-2/2/0
at-5/1/0
[edit]
user@host# edit interfaces at

Display a list of all configured policy statements:

[edit]
user@host# show policy-options policy-statement ?
Possible completions:
<policy_name> Name to identify a policy filter
[edit]
user@host# edit policy-options policy-statement

[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]