mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
Correctly assign %propmt%.
cmd.c = give %prompt% default value of $P$G prompt.c = when param are null, assign %prompt% to $P$G svn path=/trunk/; revision=17613
This commit is contained in:
@@ -1358,6 +1358,8 @@ Initialize (int argc, TCHAR* argv[])
|
||||
hOut = GetStdHandle (STD_OUTPUT_HANDLE);
|
||||
hIn = GetStdHandle (STD_INPUT_HANDLE);
|
||||
|
||||
SetEnvironmentVariable (_T("PROMPT"), _T("$P$G"));
|
||||
|
||||
|
||||
if (argc >= 2 && !_tcsncmp (argv[1], _T("/?"), 2))
|
||||
{
|
||||
|
||||
@@ -193,7 +193,7 @@ VOID PrintPrompt(VOID)
|
||||
|
||||
INT cmd_prompt (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
|
||||
TCHAR szParam[512];
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_PROMPT_HELP1);
|
||||
@@ -204,9 +204,13 @@ INT cmd_prompt (LPTSTR cmd, LPTSTR param)
|
||||
ConOutResPaging(FALSE,STRING_PROMPT_HELP3);
|
||||
return 0;
|
||||
}
|
||||
if (param[0] != _T('\0'))
|
||||
_tcscpy(szParam,param);
|
||||
else
|
||||
_tcscpy(szParam,_T("$P$G"));
|
||||
|
||||
/* set PROMPT environment variable */
|
||||
if (!SetEnvironmentVariable (_T("PROMPT"), param))
|
||||
if (!SetEnvironmentVariable (_T("PROMPT"), szParam))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user