zsh-users
 help / color / mirror / code / Atom feed
From: Maarten Grachten <maarten.grachten@ofai.at>
To: zsh-users@zsh.org
Subject: Re: search through alternative HISTFILE
Date: Tue, 06 Aug 2013 12:11:12 +0200	[thread overview]
Message-ID: <5200CBC0.6050803@ofai.at> (raw)

Just for the record. I figured out that it is necessary to reset HISTNO 
to its old value after the search on accumulated history is done 
(otherwise the normal search will be confused):

function accumulated-history-incremental-search-backward () {
     fc -p $ACC_HISTFILE
     HISTNO=$(( $( wc -l < $ACC_HISTFILE ) + 1 ))
     zle history-incremental-search-backward
     fc -P
     HISTNO=$(( $( wc -l < $HISTFILE ) + 1 ))
}

Maarten


             reply	other threads:[~2013-08-06 10:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06 10:11 Maarten Grachten [this message]
2013-08-06 11:05 ` Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
2013-08-06 14:09 Maarten Grachten
2013-08-06  9:55 Maarten Grachten
2013-08-05 10:05 Maarten Grachten
2013-08-05 18:52 ` Peter Stephenson
2013-08-02 10:38 Maarten Grachten
2013-08-02 11:08 ` Peter Stephenson

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=5200CBC0.6050803@ofai.at \
    --to=maarten.grachten@ofai.at \
    --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).