Vyatta Network OS Documentation

Learn how to install, configure and operate the Vyatta NOS, which helps drive our virtual networking & physical platforms portfolio.

Command completion

To save keystrokes when typing command strings, Vyatta NOS provides two methods of completing commands. The first method allows you to use unambiguous command prefixes when specifying a command. For example, entering sh configu in operational mode is equivalent to entering show configuration. Entering an ambiguous command prefix, for example, sh conf, produces an error message that explains the ambiguity and a list of possible completions. The second method uses the <Tab> key to complete an unambiguous command. For example, typing sh <Tab> in operational mode produces show. If the command prefix you type is ambiguous, following it with <Tab> produces a list of possible completions. Pressing <Tab> a second time produces help strings for the list of possible completions.

Note: The ? key, like the <Tab> key, provides help strings for commands.

Use command completion on an unambiguous command

The following example shows how to request command completion for the sh entered string. In this example, the command to be completed is unambiguous.

vyatta@vyatta:~$sh<Tab>
vyatta@vyatta:~$ show

Use command completion on an ambiguous command

The following example shows how to request command completion for the s entered string. In this case, more than one command can complete the entry and the system lists all valid completions.

vyatta@vyatta:~$s<Tab>
set		   show
vyatta@vyatta:~$ s

Display help strings for commands

The following example shows how to request command completion for the s entered string a second time. In this case, help strings for the possible completions are displayed.

vyatta@vyatta:~$s<Tab>
Possible completions:
  save          Save configuration to a file
  set           Set the value of a parameter or create a new element
  show          Show the configuration (default values may be suppressed)	
vyatta@vyatta:~$ s