From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15861 invoked by alias); 6 Aug 2013 10:11:38 -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: 17909 Received: (qmail 19398 invoked from network); 6 Aug 2013 10:11:22 -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=x2Ij2bFxrMcc78oapllZa0L7+Rrn4bIT1cb8eRdE8Kc=; b=D+iGnCrq8rA5gNSHcMFynfKVcGdxRNYNWCD2wRyVqKqZvs7MAlI1sbJDq/iCuEz+3I 4+CFdsVP/56VTjhMot5GLgQ22GLnrcOM8+wRFkJYwA446xZDqairH9m1QRiZABxuocE2 goaPjGl35IO9n2Tlrayp3+LLRc0ZZbzayjvjEkjR9RIgGCKymmgW38+De9tXEBrgagOh jq+cBB2mbADkesMi9T0+s1c6fOerCC20HjQJ3EmFx1FxCD+nNxKvXP53o8Dt+DbIirHR oOZBArp5w0IL9B9c4E6DlK8TAclMVwveqyhs+DoNBXVONkdq2fvPnuuUEzVQcgWA7AJ1 39SQ== X-Received: by 10.180.94.69 with SMTP id da5mr1467417wib.3.1375783874964; Tue, 06 Aug 2013 03:11:14 -0700 (PDT) Sender: Maarten Grachten Message-ID: <5200CBC0.6050803@ofai.at> Date: Tue, 06 Aug 2013 12:11:12 +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 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