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

{fd}< and compound commands



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



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