zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Sven Wischnowsky" <wischnow@informatik.hu-berlin.de>,
	<zsh-workers@sunsite.auc.dk>
Subject: RE: 3.1.6-dev-18
Date: Tue, 15 Feb 2000 13:29:57 +0300	[thread overview]
Message-ID: <000601bf779f$9b599cf0$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <200002150943.KAA11806@beta.informatik.hu-berlin.de>

>
> > Still, how much do you gain by being able to put them in matcher-1 and
> > matcher-2?  Is that more powerful than just using array elements of the
> > style in order, rather than simply more cumbersome?  The only examples I
> > can think of where you gain something are where _matcher is followed the
> > second time by _prefix instead of _complete (or vice versa), or
> where some
> > other element of the context is different between the matcher-1 and
> > matcher-2 cases.  These seem to me to be to abstruse to be
> useful.  But I
> > may well have missed something.
>
> I can only repeat... I would have no problems with turning the matcher
> style as used by _matcher (or even renaming it for clarity) into one
> that is used as an array. The first _matcher would then use the first
> string in the value, the second one the second string and so on. I
> just thought -- and I may very well be wrong here -- that it would
> make users more aware of what they are doing if we use this more
> explicit setting we have now. I.e., even with the suggested
> array-interpretation of the matcher style one would have to add a new
> call to _matcher in the completer list when adding a new string to the
> matcher style.
>

Please, no. It will be worse than it is now.

When I spoke about array, I meant absolutely different thing. Remove
_matcher completer alltogether. Setup a style with match specs, that will be
tried in order. In other words

zstyle :completion::complete::::: match_specs "" spec1 spec2 ...

with semantics

_complete should try this list in order until it gets matches.

I agree, that your way provides more fine grained control ... the question
is, how complex completion system is going to be? Do you think, that an
everage user would ever need such a complexity?

And what occured to me ... why _oldlist, _prefix etc are completers at all?
They look much more like actually a styles to me! They do not generate any
matches - rather, they say completion system _how_ to generate matches. So,
somewhat revolutionary ;-) idea:

leave only _complete
use styles to describe, just how _complete should do completion. Something
like

:completion::complete:::::pass-1 flags normal
:completion::complete:::::pass-2 flags prefix
:completion::complete:::::pass-3 flags match keeplist
:completion::complete:::::pass-4 flags approximate prefix

and additional

:completion::complete:::::pass-1 match_specs "" spec1 spec2

with semantics

first try normal with completion with empty, spec1, spec2. If nothin works,
try prefix; if this fails, try match keeping old list; and if this fails,
try approximate.

/andrej


  reply	other threads:[~2000-02-15 10:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-15  9:43 3.1.6-dev-18 Sven Wischnowsky
2000-02-15 10:29 ` Andrej Borsenkow [this message]
2000-02-15 21:58 ` 3.1.6-dev-18 Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
2000-02-17 10:58 3.1.6-dev-18 Sven Wischnowsky
2000-02-16 10:50 3.1.6-dev-18 Sven Wischnowsky
2000-02-16 17:41 ` 3.1.6-dev-18 Peter Stephenson
2000-02-15 11:47 3.1.6-dev-18 Sven Wischnowsky
2000-02-14  9:38 3.1.6-dev-18 Sven Wischnowsky
2000-02-14 19:10 ` 3.1.6-dev-18 Peter Stephenson
2000-02-11 19:38 3.1.6-dev-18 Peter 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='000601bf779f$9b599cf0$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=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).