Add a help.exe utility to replace the old built-in command "help" in cmd.exe (i.e. do it the Win2k3 way).
This way, if somebody runs a personalized command-line environment which provides its own help command, one can use the personalized help command and not the standard one (e.g. the "help" command of RosBE).
Adapted by myself from a patch by Lee Schroeder.
CORE-5701 #resolve #comment Committed in revision 59832, thanks :) I use a trick to be able to compile the utility (use: ninja cmd_help) because doing "ninja help" has a signification in ninja (signaled by AmineKhaldi).
svn path=/trunk/; revision=59832
Features-only commit:
- Fix version presentation at startup and when using the "ver" command (in French)
- Add to the prompt's command help, the fact that the $S specifier can be used to add a space.
- Implement the $I prompt specifier (see http://www.robvanderwoude.com/prompt.php), which sets
an information line on top of the screen (à la OS/2).
Use this new setting by default (I'm doing a poll on who loves it / hates it, and how we can improve it).
To disable it, use the command: "prompt $p$g" (the default windows' prompt).
To enable it, add the $s specifier to the prompt string (e.g. "prompt $i$p$g").
For your information, OS/2 uses "prompt $i[$p]" :)
svn path=/trunk/; revision=59422
- Simplify CommandColor and document it. Checking whether one sets the same color for both foreground and background is now only checked inside SetScreenColor.
Based on a patch by Victor
CORE-7191 #resolve #comment Committed in rev.59055.
- Fix handling of /T:<color> option when starting cmd.exe
- Remove unneeded error string.
svn path=/trunk/; revision=59055
* This significantly shrinks the dependency tracking data and the compiled objects size, which speeds up the whole build process (especially the incremental builds) accelerating the daily development as a result.
* No intended code changes, ~27% smaller build. Enjoy ;)
svn path=/trunk/; revision=58214
- Carlo Bramix: MultiByteToWideChar() has just 6 and not 8 parameters, probably it's a forgetten copy/past from WideCharToMultiByte().
- Carlo Bramix: ConvertULargeInteger() should have its parameter 'Len' declared as UINT rather than 'INT'. This fixes a signed/unsigned mismatch warning.
See issue #5678 for more details.
svn path=/trunk/; revision=49873
- Whilst this is non-standard and potentially makes the code less portable, it's supported by both gcc and msvc and should bringg increased compilation speed due to its optimized behaviour (doesn't need to invoke the preprocessor)
- Patch by Amine Khaldi [amine.khaldi@reactos.org]
svn path=/trunk/; revision=45685
- Changed type of return values from BOOL to INT, with 0 indicating success and any other value indicating failure. If the left side of an || operator returns nonzero, errorlevel is set to that value.
- The return value of a batch file or FOR is the return value of the last command executed in it. An empty batch file returns 0, unless it was CALLed, in which case it returns errorlevel.
- CALL sets errorlevel to the return value of whatever was called.
- Running a GUI program doesn't change errorlevel, but always returns 0.
- CMD /C uses the command's return value, not errorlevel, as the process exit code.
svn path=/trunk/; revision=40474
- Do %envvar% expansions in CMD /C or /K commands
- Make SETLOCAL recognize ENABLEEXTENSIONS and DISABLEEXTENSIONS, although it doesn't do anything yet
- Make VERIFY set the errorlevel (documented in SETLOCAL /?). Also make it recognize when ON/OFF is followed by space
- Make ECHOSERR actually print to stderr, not stdout
- Make echoed display of ( ... ) blocks look nicer (Bug 4022)
- Fix some other minor display bugs
svn path=/trunk/; revision=40244
- Fix overflow bug in FREE command that caused values >= 4GB to wrap around.
- A little simplification of ConvertULargeInteger function
svn path=/trunk/; revision=40094
- Implement IF /I option, IF CMDEXTVERSION, and generic comparisons (EQU etc)
- Make IF ERRORLEVEL return true if the errorlevel is greater than the number
- Remove hacked support for multi-line IF blocks from batch.c
svn path=/trunk/; revision=38280
- a hack in cmd_mkdir that was already obsolete a decade ago
- to distinguish "echo" from "echo.", but that is the wrong way to implement this anyway. There's nothing particularly special about the period, "echo" is just one of those commands that is lenient about where its parameters begin, and when it echos a line, the first character (usually a space, but in the case of "echo." a period) is skipped.
svn path=/trunk/; revision=35647
- ReadBatchLine: Don't strip the trailing \n, the parser needs it. Remove handling of :labels and @quiet commands, now done by the parser.
- ReadCommand: Add a \n to the line. Move PrintPrompt call out, since the prompt shouldn't be printed for additional lines read in a command beyond the first.
svn path=/trunk/; revision=35530
- Also change FilePromptYN and FilePromptYNA to take a resource ID. Remove varargs code which nobody used (and didn't actually work anyway)
svn path=/trunk/; revision=34816