1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-29 19:00:57 +02:00

37705: don't turn - to Dash after start of brace parameter

This commit is contained in:
Peter Stephenson 2016-01-20 11:22:09 +00:00
parent d18ce35d06
commit 1c41f98aab
2 changed files with 10 additions and 2 deletions

View file

@ -1026,8 +1026,10 @@ gettokstr(int c, int sub)
c = Inbrace;
++bct;
cmdpush(CS_BRACEPAR);
if (!in_brace_param)
in_brace_param = bct;
if (!in_brace_param) {
if ((in_brace_param = bct))
seen_brct = 0;
}
} else {
hungetc(e);
lexstop = 0;

View file

@ -1880,3 +1880,9 @@
>'two words'
>'three so-called '\''words'\'
>'three so-called ''words'''
array=(one two three)
array[1]=${nonexistent:-foo}
print $array
0:"-" works after "[" in same expression (Dash problem)
>foo two three