zsh-workers
 help / color / mirror / code / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: implicit previous command, only state what should change
Date: Tue, 15 Jul 2014 17:42:17 +0200	[thread overview]
Message-ID: <87ha2ibpd2.fsf@debian.uxu> (raw)
In-Reply-To: <140714234638.ZM29435@torch.brasslantern.com> (Bart Schaefer's message of "Mon, 14 Jul 2014 23:46:38 -0700")

Bart Schaefer <schaefer@brasslantern.com> 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


  reply	other threads:[~2014-07-15 15:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-13 22:06 Emanuel Berg
2014-07-13 22:24 ` Frank Terbeck
2014-07-13 22:50   ` Emanuel Berg
2014-07-14  2:08     ` Mikael Magnusson
2014-07-14 13:09       ` Emanuel Berg
2014-07-15  6:46 ` Bart Schaefer
2014-07-15 15:42   ` Emanuel Berg [this message]
2014-07-15 16:58 ` Peter Stephenson
2014-07-16  0:36   ` Emanuel Berg
2014-07-16 13:54     ` Peter Stephenson
2014-07-16 20:45       ` Emanuel Berg
2014-07-16 20:53         ` Bart Schaefer
2014-07-16 21:08           ` Emanuel Berg
2014-07-17  8:17         ` Peter Stephenson
2014-07-17 13:01           ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ha2ibpd2.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).