zsh-workers
 help / color / mirror / code / Atom feed
From: hzoli@cs.elte.hu (Zoltan Hidvegi)
To: zsh-workers@math.gatech.edu (zsh-workers)
Subject: Re: Revised dohistexpand()
Date: Thu, 10 Aug 1995 22:19:31 +0200 (MET DST)	[thread overview]
Message-ID: <9508102019.AA02178@turan.elte.hu> (raw)
In-Reply-To: <25700.199508101327@stone.dcs.warwick.ac.uk> from "Zefram" at Aug 10, 95 01:54:54 pm

> 
> 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<magic-space>).  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


  reply	other threads:[~1995-08-10 20:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-08-09 13:44 P.Stephenson
1995-08-09 14:35 ` P.Stephenson
1995-08-09 15:21 ` Zoltan Hidvegi
1995-08-09 17:11   ` P.Stephenson
1995-08-10 12:54     ` Zefram
1995-08-10 20:19       ` Zoltan Hidvegi [this message]
     [not found] <24456.199508101254@stone.dcs.warwick.ac.uk>
1995-08-10 14:08 ` P.Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9508102019.AA02178@turan.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).