Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? AmigaOne
U-Boot SLB Linux Amiga OS Dual Boot Motherboards Peripherals Other
Initialisation Installation OS4 Updates About OS4 File Systems Networking Printing Other
Introduction File System Workbench Preferences Commands Error Msgs Miscellaneous

AmigaOS 4.0 - About OS4 - Commands

PROMPT Internal
Purpose: Changes the prompt string of the current Shell.
Format: PROMPT [<prompt>]
Template: PROMPT
Path: Internal
PROMPT allows you to customize the prompt string, the text printed by the Shell at the beginning of a command line. The prompt string can contain any characters, including escape sequences.

These web pages shows the prompt string as 3.OS4:>.

The default prompt string is: ' %N.%S> ' which displays the Shell number, a period, the current directory, a right angle-bracket, and a space. Entering PROMPT without a string argument resets the prompt to this default.

The substitutions available for the <prompt> string are:

%N Displays the process number for the Shell.
%S Displays the current directory.
%R Displays the return code for the last operation.
A space is not automatically added to the end of the string. If you want a space between the prompt and typed-in text, place it in the string, and enclose the string in double quotation marks (").

You can embed commands in the prompt string by enclosing the command in back apostrophes (`).

Example 1:

3.OS4:> PROMPT %N
3
only the Shell number is shown. The > is removed from the prompt.

Example 2:

3.OS4:> CD Work:Snim
3.OS4:> PROMPT "%N.%S.%R>"
3.Work:Snim.0>
The Shell number, current directory, and return code of the previous command are shown. A space is included after the >.


Return to Commands Selection

Disclaimer: Amiga Auckland have prepared the above Information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the Information and cannot be held accountable for any issues that may result from using it.


Copyright 2006 Amiga Auckland Inc. All rights reserved.
Revised: February 9, 2006.