From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12161 invoked by alias); 6 Aug 2013 10:20:36 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17910 Received: (qmail 19711 invoked from network); 6 Aug 2013 10:20:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.212.180 as permitted sender) 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== X-Received: by 10.194.173.71 with SMTP id bi7mr483138wjc.2.1375782941972; Tue, 06 Aug 2013 02:55:41 -0700 (PDT) Sender: Maarten Grachten Message-ID: <5200C81A.4050508@ofai.at> Date: Tue, 06 Aug 2013 11:55:38 +0200 From: Maarten Grachten User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: zsh-users@zsh.org Subject: Re: search through alternative HISTFILE Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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