Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: searching through "last words"
On 1/24/20, Dominik Vogt <dominik.vogt@xxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author