Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: history-incremental-search-backward and personnal zle widget
- X-seq: zsh-users 12374
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: history-incremental-search-backward and personnal zle widget
- Date: Sat, 29 Dec 2007 07:35:18 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=tVYUtOJQoWRme8dm41mmqAQxvU+vDHUsZlZD1UrzF3c=; b=TE5cmflGc2ysUy8fTPhbKW4+PSvBNrsMX9HuXOo/tLbnDfo+TXCrEtQ0unzBxfv9q0pNbIg0dCZeEWgMu+3ZELNSRjBzFLke3WMZxsHz597CN3j7lRNLN4L3D1TPeIc2bNOfm9/njYBV6dwWUiRrwGfXuuuAWos6zzqLzASeZj4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NwsJCrlloaIhf8sqoEEUw2FGOl807NNX+NGvww0EYFiqGh6lfHITswt8lemrUSQPc6zsA7u8hjG640n24hWSKEE7376xzDp/DdtpYZnDvTzJFB0Gmg1j0Bf1hXqYp9lxyUQfNrQ8wLyIe6jTo6jE/RvnSxcDZRqXBf/dThMqdXQ=
- In-reply-to: <20071229012451.GC5256@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20071229012451.GC5256@xxxxxxxxxxxxxxxxxxxxx>
On 29/12/2007, antho.charles@xxxxxxxxx <antho.charles@xxxxxxxxx> wrote:
> Hi,
>
> I find this widget from a zshrc I can't remember and I bind it to the dot key:
>
> # just type 'cd ...' to get 'cd ../..'
> rationalise-dot() {
> if [[ $LBUFFER = *.. ]]; then LBUFFER+=/..
> else
> LBUFFER+=. fi
> }
> zle -N rationalise-dot
> bindkey . rationalise-dot
>
> but when I type a dot in a history-incremental-search-backward ( ^R ), it stops the
> search and insert a dot in the line instead of inserting a dot in the
> searched string. I found something useful in zshzle manpage:
> "A restricted set of editing functions is available in the mini-buffer. An interrupt
> signal, as defined by the stty setting, will stop the search and go
> back to the original line. An undefined key will have the same
> effect."
>
> My question is: is there a way to keep my binded widget and use it
> with history-incremental-search-backward?
I found that too, and encountered the same problem. My limited
investigations led me to believe you would have to hack around in the
C code a fair bit to fix this.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author