From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3144 invoked from network); 17 Oct 2000 23:04:02 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Oct 2000 23:04:02 -0000 Received: (qmail 24397 invoked by alias); 17 Oct 2000 23:03:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13015 Received: (qmail 24388 invoked from network); 17 Oct 2000 23:03:53 -0000 Date: Tue, 17 Oct 2000 19:03:57 -0400 Message-Id: <200010172303.TAA15698@soup.ql.org> X-Authentication-Warning: soup.ql.org: ejb set sender to ejb@ql.org using -f From: "E. Jay Berkenbilt" To: schaefer@candle.brasslantern.com CC: zsh-workers@sunsite.auc.dk In-reply-to: <001017142111.ZM3802@candle.brasslantern.com> (schaefer@candle.brasslantern.com) Subject: Re: parse errors and up-line-or-history References: <200010171935.PAA14828@soup.ql.org> <001017142111.ZM3802@candle.brasslantern.com> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII > > zsh% for in *; do echo $i; done > > zsh: parse error near `do' > > > > which seems entirely reasonable. If you then do ^p to fix it, you see > > only > > > > zsh% for in *; do > > > > and not the whole command. > > Congratulations, you've revived the "literal vs. lexical history" debate, > if it ever really was a debate. > > Zsh used to have an option to store the command history as the literal > input text, rather than as lexical words. IIRC, it actually stored both > and let you select which one to retrieve. The duplication was resolved > in favor of lexical history a *very* long time ago, with the side-effect > that anything that won't lex, doesn't make it into the history. > > For a partial workaround, see zsh-workers/10996. This workaround does exactly what I want. I just bound your zle-fetch-previous and zle-fetch-next to ^x^p and ^x^n respectively so I get the benefits of the lexical history except when I really want the other in which case I can specify it directly. Thanks. Jay