zsh-users
 help / color / mirror / code / Atom feed
* {fd}< and compound commands
@ 2011-09-14 17:21 Stephane Chazelas
  2011-09-14 17:36 ` Mikael Magnusson
  2011-09-14 19:06 ` Peter Stephenson
  0 siblings, 2 replies; 10+ messages in thread
From: Stephane Chazelas @ 2011-09-14 17:21 UTC (permalink / raw)
  To: zsh-users

Hiya,

$ echo $ZSH_VERSION
4.3.12
$ zsh -c '{echo foo >&$fd;}  {fd}> a'
zsh:1: parse error near `{'
(same for while/do/done constructs at least)

Is that the expected behavior? I can't see it being documented.

That would be useful in

while read <&$fd var; do
  ...
done {fd}< file

to avoid having to worry about overriding fds 3-9.

-- 
Stephane


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-09-17 12:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-14 17:21 {fd}< and compound commands Stephane Chazelas
2011-09-14 17:36 ` Mikael Magnusson
2011-09-14 19:06 ` Peter Stephenson
2011-09-14 19:31   ` Stephane Chazelas
2011-09-14 21:05     ` Peter Stephenson
2011-09-15 12:58   ` Stephane Chazelas
2011-09-15 13:09     ` Peter Stephenson
2011-09-15 13:22       ` Chet Ramey
2011-09-15 14:21         ` Stephane Chazelas
2011-09-17 12:21   ` Stephane Chazelas

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).