From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26043 invoked by alias); 28 Nov 2013 21:33:29 -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: 18174 Received: (qmail 23835 invoked from network); 28 Nov 2013 21:33:21 -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: <131128133318.ZM25004@torch.brasslantern.com> Date: Thu, 28 Nov 2013 13:33:18 -0800 In-reply-to: =?iso-8859-1?Q?=3C5297AB37=2E80504=40necoro=2Eeu=3E?= =?iso-8859-1?Q?Comments=3A_In_reply_to_Ren=E9_'Necoro'_Neumann_=3Clists?= =?iso-8859-1?Q?=40necoro=2Eeu=3E?= =?iso-8859-1?Q?________=22Re=3A_shared_history_but_recalling_history_in_c?= =?iso-8859-1?Q?urrent_terminal=22_=28Nov_28=2C__9=3A44pm=29?= References: <131127000208.ZM18878@torch.brasslantern.com> <52964328.5040801@necoro.eu> <131127170553.ZM23821@torch.brasslantern.com> <5297AB37.80504@necoro.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: shared history but recalling history in current terminal MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable On Nov 28, 9:44pm, Ren=E9 '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 =3D isearch ]] } > NUMERIC=3D$? zle set-local-history } > } }=20 } 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=3D1 zle set-local-history } zle -N zle-line-init zle-isearch-update() { NUMERIC=3D0 zle set-local-history } zle -N zle-isearch-update zle-isearch-exit() { NUMERIC=3D1 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.