Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG] (z)-flag interrupts if $() in input



On Oct 30,  5:09pm, Peter Stephenson wrote:
}
} Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
} > Should the command
} > .
} >     % echo foo $() bar
} > .
} > print "foo bar\n" or return a parse error?
} 
} That's obviously a bug.  The fix is easy, although I don't know why the
} case of end of input in a normal input sequence, just above, needs to be
} different.

This solves the specific example but doesn't solve the general problem;
if there is a parse error inside $(...) then ${(z)...} fails.

torch% a='x $() y'
torch% print -rl -- ${(z)a}
x
$()
y
torch% a='x $(|||) y'
torch% print -rl -- ${(z)a}
x
$(||
torch% 




Messages sorted by: Reverse Date, Date, Thread, Author