http://bugs.winehq.org/show_bug.cgi?id=21131
Summary: cmd /c echo "&" returns 'Echo is ON', not '"&"' Product: Wine Version: 1.1.35 Platform: x86 OS/Version: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: programs AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
echo /c ^& should give & as well, but that's bug 18346...
http://bugs.winehq.org/show_bug.cgi?id=21131
--- Comment #1 from Austin English austinenglish@gmail.com 2009-12-22 21:51:19 --- Test added: http://code.google.com/p/winezeug/source/detail?r=897
http://bugs.winehq.org/show_bug.cgi?id=21131
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|programs |cmd
http://bugs.winehq.org/show_bug.cgi?id=21131
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |us@edmeades.me.uk
--- Comment #2 from Jason Edmeades us@edmeades.me.uk 2010-01-06 18:26:41 --- Adding myself to the cmd bugs
http://bugs.winehq.org/show_bug.cgi?id=21131
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |dank@kegel.com Resolution| |INVALID
--- Comment #3 from Dan Kegel dank@kegel.com 2010-02-18 01:26:22 --- I get
Z:\home\dank>echo "&" "&"
so I think this is invalid.
http://bugs.winehq.org/show_bug.cgi?id=21131
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2010-02-18 01:35:09 --- Closing invalid.
http://bugs.winehq.org/show_bug.cgi?id=21131
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|INVALID |
--- Comment #5 from Austin English austinenglish@gmail.com 2010-02-18 01:35:34 --- You have to use 'cmd /c echo "&"'
austin@midna:~$ wine cmd /c echo "&" Echo is ON
On windows, it returns "&"
It's a valid bug, albeit a minor corner case.
http://bugs.winehq.org/show_bug.cgi?id=21131
--- Comment #6 from Dan Kegel dank@kegel.com 2010-02-18 09:05:09 --- That's incorrect; Unix is stripping your quotes. The correct test case from the commandline would be something like $ wine cmd /c echo '"&"' but the output for that is bizarre: "&" perhaps we do have a bug.
http://bugs.winehq.org/show_bug.cgi?id=21131
--- Comment #7 from Austin English austinenglish@gmail.com 2010-02-18 09:57:29 --- (In reply to comment #6)
That's incorrect; Unix is stripping your quotes. The correct test case from the commandline would be something like $ wine cmd /c echo '"&"' but the output for that is bizarre: "&" perhaps we do have a bug.
Using backslashes does the same: austin@midna:~$ wine cmd /c echo "&" "&"
http://bugs.winehq.org/show_bug.cgi?id=21131
--- Comment #8 from Dan Kegel dank@kegel.com 2010-02-18 11:12:23 --- Probably the behavior we want to match is running the command on Cygwin in Windows. So:
$ cmd /c echo '"&"' "" '""' is not recognized as an internal or external command, operable program or batch file.
So it looks like native parses "&" as two commands (each consisting of the single char ") separated by the command separator &. And when you escape & using ^,
$ cmd /c echo '"^&"' ""&""
you get the bizarre quoting that Wine's cmd does.
So the bug here, if any, is that & isn't treated as a (high-enough precedence, perhaps) command separator when used on the cmd /c commandline? That's different enough that someone should come up with a clean bug report and test case, and close this one.
http://bugs.winehq.org/show_bug.cgi?id=21131
--- Comment #9 from Vitaliy Margolen vitaliy@kievinfo.com 2010-02-18 18:57:28 --- Just test it from within cmd to not fight with *NIX shell:
------XP: C:>cmd /c echo "&" "&"
C:> ------Wine: C:>cmd /c echo "&" Echo is ON
C:>
http://bugs.winehq.org/show_bug.cgi?id=21131
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |us@edmeades.me.uk
--- Comment #10 from Jason Edmeades us@edmeades.me.uk 2010-09-06 14:28:16 CDT --- Patch submitted for this bug in tghe patchset starting http://www.winehq.org/pipermail/wine-patches/2010-September/092915.html
Patch set failed on WinNT4 so reworking slightly, but fixes for this defect are included in it.
http://bugs.winehq.org/show_bug.cgi?id=21131
Frédéric Delanoy frederic.delanoy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic.delanoy@gmail.com
--- Comment #11 from Frédéric Delanoy frederic.delanoy@gmail.com 2011-05-27 07:57:35 CDT --- Confirmed in wine-1.3.20-439-g1ec78b8
http://bugs.winehq.org/show_bug.cgi?id=21131
--- Comment #12 from Frédéric Delanoy frederic.delanoy@gmail.com 2011-07-14 10:44:58 CDT --- (In reply to comment #10)
Patch submitted for this bug in tghe patchset starting http://www.winehq.org/pipermail/wine-patches/2010-September/092915.html
Patch set failed on WinNT4 so reworking slightly, but fixes for this defect are included in it.
If your patches still apply, you could try to submit them on wine-devel for review.
http://bugs.winehq.org/show_bug.cgi?id=21131
--- Comment #13 from Jason Edmeades us@edmeades.me.uk 2011-07-14 15:11:21 CDT --- I did - they were also sent to wine-patches.
Unfortunately due to work pressures over the last 12 months, I've had no time to do anything other than follow wine, and I currently have no Linux system. Whilst I'd like to get back to it, it wont be any time soon.
Most of the patchset is fine and most could/should go in as-was - the problem was one patch where I used process monitor to confirm that windows did the same as I ended up coding (after coding the change in the first place!), but AJ didnt like it so one of the patches is ineligable for submission - See wine-devel for more details.
http://bugs.winehq.org/show_bug.cgi?id=21131
Jake Thomas jthomas97411@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jthomas97411@yahoo.com
--- Comment #14 from Jake Thomas jthomas97411@yahoo.com 2011-10-02 17:29:00 CDT --- This bug is not limited to "&", should I submit a separate bug report?
wine cmd /c echo "!" bash: !: event not found
wine cmd /c echo "<" Path not found
wine cmd /c echo ">" Path not found
wine cmd /c echo ""
[must use Ctrl+c to get out, else it keeps giving you a ">"]
wine cmd /c echo "|" Echo is ON
wine cmd /c echo "`"
[must use Ctrl+c to get out, else it keeps giving you a ">"]
wine cmd /c echo """
[must use Ctrl+c to get out, else it keeps giving you a ">"]
Cheers, Jake
http://bugs.winehq.org/show_bug.cgi?id=21131
--- Comment #15 from Frédéric Delanoy frederic.delanoy@gmail.com 2011-10-03 01:39:07 CDT --- (In reply to comment #14) As a start, Martin Wilck has just sent some cmd /c parsing fixes (not yet applied); see wine-devel for information.
This bug is not limited to "&", should I submit a separate bug report?
wine cmd /c echo "!" bash: !: event not found
As mentioned in the message, bash interprets the bang, not wine. Use '!' instrad (i.e. use bash quoting rules). To check wine behaviour more closely, you should preferably try them from within "wine cmd" (mixing wine/cmd quoting can be tricky; e.g. ./wine cmd echo '"!"')
wine cmd /c echo "<" Path not found
wine cmd /c echo ">" Path not found
wine cmd /c echo ""
[must use Ctrl+c to get out, else it keeps giving you a ">"]
wine cmd /c echo "|" Echo is ON
wine cmd /c echo "`"
[must use Ctrl+c to get out, else it keeps giving you a ">"]
wine cmd /c echo """
[must use Ctrl+c to get out, else it keeps giving you a ">"]
Those work with Martin's patches applied, tried within cmd
Hopefully they'll be merged soon.
http://bugs.winehq.org/show_bug.cgi?id=21131
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|us@edmeades.me.uk |wine-bugs@winehq.org
http://bugs.winehq.org/show_bug.cgi?id=21131
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |us@edmeades.me.uk
http://bugs.winehq.org/show_bug.cgi?id=21131
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |f252e9dfc85303d645ec545f238 | |fd8ee11ff2497 Status|REOPENED |RESOLVED Resolution| |FIXED
--- Comment #16 from Jason Edmeades us@edmeades.me.uk 2012-10-03 15:56:17 CDT --- Fixed in git - please retest / reopen if any more problems
http://bugs.winehq.org/show_bug.cgi?id=21131
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #17 from Alexandre Julliard julliard@winehq.org 2012-10-12 13:36:31 CDT --- Closing bugs fixed in 1.5.15.