zsh-workers
 help / color / mirror / code / Atom feed
From: Andrew Main <zefram@tao.co.uk>
To: pws@ifh.de (Peter Stephenson)
Cc: zsh-workers@math.gatech.edu
Subject: Re: zsh-3.1.2-zefram4
Date: Mon, 20 Apr 1998 20:49:37 +0100 (BST)	[thread overview]
Message-ID: <199804201949.UAA21486@taos.demon.co.uk> (raw)
In-Reply-To: <199804201854.UAA10269@hydra.ifh.de> from "Peter Stephenson" at Apr 20, 98 08:54:08 pm

Peter Stephenson wrote:
>The idea was that with the ksh and zsh models being incompatible
>anyway, it was asking for trouble trying to mix them.

If we add an unambigous syntax for qualifiers, it will be possible to
mix them.  Anyway, I simplified the code, as well as the documentation,
quite a bit.

>?? It didn't have any semantics before, it didn't work at all inside
>parentheses.

It works just as well as *~, unless I'm missing a critical test case.
As I mentioned earlier, there's a serios bug in ~ processing.

>but what's wrong with the meaning `negate the following' that it needs
>the extra parentheses?

Precedence.  ^ binds tighter than /, | and so on.  ~ binds looser than
anything except |.  You made a ^ immediately after a ( bind looser
than *anything*, which made "(^foo|bar)" and "((|)^foo|bar)" behave
differently.

>> This turned up a very old
>> bug in the exclusion handling: `(foo~bar)BAZ' is actually treated as
>> `fooBAZ~barBAZ', rather than the exclusion being properly localised.
>
>?????? How could it possibly mean anything else?

It matters when what follows the parentheses has more than one way to
match.  This includes the case of having two negations in the pattern or,
and this is the killer, a negation inside a loop.  Consider "(*~foo)b*"
versus "*b*~foob*" -- "foobb" should match the former ("foob" matches
"(*~foo)") but not the latter.

-zefram


  reply	other threads:[~1998-04-20 19:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <zefram@tao.co.uk>
1998-04-09  9:25 ` zsh-3.1.2-zefram4 Andrew Main
1998-04-10  3:21   ` zsh-3.1.2-zefram4 Richard Coleman
1998-04-10 13:00     ` zsh-3.1.2-zefram4 Louis-David Mitterrand
1998-04-16 16:35     ` New maintainer Andrew Main
1998-04-16 17:00       ` Richard Coleman
1998-04-10 16:08   ` zsh-3.1.2-zefram4 Andrej Borsenkow
1998-04-20 18:54   ` zsh-3.1.2-zefram4 Peter Stephenson
1998-04-20 19:49     ` Andrew Main [this message]
1998-04-21 11:36       ` zsh-3.1.2-zefram4 Peter Stephenson
     [not found] <19980409102529.13189.qmail@primenet.com.au>
1998-04-09 10:48 ` zsh-3.1.2-zefram4 Andrew Main
     [not found] <Pine.LNX.3.96.980409184105.1983B-100000@fruit.ml.org>
1998-04-09 16:55 ` zsh-3.1.2-zefram4 Andrew Main
1998-04-09 18:02 zsh-3.1.2-zefram4 Francisco Solsona
1998-04-11  1:24 zsh-3.1.2-zefram4 Gene Cohler
1998-04-14  9:33 ` zsh-3.1.2-zefram4 Andrew Main

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=199804201949.UAA21486@taos.demon.co.uk \
    --to=zefram@tao.co.uk \
    --cc=pws@ifh.de \
    --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).