Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: no way to keep my glob expanded ? (i don't think so)
- X-seq: zsh-users 12894
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxxxxx>
- Subject: Re: no way to keep my glob expanded ? (i don't think so)
- Date: Wed, 4 Jun 2008 13:34:25 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=jyHl80XSMoHCO9d0UHTuUqL1C/DZB6Clp+lNnM9Gmvo=; b=DUD7v8zXxkNY/8ACxz3hObEN7BB10lSNHGNugBs4Xag9q9cHfHWChipz+Bn9splLjZ 8V3O6WBT9pn1/NoMXogYjcMuzswIDXymHn2jKhH6FlBRVJWdzQlHSfhAV8RmOrdeDKpp /y2/LyT1792hvqI+86D3oP1ZVuID9SyAEjCeQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=fZh7WW1st3xagwXrNAIFAIqHVMSWTQkNBGl4Qob7Y03USnU70GKg+O0/qoWBD/FR9d S2WdIl40XZZq3uMozOurU5Wx/R2pY+XPSMysePQSGEZE93zDYmQ7oOZhinZ5qAFGrQ2V VuPYCPbFLu1Bk9RymuYcc276fLdfALYgh3YCI=
- In-reply-to: <20080604112956.GB25558@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20080604112956.GB25558@xxxxxxxxxxxxxxxxxxxxx>
2008/6/4 Marc Chantreux <marc.chantreux@xxxxxxxxxxxxxxxxxx>:
> hello zsh lovers,
>
> ${:-*c} expands the glob and returns an array
> ${${:-*c}//truc/} see *c as a string so the result is *c
>
> Clint and Peter explained me in another post that the subsitution is
> applied first. So:
>
> print ${:-*c}
> => print *c
> => glob expansion
>
> print ${${:-*c}//truc/}
> => print ${"*c"//truc/}
> => print "*c"
>
> as i understood thinks, it's impossible to do what i expected.
>
> ft gave a workaround on #zsh: print -l *c(e-'REPLY=${REPLY//truc/}'-)
> but i'm just curious:
>
> - did i correctly understand the problem ?
> - is it a way to visualize those multipass transformations ?
> - is there a way to tell to zsh to work as expected ?
>
> regards
You can use *c(:s/truc/) instead i think. (:gs/truc/) to match all
occurances, not just the first.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author