Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion style like Vim
- X-seq: zsh-users 15721
- From: Michael Treibton <mtreibton@xxxxxxxxxxxxxx>
- To: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- Subject: Re: Completion style like Vim
- Date: Thu, 20 Jan 2011 22:14:47 +0000
- Cc: Matt Wozniski <godlygeek@xxxxxxxxx>, zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=1yxEjIIHKu4DIhCQN+iuUMCVg83BuUm9sR3EpN9DLQo=; b=MlwWPNHCNUFE7/1F1PPMxkM2uIFFkMhHgsHEw+Leksfcz3IiOw0MOcecm28mMb2VSa QCpJ+3YpLt9LNQ09rbi1xAobC2RZT38FuHUlrBIBwPBY2+zC5j6U2LeA7mwYx+Wmipgz DeKfVnwNahKNlOIFwvo65adQDNODhrq2URd04=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=jgF6zv/JduEKmbrhul94m6E+O9OVLlawokmMRhpdbSwEnqp+0n6xfnsa98tbSBh6Ri WeB0yz4NX2TMWZMhCqztYVwIMAjjwSAAyGOtfzAKwWrDpCxmmyrfJyTZxUOOqfo0jetO ljJ/624+Bsv4t9tdCg9oN3vA7Ra9rdVEsNm/8=
- In-reply-to: <alpine.LNX.2.01.1101201653070.2792@hp>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <AANLkTimRCvWA=0pchndFrkTF8Q0_gc4QA18JGD29Y-ti@mail.gmail.com> <alpine.LNX.2.01.1011161503010.2792@hp> <AANLkTimqY0yVW-uHNi_pKMYRjTZJ7a1CamENMs2CpCQs@mail.gmail.com> <alpine.LNX.2.01.1011161606310.2792@hp> <alpine.LNX.2.01.1011161618480.2792@hp> <AANLkTinMs=GaCcg6=AtM89L1jANjmciYZp9ZJqk3AbTQ@mail.gmail.com> <AANLkTi=dES3To+MZbU_Xmy96UBU=z1ETr10uMb6DWeMz@mail.gmail.com> <alpine.LNX.2.01.1101201653070.2792@hp>
Hi,
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. :)
Michael
Messages sorted by:
Reverse Date,
Date,
Thread,
Author