Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: implicit previous command, only state what should change
- X-seq: zsh-workers 32858
- From: Emanuel Berg <embe8573@xxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: implicit previous command, only state what should change
- Date: Mon, 14 Jul 2014 00:50:33 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=uu.se; s=centralsmtp; t=1405291831; i=@uu.se; bh=SgSSyDUqFoeill180suTkVyJBC3mPOpxf12T/FMqcAM=; h=From:To:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=gwe7Xod9kNfSeaBPP3xDRJu0VZUn518nCcWBmSMZ2cO96XEA9lGzxGmouztIM7Mu+ kVk6I0GJXXho3Xsfa16OtLX5JOkZ57sBZ3dJpO1PSZE4jE3SmAEzsine1I8ioP4ey2 qILWJrL0AKGw4REDNb5mfpQN/OWH6jDsZLbYTdRc=
- In-reply-to: <87sim4lwxk.fsf@ft.bewatermyfriend.org> (Frank Terbeck's message of "Mon, 14 Jul 2014 00:24:07 +0200")
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <874myk3ocp.fsf@debian.uxu> <87sim4lwxk.fsf@ft.bewatermyfriend.org>
Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> writes:
>> $ grep user-home-directory *.el
>>
>> After that, I realize that it should have been
>> `user-emacs-directory'.
>>
>> Is there a way to tell zsh to "execute the previous
>> command again, only substitute the first argument for
>> user-emacs-directory"? Like
>>
>> $ !!:1->user-emacs-directory
>
> Like this:
>
> % ^-home-^-emacs-
I seems that is substitution of the first match sort of
like the sed substitution command without the g option,
which actually for this example is much better than my
suggestion (because only part of the argument is
incorrect), so it is great to know, yes.
Still, one can imagine a case when the whole argument
is wrong, and for a long argument it would be better to
just be able to refer to it and state the replacement.
I tried ^!:1^replacement but that wasn't it.
--
underground experts united
Messages sorted by:
Reverse Date,
Date,
Thread,
Author