Command Completion

Command completion allows you to run a command by entering a partial string.

To complete the spelling of commands or keywords automatically, begin typing the command or keyword and then press Tab. For example, entering conf t in privileged EXEC mode auto-completes the keyword and executes the configure terminal command.

device# conf t
  terminal   Configure thru terminal
device# conf terminal
device(config)#

In releases prior to FastIron 08.0.80, if there are two or more matching nodes, the node will not be auto-filled when Tab is pressed. You must type all the characters in the node to differentiate among the nodes. In the following example "dh" is matched with multiple nodes. Pressing Tab does not auto-complete the keyword but has to manually type all the characters in the node.

device(config)#ip dh
  dhcp                          Set DHCP option
  dhcp-client                   DHCP client options
  dhcp-server                   DHCP Server
  dhcp-valid-check              Check DHCP offer packet for NULL client addr

In FastIron 08.0.80 release onwards, if there are more than one command or keyword associated with the characters typed, pressing Tab auto-fills the nodes up to the last common matching character among all the nodes so that typing a single character allows you to auto-fill to complete the keyword.

device(config)# ip dh<and press Tab>

device(config)# ip dhcp
 dhcp                          Set DHCP option
 dhcp-client                   DHCP client options
 dhcp-server                   DHCP Server
 dhcp-valid-check              Check DHCP offer packet for NULL client addr
 

In the previous example, because dhcp is the common word among the 4 options, issuing Tab will autofill "dh" to "dhcp". The CLI displays all choices matching the characters. Type another character to differentiate among the nodes and utilize the Tab-based command completion thus improving the usability.

device(config)# ip dhcp-c<and press Tab>

device(config)# ip dhcp-client
 auto-update                   Enable the DHCP client auto-update
 disable                       disable DHCP client globally on router
 

If you enter an invalid command or partial string that cannot be completed, an error message is displayed.

device(config)#shw
Unrecognized command
device(config)#shw