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


Having the CLI Complete Commands

You do not always have to remember or type the full command or option name for the CLI to recognize it. To display all possible command or option completions, type the partial command followed immediately by a question mark.

To complete a command or option that you have partially typed, press Tab or the Space Bar. If the partially typed letters begin a string that uniquely identifies a command, the complete command name appears. Otherwise, a beep indicates that you have entered an ambiguous command, and the screen displays the possible completions.

Command completion also applies to others strings, such as filenames and usernames. To display all possible values, you can type a partial string followed immediately by a question mark. However, to complete these strings, press Tab; pressing the Space Bar does not work.

For example, issue the show interface command:

user@host> sh<Space>ow i<Space>
`i' is ambiguous.
Possible completions:
    igmp                Show information about IGMP
    interface                Show interface information
    isis                Show information about IS-IS
user@host> show in<Space>terfaces <Enter>
Physical interface: at-0/1/0, Enabled, Physical link is Up
  Interface index: 11, SNMP ifIndex: 65
  Link-level type: ATM-PVC, MTU: 4482, Clocking: Internal, SONET mode
  Speed: OC12, Loopback: None, Payload scrambler: Enabled
  Device flags   : Present Running
  Link flags     : 0x01
...
user@host>

Display a list of all log files whose name starts with the string "messages," and then display the contents of one of the files:

user@myhost> show log mes?
Possible completions:
  <filename>                                Log file to display
  messages                                Size: 1417052, Last changed: Mar  3 00:33
  messages.0.gz                                Size: 145575, Last changed: Mar  3 00:00
  messages.1.gz                                Size: 134253, Last changed: Mar  2 23:00
  messages.2.gr                                Size: 137112, Last changed: Mar  2 22:00
user@myhost> show log mes<Tab>sages.4<Tab>.gz<Enter>
Jan 15 21:00:00 myhost newsyslog[1381]: logfile turned over

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