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 32865
- From: Emanuel Berg <embe8573@xxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: implicit previous command, only state what should change
- Date: Tue, 15 Jul 2014 17:42:17 +0200
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=uu.se; s=centralsmtp; t=1405438936; i=@uu.se; bh=psm7QRyrDOvGqC9zBye9u2IFSeVx1RwhNuWbGax37UI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=xAIqPslIACaTMzurYoTxYo+0SxNM9MZCcI7sEnHTT5fUUhji68wY+CGkn+/QaFL9K Bqbnlm9cYg0f94a77XbrqCmt8QwK/BicZOhSJ/mM7jtHeGzpO7fzTB9LKmwQpxTXnC mY5qMvmHpfgsYsm+aeYCWVVDbwW8RptrRQ3iyKNU=
- In-reply-to: <140714234638.ZM29435@torch.brasslantern.com> (Bart Schaefer's message of "Mon, 14 Jul 2014 23:46:38 -0700")
- 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> <140714234638.ZM29435@torch.brasslantern.com>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
> zsh% !:0 user-emacs-directory !:2*
Yes, only, if the other arguments (and the command) are
short or medium-length words I'd say it is in most
cases faster and more comfortable to just retype them.
> You can automate this for some simple cases (the
> following assumes you are using the default non-vi
> key bindings):
>
> bindkey -s ^X1 '^U!!:0 \e!^ !!:2*^X^X\e!' bindkey -s
> ^X2 '^U!!:0-1 \e!^ !!:3*^X^X\e!' bindkey -s ^X3
> ^U!!:0-2 \e!^ !!:4*^X^X\e!' bindkey -s ^X4 '^U!!:0-3
> \e!^ !!:5*^X^X\e!' bindkey -s ^X5 '^U!!:0-4 \e!^
> !!:6*^X^X\e!'
>
> With this, typing ctrl+x 1 will re-insert the
> previous line with the first argument omitted,
> leaving the cursor where the new first argument
> should be typed. Similarly for ctrl+x 2 through 5,
> though they don't work quite ideally if there are no
> arguments following the one you're replacing (try it
> to see what I mean).
OK, get back to you.
--
underground experts united
Messages sorted by:
Reverse Date,
Date,
Thread,
Author