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 11:55:38 +0200	[thread overview]
Message-ID: <5200C81A.4050508@ofai.at> (raw)

Hi Peter,

Thanks a lot for the explanation, and the patch, it works perfectly! 
Based on your explanation however, I tried the following as well:

ACC_HISTFILE="${HOME}/.accumulated-history"

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

i.e. before doing the search on the accumulated history, set the 
variable HISTNO to just beyond the last line of that history file. This 
also seems to work without the patch you provided, however I cannot 
really judge if there are any unintended side-effects with this approach.

Many thanks again for helping me out! I appreciate the effort.

Maarten


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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06  9:55 Maarten Grachten [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-08-06 14:09 Maarten Grachten
2013-08-06 10:11 Maarten Grachten
2013-08-06 11:05 ` Peter Stephenson
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=5200C81A.4050508@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).