cmd: Fix a usage message: the % must be doubled for FOR variables. (resend)

Francois Gouget fgouget at free.fr
Fri Jul 12 05:06:14 CDT 2013


The usage message was in fact documenting an old Wine bug.
---

The attempt did not apply, probably because I had other changes in my 
tree. Hopefully this one will work.


I'm reluctant to change messages at this stage as it's going to cause 
fuzzying of the translations, but given that this message is plain wrong 
I think it's warranted. To verify this, try out the following commands:

$ echo 'for %%i in (1 2) do echo %%i' >foo.cmd; wine cmd /c 
foo.cmd

C:\>for %i in (1 2) do echo %i 
1
2
$ echo 'for %%i in (1 2) do echo %i' >foo.cmd; wine cmd /c foo.cmd

C:\>for %i in (1 2) do echo i 
i
i
$ echo 'for %i in (1 2) do echo %i' >foo.cmd; wine cmd /c foo.cmd

C:\>for i 
Syntax error
$ wine cmd
Wine CMD version 5.1.2600 (1.6-rc4)

C:\>for %i in (1 2) do echo %i
1
2


 programs/cmd/cmd.rc |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/programs/cmd/cmd.rc b/programs/cmd/cmd.rc
index 2e94b3b..b3357c5 100644
--- a/programs/cmd/cmd.rc
+++ b/programs/cmd/cmd.rc
@@ -65,8 +65,7 @@ preceding it with an @ sign.\n"
 \n\
 Syntax: FOR %variable IN (set) DO command\n\
 \n\
-The requirement to double the % sign when using FOR in a batch file does\n\
-not exist in wine's cmd.\n"
+The FOR variable's % sign must be doubled in batch files.\n"
 
   WCMD_GOTO,
 "The GOTO command transfers execution to another statement within a\n\
-- 
1.7.10.4



More information about the wine-patches mailing list