Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: search through alternative HISTFILE
- X-seq: zsh-users 17909
- From: Maarten Grachten <maarten.grachten@xxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: search through alternative HISTFILE
- Date: Tue, 06 Aug 2013 12:11:12 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=x2Ij2bFxrMcc78oapllZa0L7+Rrn4bIT1cb8eRdE8Kc=; b=D+iGnCrq8rA5gNSHcMFynfKVcGdxRNYNWCD2wRyVqKqZvs7MAlI1sbJDq/iCuEz+3I 4+CFdsVP/56VTjhMot5GLgQ22GLnrcOM8+wRFkJYwA446xZDqairH9m1QRiZABxuocE2 goaPjGl35IO9n2Tlrayp3+LLRc0ZZbzayjvjEkjR9RIgGCKymmgW38+De9tXEBrgagOh jq+cBB2mbADkesMi9T0+s1c6fOerCC20HjQJ3EmFx1FxCD+nNxKvXP53o8Dt+DbIirHR oOZBArp5w0IL9B9c4E6DlK8TAclMVwveqyhs+DoNBXVONkdq2fvPnuuUEzVQcgWA7AJ1 39SQ==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Sender: Maarten Grachten <maarten.grachten@xxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author