From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10011 invoked by alias); 6 Aug 2013 14:10:01 -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: 17912 Received: (qmail 23823 invoked from network); 6 Aug 2013 14:09:55 -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.169 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=j1LIY4grBEv0Y9nJ1oL65R3Ly0pfz7gC2cIwxRv5p3c=; b=cZGB5mdXUyjhBuN1q7lTBIJqhoZwquXyiHfX2BF8gjMW9LIJvMUzfmjmJNixliUbr7 hBdziST7JPkxSwVISSmQEr19tBp3DRBvC1YbssFx+G7gljfgrq4ZOaWC5rjHH7S7/UVV yWTLohhVByUPiy2hvVTBPGYLc6ZAZyHc+40L05bRbiKBqt5CuakupTifGh/7GRFN1RII N7Rzq6YysrMuPdWVq9a/0Nw6mKZ1dMTsbPNVykAPet7j8mp8AmhxDs+h3ktBZchgr330 TDKXCZ9JaF2jjCri3iHqv/Cnhesg0SnexHPviarKIsZ7nAqdezsaCJeViOn7Dqcxd9EU 75RA== X-Received: by 10.180.198.79 with SMTP id ja15mr1146882wic.36.1375798185223; Tue, 06 Aug 2013 07:09:45 -0700 (PDT) Sender: Maarten Grachten Message-ID: <520103A6.9070905@ofai.at> Date: Tue, 06 Aug 2013 16:09:42 +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 X-No-Archive: : X-No-Archive:: yes Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, last update, hopefully. I found out that when I just append several history files to generate ACC_HISTFILE, setting HISTNO to the number of lines (+1) in ACC_HISTFILE, does not necessarily point zle to the end of the history. I am not sure why this happens (maybe it has to do with duplicate removals in the internal history representation?). If the value of HISTNO set in this way turns out to be invalid, it seems to be reset to its original value. I think the correct way to deal with this is to use the end-of-history widget to move to the end of the newly loaded history. The resulting widget is then like this: function accumulated-history-incremental-search-backward () { fc -p $ACC_HISTFILE zle .end-of-history zle .history-incremental-search-backward fc -P zle .end-of-history } Maarten