Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Global History Substitution
- X-seq: zsh-users 9621
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Global History Substitution
- Date: Fri, 4 Nov 2005 11:30:38 +0000
- In-reply-to: <20051104110932.612805c7.pws@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <20051103190747.GA16897@xxxxxxxxxxxxxxxx> <20051104110932.612805c7.pws@xxxxxxx>
Peter Stephenson <pws@xxxxxxx> wrote:
> It turns out that fixing the code to use :g like a qualifier isn't that
> difficult, however... that's ^b^beta^:g, since if the colon is missing the
> g is treated like ordinary text.
One subtlety is that we should ensure that
!!:gs/foo/bar/:gs/this/that/
works as it always did, i.e. the g goes with the following s in both
cases. I can fix that.
It does mean
!!:s/foo/bar/:gs/this/that/
will change meaning, associating the g with the preceeding substitution
and then not treating the rest as text. This might make the proposal
less than usable.
Using an uncoloned g isn't really a good idea since history always
treats trailing text as command line argument and I wouldn't want to change
that.
Hmm, how about
!!:s/foo/bar/:G
or
^foo^bar^:G
instead?
pws
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author