Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: search through alternative HISTFILE
- X-seq: zsh-users 17910
- From: Maarten Grachten <maarten.grachten@xxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: search through alternative HISTFILE
- Date: Tue, 06 Aug 2013 11:55:38 +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=OXkprSExifZrb0aOF1sjWKs4Kvs+aE3tCsy3lgv8tm4=; b=i9Ys84zsYOrzu826Lpz3HMjpsvb660pUGBF0y0nPbmbwkqO8f92l4hHxxdiRAa74y4 F0v3PVZKfISR58uHrUEYYZUNgO6nqPymC0+yPP3JNJ+W9XxpE5mxR27aB2OVnWXcbaV3 iVthlLo3GNezoCQL07ks9jkZZ725YmGeXSZ7r1Sq6AJUI6XXfB2eTiP/lCfucqTbMlRT mMSGeB/YHJULVYmGJufq7FObn0g03x63DuOIEFVGA/kNPe4N53WG/Wu5/QbRzxFNofBo qYLq76WI4kKyRO/n+NxW+uq1iV2Mwb/3icTWgVfnjeyMsgLEn7drNR+AQrHmZ9twi0SA Tt8w==
- 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>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author