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 32859
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Emanuel Berg <embe8573@xxxxxxxxxxxxx>
- Subject: Re: implicit previous command, only state what should change
- Date: Mon, 14 Jul 2014 04:08:38 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=X2r+54GcTE0nGt5H1qtNJdgFOkmqxqkgJxl/A9ZnJYk=; b=Mt4/yAfsboEOiVTHBD45+cgzHM8JnNLwl2PplAHvCB8p2g1NIPleZOKfGnciFRAR3q h/2T/1cX1TCQ+fWyzzYvOWzJuQqB1gm1xJ2uHfyIy4Q99unxGugguHXcgORGkIqSQ9Ld fT1JYEOw8+VQlBZzn+l0AhIyYXPStlftvN2/7lXl7WLC60/1nOFKLqJAXkiqxQJa5L7v w3GQ6Mttw1HZswS/DlMzXV7L595C6glZW/rvsfj5jOUGrYqF6rasxomPJPOUl7C+tJcE Aeqlcy2A0/IA5teD2GHrQEIYpf78RiJcbd+v5x+YvAsYpRCU5cn7ql9FO8Pgf0oiwP0j dzZA==
- In-reply-to: <87sim427ra.fsf@debian.uxu>
- 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> <87sim427ra.fsf@debian.uxu>
On 14 July 2014 00:50, Emanuel Berg <embe8573@xxxxxxxxxxxxx> wrote:
> 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
I would just navigate to the line and word, delete-whole-word-match,
and type the new argument there. (You'll need to autoload, zle -N and
bindkey that to something).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author