Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: parse error in process substitution
- X-seq: zsh-workers 26054
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "Zsh Hackers' List" <zsh-workers@xxxxxxxxxx>
- Subject: Re: parse error in process substitution
- Date: Mon, 17 Nov 2008 07:51:09 -0800
- In-reply-to: <20081117101031.17dcf2b7@news01>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200811162118.mAGLIgK5003632@xxxxxxxxxxxxxxxxxxx> <081116135129.ZM5711@xxxxxxxxxxxxxxxxxxxxxx> <20081117101031.17dcf2b7@news01>
On Nov 17, 10:10am, Peter Stephenson wrote:
} Subject: Re: parse error in process substitution
}
} > schaefer[509] echo $(<(echo cat))
} > zsh: permission denied: /proc/self/fd/10
} >
} > I wonder if the $(< ....) form should also be special-cased?
}
} Possibly, although you could also argue that if the contents look like
} anything other than < followed by something that expands to a string
} it should do that.
The question is whether "$(<" binds more tightly than "<(". I suppose
the answer is that really it's dollar oparen redirect word cparen that
has special meaning, and in lessthan oparen list cparen, lessthan is
not a redirect even though it "looks like" one (because "<(" is a
token unto itself, not the two tokens lessthan and oparen).
} It depends what you mean by "look like". You need to quote
} metacharacters to be sure of getting a file name in general, of
} course.
schaefer[502] bash
[schaefer@torch]$ echo < (echo cat)
bash: syntax error near unexpected token `('
[schaefer@torch]$ exit
schaefer[503] echo < (echo cat)
zsh: number expected
schaefer[504] echo $(< (echo cat) )
zsh: no such file or directory: (echo cat)
schaefer[505] echo $(<(echo cat) )
zsh: permission denied: /proc/self/fd/10
I'm not really making anything of the above yet, just pointing it out.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author