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

Re: {fd}< and compound commands



On 14 September 2011 19:21, Stephane Chazelas
<stephane_chazelas@xxxxxxxx> wrote:
> 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.

Is this related to http://www.zsh.org/mla/workers/2011/msg01090.html
(and reply from pws)?

-- 
Mikael Magnusson



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