PROMPT Command and %PROMPT% Variable

The PROMPT command and the %PROMPT% enable changing the text of the command prompt.

Synopsis

PROMPT prompt_format
SET PROMPT=prompt_format

The PROMPT command is equivalent to a call to SET modifying the %PROMPT% variable. The new format is specified through prompt_format, that can be any sequence of characters where the following sub strings will be expanded:

PROMPT without arguments resets %PROMPT% variable to its default value.

Compatibility

Mostly compatible with cmd.exe. However, the $m specifier is unsupported. In addition, $xCODE; specifier is a pBat extension.

Available since 218.2.

See also

Commands list