| Lesson 7 | Changing your system prompt |
| Objective | Use the prompt variable to redefine your system prompt. |
By default, the C shell uses the percent sign (%) as a prompt.
You can change the default by redefining the C shells prompt variable , using this general form:
% set prompt=value
For example, to set your prompt to Hello there %, use this command:
% set prompt="Hello there %"
Hello there %
Note the following:
- First, its a UNIX convention to keep the default character at the end of a prompt. This helps you identify your shell. For example, the prompt for your course account is lab2%.
- Second, the prompt value must be supplied as a single argument. Because Hello there % contains spaces, the phrase is quoted. This causes the shell to treat the value as a single argument instead of as two.
- Finally, notice that the new prompt appears right after you set it.
% set prompt="danielg %" danielg %
More complex prompts also can be defined.
In the next lesson, storing your custom settings will be discussed.
In the next lesson, storing your custom settings will be discussed.