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

Re: Completion style like Vim


On 20 January 2011 22:02, Benjamin R. Haskell <zsh@xxxxxxxxxx> wrote:
> Sorry.  I never saw this for some reason...

That's OK.  I like to leave time enough before asking again.  :)

> I'm not sure there's a nice way to do this.  I think
> history-beginning-search-* uses everything preceding the cursor as the
> search.  So, if you push the cursor to EOL, your search changes, which might
> not be desirable:
> e.g. history contains:
> abcdef 123456
> abcghi
> abcdef
> abc_ + the search would end up with: abcdef_ (cursor at end of line). Then
> 'abcghi' would be skipped in a successive search, even though it matches the
> original (abc), because it doesn't start with the new search (abcdef).
> 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.  :)


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