The command is not immediately executed, so that you may modify the command if necessary. If you enter a set of characters that could indicate more than one command, the system simply lists all possible commands.

You may also enter a question mark (?) to obtain a list of commands that begin with that set of characters. Do not leave a space between the last letter entered and the question mark (?). For example, there are three commands in privileged mode that start with co. To see what they are, type co? at the privileged EXEC prompt:

Router# co? configure copy Router# co

3.8.3 Editing Command Lines that Wrap

The enhanced editing feature provides a wraparound for commands that extend beyond a single line on the screen. When the cursor reaches the right margin, the command line shifts 8 spaces to the left. You cannot see the first eight characters of the line, but you can scroll back and check the syntax at the beginning of the command. To scroll back, use the following command:

Keystrokes

Purpose

 

 

Press Ctrl-Bor the left arrow key repeatedly

Return to the beginning of a command line to verify that

until you scroll back to the beginning of the

you have correctly entered a lengthy command.

command entry, or press Ctrl-Ato return

 

directly to the beginning of the line.

 

 

 

Note: The arrow keys function only on ANSI-compatible terminals such as VT100.

In the following example, the access-list command entry extends beyond one line. When the cursor first reaches the end of the line, the line is shifted 8 spaces to the left and redisplayed. The dollar sign ($) indicates that the line has been scrolled to the left. Each time the cursor reaches the end of the line, it is again shifted 8 spaces to the left.

Router(config)# access-list 101 permit icmp 192.168.123.0 0.0.0.255 192 Router(config)# $ st 101 permit icmp 192.168.123.0 0.0.0.255 192.168.0.1

When you have completed the entry, press Ctrl-Ato check the complete syntax before pressing Enter to execute the command. The dollar sign ($) appears at the end of the line to indicate that the line has been scrolled to the right:

Router(config)# access-list 101 permit icmp 192.168.123.0 0.0.0.255 192$

Use line wrapping in conjunction with the command history feature to recall and modify previous complex command entries.

3.8.4 Deleting Entries

Use any of the following commands to delete command entries if you make a mistake or change your mind:

Keystrokes

Purpose

 

 

Press the Delete or Backspace

Erase the character to the left of the cursor.

key.

 

 

 

Press Ctrl-D.

Delete the character at the cursor.

 

 

Press Ctrl-K.

Delete all characters from the cursor to the end of the command line.

 

 

28

Page 28
Image 28
Asante Technologies 35516 Editing Command Lines that Wrap, Deleting Entries, Router# co? configure copy Router# co