Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: shared history but recalling history in current terminal
On Nov 28, 9:44pm, René 'Necoro' Neumann wrote:
} Subject: Re: shared history but recalling history in current terminal
}
} Am 28.11.2013 02:05, schrieb Bart Schaefer:
} > zle-keymap-select() {
} > [[ $KEYMAP = isearch ]]
} > NUMERIC=$? zle set-local-history
} > }
}
} Hmm. Thanks. This works now in that there is no interleaving. But
} interleaving is not switched on when entering incremental search.
Ah, fooey. The isearch keymap is never actually "selected", it's just
scanned by the incremental search widgets.
Sorry for the wild goose chase. (At least it led us to the NUMERIC vs
command-line-argument issue.)
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
Strictly speaking that runs set-local-history a lot more often than is
necessary, but doing so should be harmless.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author