From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id GAA20116 for ; Fri, 11 Aug 1995 06:28:03 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA19989 (5.65c/Gatech-10.0-IDA for ); Thu, 10 Aug 1995 16:26:07 -0400 Received: by math (5.x/SMI-SVR4) id AA00395; Thu, 10 Aug 1995 16:20:17 -0400 Resent-Date: Thu, 10 Aug 1995 22:19:31 +0200 (MET DST) Old-Return-Path: From: hzoli@cs.elte.hu (Zoltan Hidvegi) Message-Id: <9508102019.AA02178@turan.elte.hu> Subject: Re: Revised dohistexpand() To: zsh-workers@math.gatech.edu (zsh-workers) Date: Thu, 10 Aug 1995 22:19:31 +0200 (MET DST) In-Reply-To: <25700.199508101327@stone.dcs.warwick.ac.uk> from "Zefram" at Aug 10, 95 01:54:54 pm X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-Id: <"tF-za2.0.16.0ecAm"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/304 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > > Peter wrote: > >Still, now I've found out what all this code does, maybe I can work > >around it some other way. I'm hoping, eventually, to modify the > >history code so that only the lines actually typed are stored, with > >the word separation in a list of numbers > > I like this idea. Much of the expansion/completion code could benefit > from having the parser point out word beginnings to it. This would be > a great aid to consistency in complex quoting (e.g. "a b" "`a b`" "`'a > b'`" etc.). It would similarly help to have nesting indicated in this > way, to help with command/process substitution. Yes, this would be really nice. I have already modified the lexer to supply the start and end of backquote and $(...) and <(...) set. substitutions. Together with that I completely rewore get_comp_string() in zle_tricky.c which is much shorter, simpler now. But it can be further improved I think. > On magic-space: it shouldn't expand history when the cursor is in a > history reference (e.g. !{a). At the moment > doexpandhist() removes the word; it should feep and leave the word > unchanged. The same applies to expand-history, which also calls I think my release doesn't do this. It doesn feep, just silently inserts the space. In fact even the old beta10 code tried to do that but it did not work since it tested errflag after lexrestore(). > doexpandhist(). I also think an error should be flagged when > attempting to expand an invalid history reference, rather than removing > it (this would accurately reflect how zsh treats the bad history > reference in a completed line). The error is flagged but the reference (together with the trailing part of the line) is removed. But zle_tricky.c stores the old line so it can check the error and restore the original line. Zoltan