Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Redirecting variable fds
- X-seq: zsh-users 1979
- From: Stefan Monnier <monnier+lists/zsh/users/news/@tequila.cs.yale.edu>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: Redirecting variable fds
- Date: 10 Dec 1998 17:45:06 -0500
- References: <19981210215235.59487@xxxxxxxxxxxxxxxxxxxxx>
- Sender: monnier@xxxxxxxxxxxxxxxxxxx
>>>>> "Phil" == Phil Pennock <phil@xxxxxxxxxxxxxxxxxxxxx> writes:
> function bar {
> DEBUGMEM_INFOFD=$1 LD_PRELOAD=./bar.so $argv[3,-1] $1>$2
> }
The parsing is done before the parameter expansion so you're screwed.
But there's a workaround, using eval:
DEBUGMEM_INFOFD=$1 LD_PRELOAD=./bar.so eval $argv[3,-1] "$1>$2"
It's not quite correct in that the content of $argv[3,-1] should be escaped
to prevent its evaluation (à la "$@"), but my zsh expertise is lacking here.
Stefan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author