[BOOTDATA]

[CMD]
The default command prompt is $p$g. But still keep the information line by setting a system environment variable "PROMPT" set to $i$p$g. Therefore, if you are tired of it, either remove the environement variable or redefine it to whatever you want. In a current command-line session, to restore the default command prompt, enter "prompt" without any other parameter.

svn path=/trunk/; revision=59837
This commit is contained in:
Hermès Bélusca-Maïto 2013-08-26 18:35:29 +00:00
parent 77377b7e9b
commit 12796b070e
2 changed files with 9 additions and 13 deletions

View file

@ -52,7 +52,7 @@
static TCHAR InfoLine[] = _T(" ReactOS Command Prompt Type HELP = Help ");
/* The default prompt */
static TCHAR DefaultPrompt[] = _T("$I$P$G");
static TCHAR DefaultPrompt[] = _T("$P$G");
/*
@ -256,18 +256,13 @@ INT cmd_prompt(LPTSTR param)
}
/*
* If 'param' is NULL, then we need to set it to default,
* because that means the user entered "prompt" only.
* So even if 'param' is null you _must_ still set prompt
* to the default. There seems to be some kind of difference
* between winxp and 2k in this matter and this way will
* cover both. Do not use fixed size of 'szParam' for 'param';
* the buffers are 8192 bytes and will later change to dynamic buffer.
* Set the PROMPT environment variable. If 'param' is NULL or is
* an empty string (the user entered "prompt" only), then remove
* the environment variable and therefore use the default prompt.
* Otherwise, use the new prompt.
*/
/* Set the PROMPT environment variable */
if (!SetEnvironmentVariable(_T("PROMPT"),
(param[0] != _T('\0') ? param : DefaultPrompt)))
(param && param[0] != _T('\0') ? param : NULL)))
{
return 1;
}

View file

@ -1211,10 +1211,11 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","UNC",0x0000
; System environment settings
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","ComSpec",0x00020000,"%SystemRoot%\system32\cmd.exe"
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem"
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%"
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PATHEXT",0x00000000,".COM;.EXE;.BAT;.CMD"
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PROMPT",0x00000000,"$I$P$G"
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TEMP",0x00020000,"%SystemDrive%\TEMP"
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TMP",0x00020000,"%SystemDrive%\TEMP"
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PATHEXT",0x00000000,".COM;.EXE;.BAT;.CMD"
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%"
; Known DLLs