Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: globsubst and =command
- X-seq: zsh-workers 11410
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: PATCH: Re: globsubst and =command
- Date: Tue, 16 May 2000 13:58:37 +0100
- In-reply-to: "Your message of Tue, 16 May 2000 14:41:12 +0200." <200005161241.OAA26858@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Sven wrote:
> Tanaka Akira wrote:
> > serein% print -r - $~a
> > =ls
> >
> > Since the expansion of =command is kind of filename expansion and ~
> > enables filename expansion on the result, I think $~a should be expand
> > to /bin/ls. Do I miss something?
>
> I don't think it should do that because it really is something
> completely different.
$~a does do ~dir expansion (that's where the ~ originally came from, before
it ever tokenized the rest of the pattern), which is performed at the same
time as =cmd expansion, so it is a little odd. The real issue is that `='
don't get tokenized by on-the-fly tokenization. This patch would do that.
But if you can think of a good reason for not...?
Index: Src/glob.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/glob.c,v
retrieving revision 1.5
diff -u -r1.5 glob.c
--- Src/glob.c 2000/04/30 17:58:35 1.5
+++ Src/glob.c 2000/05/16 12:56:28
@@ -2395,6 +2395,7 @@
case ']':
case '*':
case '?':
+ case '=':
for (t = ztokens; *t; t++)
if (*t == *s) {
if (bslash)
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author