Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] (z)-flag interrupts if $() in input
- X-seq: zsh-workers 39780
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [BUG] (z)-flag interrupts if $() in input
- Date: Sun, 30 Oct 2016 11:04:55 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=QpAKWAXngI1fEASyacyE0/pwZ/rBDRD+YYg2apmhTig=; b=MtqvOSvbShdi/diJ3Q2RIM9uUVGd9i249tr3QjfyNtzi/DBLP4G8MsPlHAuZDOt1bA rLDgIQNSUwXpfDvjsdD4dy4HwV7IqIMYyPco0NuMbVolOZAK2dxOZkCRYG4k56xeoNgK wro5lFiGv3Vdhrkw3alRMB+3pVNHgQnFt1/Hxyp/GSLeRGocx3xcUCd7PovK/5ey2KYR Lf3MhuX1S7y3jIWkW8hhsJ9qAfqfVZNSpCx0wxzYd8pG8iL/gv/og4gEMPHJZ5TKcidc RjSZrjOtN1eCUr85HO60D2U1ou2L1G8f906RlKvPBKsYhIbKztf244Xdh/QtgToeMfZJ GqOQ==
- In-reply-to: <20161030170949.612551cf@ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1477809189.1509250.771544241.795E8177@webmail.messagingengine.com> <20161030152525.GA12137@fujitsu.shahaf.local2> <20161030170949.612551cf@ntlworld.com>
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