Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Use of qualifiers without glob pattern?
- X-seq: zsh-users 265
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: borsenkow.msk@xxxxxx
- Subject: Re: Use of qualifiers without glob pattern?
- Date: Wed, 26 Jun 1996 13:02:05 +0200 (MET DST)
- Cc: zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: <Pine.SV4.3.94.960626132835.15355D-100000@itsrm1> from Andrej Borsenkow at "Jun 26, 96 01:33:55 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> hi, all!
>
> the question to zsh 2.6-beta21.
>
> Man page states, that it is possible to use history modifiers for *any*
> file; to be precise: "The name of any existing file can be followed by a
> modifier of the form (:..) even if no filename generation is performed".
>
> I have tried it in the followin statement:
>
> for i in **/*.org
> do
> diff -u $i $i(:r)
> done
>
> the problem is, $i(:r) gives the same as $i!!! That is a.c.org(:r) ->
> a.c.org. If I make e.g. *.c.org(:r) I correctly get .org suffix stripped.
>
> Is it correct? I have a feeling, that it worked in some earlier version of
> zsh.
Yes, it stopped working in beta20. Here is the fix.
Zoltan
*** Src/glob.c 1996/06/21 14:19:05 2.24
--- Src/glob.c 1996/06/26 10:59:56
***************
*** 144,150 ****
}
if (*str == ':' && str[-1] == Inpar) {
str[-1] = '\0';
! modify (&ostr, &str);
return;
}
str = dupstring(ostr);
--- 144,150 ----
}
if (*str == ':' && str[-1] == Inpar) {
str[-1] = '\0';
! modify ((char **)&getdata(np), &str);
return;
}
str = dupstring(ostr);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author