From: Stefan Monnier <monnier+lists/zsh/users/news/@tequila.cs.yale.edu>
To: zsh-users@math.gatech.edu
Subject: Re: Redirecting variable fds
Date: 10 Dec 1998 17:45:06 -0500 [thread overview]
Message-ID: <5laf0vpqfh.fsf@tequila.cs.yale.edu> (raw)
In-Reply-To: <19981210215235.59487@athenaeum.demon.co.uk>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 487 bytes --]
>>>>> "Phil" == Phil Pennock <phil@athenaeum.demon.co.uk> 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
next prev parent reply other threads:[~1998-12-10 23:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-10 21:52 Phil Pennock
1998-12-10 22:45 ` Stefan Monnier [this message]
1998-12-11 8:05 ` Phil Pennock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5laf0vpqfh.fsf@tequila.cs.yale.edu \
--to=monnier+lists/zsh/users/news/@tequila.cs.yale.edu \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).