From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1791 invoked by alias); 28 Nov 2013 01:06:14 -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: 18172 Received: (qmail 16698 invoked from network); 28 Nov 2013 01:06:07 -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: <131127170553.ZM23821@torch.brasslantern.com> Date: Wed, 27 Nov 2013 17:05:53 -0800 In-reply-to: =?iso-8859-1?Q?=3C52964328=2E5040801=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_27=2C__8=3A08pm=29?= References: <131127000208.ZM18878@torch.brasslantern.com> <52964328.5040801@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 27, 8:08pm, Ren=E9 'Necoro' Neumann wrote: > Subject: Re: shared history but recalling history in current terminal > > Am 27.11.2013 09:02, schrieb Bart Schaefer: > >=20 > > zle-line-init() { zle set-local-history 1 } > > zle -N zle-line-init > >=20 > > zle-keymap-select() { > > [[ $KEYMAP =3D isearch ]] > > zle set-local-history $? > > } > > zle -N zle-keymap-select >=20 > Unfortunately, this seems only to work when not doing a 'RETURN' without > command in a session Hmm. The behavior you are describing would seem to imply either that you've omitted the "1" argument to set-local-history, or that it is being ignored and set-local-history is simply toggling the state each time it is called. And indeed GDB confirms that passing the argument does not have the expected effect. Workaround is: zle-line-init() { NUMERIC=3D1 zle set-local-history } zle-keymap-select() { [[ $KEYMAP =3D isearch ]] NUMERIC=3D$? zle set-local-history } The documentation says "set it with the numeric argument" so I'm not sure if this is just Wayne's misunderstanding or if zle_hist.c needs a patch.