From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13984 invoked from network); 13 Sep 2003 22:07:27 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 Sep 2003 22:07:27 -0000 Received: (qmail 22569 invoked by alias); 13 Sep 2003 22:07:10 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6567 Received: (qmail 22558 invoked from network); 13 Sep 2003 22:07:09 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 13 Sep 2003 22:07:09 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [216.136.128.126] by sunsite.dk (MessageWall 1.0.8) with SMTP; 13 Sep 2003 22:7:9 -0000 Message-ID: <20030913220707.13828.qmail@web10412.mail.yahoo.com> Received: from [165.247.203.34] by web10412.mail.yahoo.com via HTTP; Sat, 13 Sep 2003 15:07:07 PDT Date: Sat, 13 Sep 2003 15:07:07 -0700 (PDT) From: Felix Rosencrantz Subject: Re: Ability to set HISTNO to a certain position from within zshrc To: zsh-users In-Reply-To: <1030911144814.ZM8804@candle.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Thanks Bart. I've tried your suggestions. The "fc" and the print -z work well. And I bind the "enter" key to point to accept-and-infer-next-history. Though ainh has a couple problems. It's not a replacement for accept-line. It won't accept if it can't infer. Peter(?) recently modified accept-line-and-down-history to accept even if it can't go down in history. I suspect ainh could be modified too. Though maybe the current behavior is preferred... I wanted to start in the middle of history not the beginning. So the lines above the starting point contain commands that might need to be run, and the starting line and following lines contain the likely sequence of commands to run. With the "print -z"/ainh solution I lose the ability to have the leading commands. I don't want to place them in history after the likely command sequence, (so they are just above "print -z" line) since I don't want to accidentally run them through a series of ainh commands. It almost seems like there should be a infer-back-into-history, where it determines the inferred line, and jumps to it in history. Maybe even an accept-and-down-history-or-infer, which accepts, attempts to go down in history, and if at the end of the history, attempts to infer the next command. -FR. __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com