Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: shared history but recalling history in current terminal
On 09/12/13 12:40, Jan Larres wrote:
> On 29/11/13 10:33, Bart Schaefer wrote:
>> So the right way to do this is actually
>>
>> zle-line-init() { NUMERIC=1 zle set-local-history }
>> zle -N zle-line-init
>> zle-isearch-update() { NUMERIC=0 zle set-local-history }
>> zle -N zle-isearch-update
>> zle-isearch-exit() { NUMERIC=1 zle set-local-history }
>> zle -N zle-isearch-exit
>
> I am currently trying this out and noticed that if I use
> history-incremental-pattern-search-backward instead of the normal
> history-incremental-search-backward then disabling the local history no
> longer works. Is there a way to make those two work together? I don't
> want to lose the very handy pattern feature.
After some more investigation I noticed that unsetting local-history
does actually work, but re-running the widget after entering something
does not. So if I have this in my zshrc:
bindkey '^r' history-incremental-pattern-search-backward
If I then press ^r and enter some word it gets correctly found in the
global history, but if I press ^r again to search for an earlier
occurence it always fails. Is there any way to fix this?
Thanks,
Jan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author