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

Re: PATCH: functions with redirections



On Thu, 02 Oct 2014 08:56:14 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Oct 2,  9:35am, Peter Stephenson wrote:
> }
> } > } +function is executed.  Any variables in the redirection are expanded
> } > } +at the point the function is executed, but outside the function scope.
> } > 
> } > ... is actually the way it's supposed to work.
> 
> Bash appears to evaluate the redirects IN the function scope:

We don't really have that option without a great deal of code
rearrangement and, while I presume in that case it's the right thing to
do, it's not obvious from the syntax.  So it can stay the way it is for
now.

pws




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