Previous Next Chapter

Customizing the Shell

You can customize your Shell environment by changing the S:Shell-startup file, which is a script that is executed each time a new Shell is opened. You can edit Shell-startup to set up command aliases and to change the Shell prompt.

Using Aliases

An aliases is an abbreviation for a long and/or frequently used command. Aliases can be local or global. Local aliases are entered in a Shell window and are only recognized in that Shell. Global aliases area entered into the Shell-startup file and are recognized by all Shells.

The Alias format is as follows:

ALIAS <name> <string>

where <name> is the alias name to be entered at the Shell prompt to execute a command. The <string> is the command line to be executed.

See Chapter 6 for a full description of the ALIAS command and Chapter 8 for a list of useful aliases.

Changing the Prompt

The PROMPT command lets you customize the Shell prompt. By default, it shows the process number, a period, the current directory, a right angle bracket (>), and a space:

1.Workbench:>

The prompt can display almost anything, with or without the process number and directory information. The return code of the last command executed can be included. The prompt can contain escape sequences, allowing you to change text color and style in the prompt string or clear the screen.

Benefits of customizing your Shell prompt include making the prompt:

See Chapter 8 for examples of how to use escape sequences to make the prompt more readable.

Top Previous Next Chapter