cmd: Fix cmd to take /? as a help parameter.
This commit is contained in:
parent
3b6498a520
commit
a607f53779
@ -1134,12 +1134,12 @@ void WCMD_give_help (WCHAR *command) {
|
|||||||
else {
|
else {
|
||||||
for (i=0; i<=WCMD_EXIT; i++) {
|
for (i=0; i<=WCMD_EXIT; i++) {
|
||||||
if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
|
if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
|
||||||
param1, -1, inbuilt[i], -1) == 2) {
|
command, -1, inbuilt[i], -1) == 2) {
|
||||||
WCMD_output_asis (WCMD_LoadMessage(i));
|
WCMD_output_asis (WCMD_LoadMessage(i));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WCMD_output (WCMD_LoadMessage(WCMD_NOCMDHELP), param1);
|
WCMD_output (WCMD_LoadMessage(WCMD_NOCMDHELP), command);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1411,6 +1411,15 @@ void WCMD_execute (WCHAR *command, WCHAR *redirects,
|
|||||||
WCMD_parse (p, quals, param1, param2);
|
WCMD_parse (p, quals, param1, param2);
|
||||||
WINE_TRACE("param1: %s, param2: %s\n", wine_dbgstr_w(param1), wine_dbgstr_w(param2));
|
WINE_TRACE("param1: %s, param2: %s\n", wine_dbgstr_w(param1), wine_dbgstr_w(param2));
|
||||||
|
|
||||||
|
if((p[0] == '/') && (p[1] == '?')) {
|
||||||
|
|
||||||
|
/*this is a help request for a program*/
|
||||||
|
i = WCMD_HELP;
|
||||||
|
memcpy(p, whichcmd, count * sizeof(WCHAR));
|
||||||
|
p[count] = '\0';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
switch (i) {
|
switch (i) {
|
||||||
|
|
||||||
case WCMD_ATTRIB:
|
case WCMD_ATTRIB:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user