Previous Next Chapter

Using the Shell

Enter AmigaDOS commands at the Shell's text prompt. Include with the command any necessary information, such as file names or command options. Press Return at the end of each command line to execute the command. The Shell prompt reappears when the command is finished executing.

To see command output that has scrolled out of the Shell window, enlarge the window by selecting the Shell zoom gadget or using the sizing gadget. This reveals as much of the previous contents of the window as fits. Figure 2-2 illustrates a Shell window before and after using the zoom gadget to display the entire output of a LIST command.

Figure 2-2. Revealing Previous Output with the Zoom Gadget

Command Line Editing and Control

To simplify entering and editing command line text, the AmigaDOS Shell provides the following editing key and key combination options:

left arrow

Moves cursor one character to the left.

right arrow

Moves cursor one character to the right.

Shift+left arrow

Moves cursor to the beginning of the line.

Shift+right arrow

Moves cursor to the end of the line.

Backspace

Deletes the character to the left of the cursor.

Del

Deletes the character highlighted by the cursor.

Ctrl+H

Deletes the last character (same as Backspace).

Ctrl+M

Processes the command line (same as Return).

Ctrl+J

Adds a line feed.

Ctrl+W

Deletes the word to the left of the cursor.

Ctrl+X

Deletes the current line.

Ctrl+K

Deletes everything from the cursor forward to the end of the line.

Ctrl+Y

Replaces the characters deleted with Ctrl+K.

Ctrl+U

Deletes everything from the cursor backward to the start of the line.

In addition, the Shell supports the following keys and key combinations:

Space bar (or any printable character)

Suspends output (stops scrolling).

Backspace

Resumes output (continues scrolling).

Ctrl+C

Sends a BREAK command to the current process (halts the process).

Ctrl+D

Sends at BREAK command to the current script (halts the script).

Ctrl+F

Activates and brings Workbench program windows to the front.

Ctrl+S

Suspends output.

Ctrl+Q

Resumes output if it was suspended with Ctrl+S.

Ctrl+\

Closes the Shell window. When console |/O is redirected to another device with * restores normal |/O.

The Shell allows you to enter a command or other information while listing output. However, this stops the output until you press the Return key. The new command executes after the output is finished listing.

If you enter a new command or text and then choose to delete it, the original output resumes scrolling as soon as the last character is erased.

Using the Command History

The Shell uses a 2 KB command line buffer to retain command lines, which provides a command history. Using this history you can recall previously entered command lines, edit them, and re-execute them. This lets you easily repeat a command or enter several similar commands. Figure 2-3 illustrates a series of commands stored in the command history buffer.

Figure 2-3. Command History Buffer

The exact number of lines retained in the command line buffer varies depending on the length of the lines actually stored. When the buffer is full, the oldest lines are removed. You can access lines in the buffer with the up and down arrow keys:

up arrow

Moves backward in the history buffer (earlier lines).

down arrow

Moves forward in the history buffer (later lines).

For example, you can copy several .info files from one directory to another by enteringthe full command line with the complete path only once and then recalling the lines as many times as necessary, changing only the file name.

You can also search for the most recent occurrence of a specific command by entering the command line, or the beginning of it, and pressing Shift+up arrow (or Ctrl+R). For example, if you enter DIR and press Shift+up arrow, you are returned to the last command entered to perform a DIR of any directory. Pressing Shift+down arrow goes to the bottom of the command history buffer, leaving the cursor on a blank line.

Top Previous Next Chapter