cmd: Add circumflex support into command shell.

This commit is contained in:
Jason Edmeades 2012-09-25 13:45:28 +01:00 committed by Alexandre Julliard
parent e35b239b41
commit d8c0fbcedc
2 changed files with 21 additions and 17 deletions

View File

@ -123,7 +123,7 @@ bar2
'a', '~`+', '.{}!+b' 'a', '~`+', '.{}!+b'
'a', 'b', '' 'a', 'b', ''
'"a;b"', '', '' '"a;b"', '', ''
@todo_wine@'a', 'b', '' 'a', 'b', ''
'a[b]{c}(d)e', '', '' 'a[b]{c}(d)e', '', ''
'a', '', '' 'a', '', ''
second line second line
@ -197,25 +197,25 @@ A
B B
C C
------------ Testing circumflex escape character ------------ ------------ Testing circumflex escape character ------------
@todo_wine@hello, world hello, world
@todo_wine@hello, world hello, world
@todo_wine@hell^o, world hell^o, world
@todo_wine@hell^o, world hell^o, world
baz baz
@todo_wine@baz baz
@todo_wine@foo | echo bar foo | echo bar
@todo_wine@foo & echo bar foo & echo bar
@todo_wine@bak & bak &
baz@space@ baz@space@
0@or_broken@1 0@or_broken@1
@todo_wine@foo > foo foo > foo
@todo_wine@< <
@todo_wine@ffoof ffoof
@todo_wine@FOO=bar | baz FOO=bar | baz
@todo_wine@0 0
@todo_wine@FOO=bar ^| baz FOO=bar ^| baz
@todo_wine@bar | baz bar | baz
@todo_wine@0 0
------------ Testing 'set' ------------ ------------ Testing 'set' ------------
1 1
0 0

View File

@ -2070,6 +2070,10 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
} }
break; break;
case '^': if (!inQuotes) curPos++;
curCopyTo[(*curLen)++] = *curPos;
break;
case '&': if (!inQuotes) { case '&': if (!inQuotes) {
lastWasRedirect = FALSE; lastWasRedirect = FALSE;