Module: wine Branch: master Commit: d8c0fbcedc266fadcb48cd560adcc909c9738d0d URL: http://source.winehq.org/git/wine.git/?a=commit;h=d8c0fbcedc266fadcb48cd560a...
Author: Jason Edmeades jason@edmeades.me.uk Date: Tue Sep 25 13:45:28 2012 +0100
cmd: Add circumflex support into command shell.
---
programs/cmd/tests/test_builtins.cmd.exp | 34 +++++++++++++++--------------- programs/cmd/wcmdmain.c | 4 +++ 2 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index a4f874c..b019280 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -123,7 +123,7 @@ bar2 'a', '~`+', '.{}!+b' 'a', 'b', '' '"a;b"', '', '' -@todo_wine@'a', 'b', '' +'a', 'b', '' 'a[b]{c}(d)e', '', '' 'a', '', '' second line @@ -197,25 +197,25 @@ A B C ------------ Testing circumflex escape character ------------ -@todo_wine@hello, world -@todo_wine@hello, world -@todo_wine@hell^o, world -@todo_wine@hell^o, world +hello, world +hello, world +hell^o, world +hell^o, world +baz baz -@todo_wine@baz -@todo_wine@foo | echo bar -@todo_wine@foo & echo bar -@todo_wine@bak & +foo | echo bar +foo & echo bar +bak & baz@space@ 0@or_broken@1 -@todo_wine@foo > foo -@todo_wine@< -@todo_wine@ffoof -@todo_wine@FOO=bar | baz -@todo_wine@0 -@todo_wine@FOO=bar ^| baz -@todo_wine@bar | baz -@todo_wine@0 +foo > foo +< +ffoof +FOO=bar | baz +0 +FOO=bar ^| baz +bar | baz +0 ------------ Testing 'set' ------------ 1 0 diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 94d2b76..a328f83 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -2070,6 +2070,10 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE } break;
+ case '^': if (!inQuotes) curPos++; + curCopyTo[(*curLen)++] = *curPos; + break; + case '&': if (!inQuotes) { lastWasRedirect = FALSE;