zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: RE: PATCH: (was Re: _configure does not work)
Date: Tue, 9 Mar 1999 14:09:14 +0100 (MET)	[thread overview]
Message-ID: <199903091309.OAA14118@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Andrej Borsenkow"'s message of Tue, 9 Mar 1999 13:47:09 +0300


Andrej Borsenkow wrote:

> > > itsrm2% ./configure --e-d<TAB>
> > > itsrm2% ./configure
> > >  (the whole stuff deleted)
> > >
> > > I'd thought, it completed to at least --enable-dynamic before.
> >
> > I think it didn't, I think it generated a list containing
> > `--enable-dynamic', `--enable-zsh-debug' and others. This was wrong in
> > the matching code in zle_tricky.c.
> >
> 
> Why? I had impression, it was the result of matcher. If I say -M 'r:|-=*
> r:|=*', then ``--e-d'' inevitably matches enable-zsh-debug. Should it not be
> handled in matcher spec? "anything except -"?

This is slightly modeled after globbing behavior: anchors of `*'
patterns separate parts like slashes separate pathname components.
Inside the word they all have to be typed explicitly.

Personally, I like this behavior much better than the `* matches even 
it's anchors' (I wanted this behavior from the beginning, so I
consider the patch to be a bug fix), because an important goal of
completion is to produce as few matches as possible -- even if this
may sound strange.

About making match specs more powerful: with the code as it is now, it 
would be easier to support a pattern for `match a couple of characters 
like ...', where the `...' is a character or character-class. However, 
implementing full support for `r:|.=[^.]#' would be very complicated,
since people would immediatly expect all the patterns they know from
globbing to be understood. The problem is that the code not only has
to do matching (that would be easy, just use the globbing code), but
also to build the strings to put in the line and in the match-structure.

So, I'll think about this some more once I have done the things I want 
to do in the matching/joining code anyway. But probably I would just
prefer a simple yse/no choice: a `*' that matches it's anchors and one 
that doesn't do that.

Of course, I'd also like to hear other people's opinion on this --
that would also give me a hint how many of you use such patterns.

Bye
 Sven

P.S.: To get the previous behavior, just de-apply the first two hunks
      of the patch to zle_tricky.c.

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1999-03-09 13:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-09 13:09 Sven Wischnowsky [this message]
1999-03-09 13:37 ` Andrej Borsenkow
  -- strict thread matches above, loose matches on Subject: below --
1999-03-09 14:25 Sven Wischnowsky
1999-03-09 16:47 ` Andrej Borsenkow
1999-03-09 13:58 Sven Wischnowsky
1999-03-09 12:54 Sven Wischnowsky
1999-03-09 14:04 ` Andrej Borsenkow
1999-03-09 10:32 Sven Wischnowsky
1999-03-09 10:47 ` Andrej Borsenkow
1999-03-09 11:36 ` Andrej Borsenkow

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=199903091309.OAA14118@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).