From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16949 invoked by alias); 27 Nov 2013 08:02:34 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18166 Received: (qmail 21766 invoked from network); 27 Nov 2013 08:02:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <131127000208.ZM18878@torch.brasslantern.com> Date: Wed, 27 Nov 2013 00:02:08 -0800 In-reply-to: Comments: In reply to Wayne Davison "Re: shared history but recalling history in current terminal" (Nov 26, 10:31pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: shared history but recalling history in current terminal MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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.