zsh-users
 help / color / Atom feed
From: Dominik Vogt <dominik.vogt@gmx.de>
To: Zsh Users <zsh-users@zsh.org>
Subject: searching through "last words"
Date: Fri, 24 Jan 2020 19:09:16 +0100
Message-ID: <20200124180916.om3fvx6ipypr3kta@gmx.de> (raw)

I'd like to enhance Alt-. = insert-last-word a bit:

 - If at the beginning of a word, just work like insert-last-word
   (i.e. if pressed multiple times, replace the word by older last
   words).

 - If there is already something on the command line, work like
   above, but match only words that begin with the present string.

Example history:

 ... bar
 ... foo
 ... baz
 ... foobar

Then type

  $ ... <Alt-.>
  $ ... foobar<Alt-.>
  $ ... baz<Alt-.>
  $ ... bar<Alt-.>
  etc.

But

  $ ... b<Alt-.>
  $ ... baz<Alt-.>
  $ ... bar<Alt-.>

Is there a simple way to do that, short of programming a new widget?

Ciao

Dominik ^_^  ^_^

--

Dominik Vogt

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24 18:09 Dominik Vogt [this message]
2020-01-25 18:01 ` Mikael Magnusson
2020-01-25 20:47   ` Dominik Vogt

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=20200124180916.om3fvx6ipypr3kta@gmx.de \
    --to=dominik.vogt@gmx.de \
    --cc=zsh-users@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

zsh-users

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git