prompt ( en )

Last modification : 2013/01/26 19:16

The prompt command is used to redefine the first level command prompt when msh is used in interactive mode. The default prompt is simply msh> . Without any parameter this command restore the prompt to this default value.

Here is an example of useful prompt:
msh> prompt \"\n[%d]\n%u@%f2%h%fF> %n\"
[C:\TEMP]
Cyd@CONCORDE> 
A good idea is to add this command to the .mshrc file.

Some variables are used to make the prompt more dynamic:
%bxxchange de background color to xx
%dthe current directory
%fxxchange de foreground color to xx
%hhostname of the machine
%ichange the current font to blink mode
%jdate of the current day
%nchange the current font to normal mode
%ochange the current font to bold mode
%pPID of the current process
%rchange the current font to underline mode
%sdate and time using the format defined into the MSH_DATE_FORMAT variable
%tcurrent time (format %H:%M:%S)
%uusername
\ncarriage return
%_the character %



The second level command prompt is 2> and can't be redefined. And it is the same with all the next levels.