From: Mikael Magnusson <mikachu@gmail.com>
To: dominik.vogt@gmx.de, Zsh Users <zsh-users@zsh.org>
Subject: Re: searching through "last words"
Date: Sat, 25 Jan 2020 19:01:27 +0100 [thread overview]
Message-ID: <CAHYJk3Q2AxCVYPasPQ=mpkuXVa8GJVmhO3fUYPxcHkYsXYeabw@mail.gmail.com> (raw)
In-Reply-To: <20200124180916.om3fvx6ipypr3kta@gmx.de>
On 1/24/20, Dominik Vogt <dominik.vogt@gmx.de> wrote:
> 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?
Sounds a lot like you want _history-complete-older ?
--
Mikael Magnusson
next prev parent reply other threads:[~2020-01-25 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 18:09 Dominik Vogt
2020-01-25 18:01 ` Mikael Magnusson [this message]
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='CAHYJk3Q2AxCVYPasPQ=mpkuXVa8GJVmhO3fUYPxcHkYsXYeabw@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=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
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).