Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: expansion of environment variables
- X-seq: zsh-workers 26691
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: expansion of environment variables
- Date: Thu, 05 Mar 2009 20:54:19 -0800
- In-reply-to: <200903051746.n25HkB77026580@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <d5baa8100903050235ofd66039jf2c29b58684bc8d8@xxxxxxxxxxxxxx> <090305081548.ZM4603@xxxxxxxxxxxxxxxxxxxxxx> <20090305165400.3fd18bc6@news01> <090305092126.ZM4727@xxxxxxxxxxxxxxxxxxxxxx> <200903051746.n25HkB77026580@xxxxxxxxxxxxxx>
[>workers]
On Mar 5, 5:46pm, Peter Stephenson wrote:
}
} You're right, I missed that last step, there is indeed stuff in tmp1
} including the correct completion.
I've been staring at this and I've concluded (possibly wrongly) that
even the stuff in tmp1 is a bit of a red herring.
Correct me, but isn't the real problem that the string on the line
still looks like "$key." but all of the possible matches look like
"2345.xml"? The literal string "$key" is not going to match the
literal string "2345" no matter what we do with prefixes, and the
-U option (if it helps at all) is merely going to overwrite "$key."
with "2345." which is exactly the behavior we were asked how avoid
in the first place.
This may be a case where the factoring of the old internals into the
set of comp* builtins has resulted in a loss of information. We can
figure out that [[ 2345.xml = $key.* ]] but it's a lot harder to
figure out based on that, that "$key.xml" is what needs to be fed
into compadd instead of "2345.xml".
What we need is something that recurses along the strings the way
that the internals of matchers do, but that knows about parameter
replacements instead of (or as well as) matching classes.
--
Messages sorted by:
Reverse Date,
Date,
Thread,
Author