zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: shared history but recalling history in current terminal
Date: Thu, 28 Nov 2013 13:33:18 -0800	[thread overview]
Message-ID: <131128133318.ZM25004@torch.brasslantern.com> (raw)
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?=

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.


  reply	other threads:[~2013-11-28 21:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-26 20:30 shawn wilson
2013-11-27  6:31 ` Wayne Davison
2013-11-27  8:02   ` Bart Schaefer
2013-11-27 13:49     ` shawn wilson
2013-11-27 15:11       ` Karoly Negyesi
2013-11-27 15:17         ` shawn wilson
2013-11-27 18:24         ` Bart Schaefer
2013-11-27 19:08     ` René 'Necoro' Neumann
2013-11-28  1:05       ` Bart Schaefer
2013-11-28 20:44         ` René 'Necoro' Neumann
2013-11-28 21:33           ` Bart Schaefer [this message]
2013-11-30 11:03             ` René 'Necoro' Neumann
2013-11-30 19:07               ` Bart Schaefer
2013-12-08 23:40             ` Jan Larres
2013-12-08 23:54               ` Jan Larres
2013-12-10  7:09                 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=131128133318.ZM25004@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).