1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-01 21:06:04 +02:00

users/17304: angle brackets aren't associated with special parsing

inside square brackets
This commit is contained in:
Peter Stephenson 2012-10-02 12:46:45 +00:00
parent 2cd0f0c555
commit 76590bd93c
3 changed files with 28 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2012-10-02 Peter Stephenson <pws@csr.com>
* users/17304: Src/lex.c, Test/D06subscript.ztst: angle brackets
aren't associated with special parsing inside square brackets.
2012-09-30 Peter Stephenson <p.w.stephenson@ntlworld.com>
* Aaron Schrab: 30712: .editorconfig: multi-editor specification
@ -202,5 +207,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.5730 $
* $Revision: 1.5731 $
*****************************************************

View File

@ -1218,7 +1218,7 @@ gettokstr(int c, int sub)
c = Comma;
break;
case LX2_OUTANG:
if (in_brace_param || sub)
if (in_brace_param || sub || brct)
break;
e = hgetc();
if (e != '(') {
@ -1255,7 +1255,7 @@ gettokstr(int c, int sub)
break;
}
lexstop = 0;
if (in_brace_param || sub)
if (in_brace_param || sub || brct)
break;
goto brk;
case LX2_EQUALS:

View File

@ -249,3 +249,23 @@
string[0]=!
1:Can't set only element zero of string
?(eval):1: string: assignment to invalid subscript range
string="Life,+like+a+dome+of+many-colour'd+glass"
for delims in "()" "{}" "[]" "<>"; do
eval 'print ${string[(ws'$delims[1]'+'$delims[2]')2]}'
eval 'print $string[(ws'$delims[1]'+'$delims[2]')3]'
eval 'print "$string[(ws'$delims[1]'+'$delims[2]')4]"'
done
0:Check matched delimiters in subscripts
>like
>a
>dome
>like
>a
>dome
>like
>a
>dome
>like
>a
>dome