Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: searching through "last words"



On Sat, Jan 25, 2020 at 07:01:27PM +0100, Mikael Magnusson wrote:
> 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 ?

Hm, ist there any kind of documentation?  It seems to be bound to
"Alt-/", but when pressed it results in an error message:

  _history:58: failed to find end of command substitution

Ciao

Dominik ^_^  ^_^

--

Dominik Vogt



Messages sorted by: Reverse Date, Date, Thread, Author