This is interesting to me as well. If I do what Bart suggests, do I keep the setopt inc_append_history share_history line or not...? Thanks NK On Wed, Nov 27, 2013 at 5:49 AM, shawn wilson wrote: > Sweet. Works great. Thanks > > (Now I'm only pissed off that I put up with this for so long and > didn't ask sooner) > > On Wed, Nov 27, 2013 at 3:02 AM, Bart Schaefer > wrote: > > On Nov 26, 10:31pm, Wayne Davison wrote: > >> > >> bindkey '^p' up-line-or-local-history > >> > >> up-line-or-local-history() { > >> zle set-local-history 1 > >> zle up-line-or-history > >> zle set-local-history 0 > >> } > >> zle -N up-line-or-local-history > > > > Another possibility is something like: > > > > zle-line-init() { zle set-local-history 1 } > > zle -N zle-line-init > > > > zle-keymap-select() { > > [[ $KEYMAP = isearch ]] > > zle set-local-history $? > > } > > zle -N zle-keymap-select > > > > Then incremental search is non-local history, everything else is local, > > and you don't have to re-create individual keybindings. >