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

Re: Completion style like Vim



On Jan 20, 10:14pm, Michael Treibton wrote:
}
} On 20 January 2011 22:02, Benjamin R. Haskell <zsh@xxxxxxxxxx> wrote:
} >
} > Something more clever, that would maybe:
} >
} > 1. reset the 'search term' on accept-line
} > 2. on first run, keep track of the 'search term'
} > 3. run history-beginning-search-*
} 
} How might I go about implementing this?  My zsh knowledge is not too
} good to implement steps 1-3 as you suggest.  Sorry, Ben.  :)

I think perhaps you just want the history-search-end widget which is
included in the zsh distribution?

"man zshcontrib" or "info zsh" and search for history-search-end:

    This function implements the widgets [which] work by first calling
    the corresponding builtin widget and then moving the cursor to the
    end of the line. The original cursor position is remembered and
    restored before calling the builtin widget a second time, so that
    the same search is repeated to look farther through the history.

-- 



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