zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: <zsh-workers@sunsite.auc.dk>
Subject: RE: still confused about completion and matching
Date: Wed, 25 Oct 2000 11:41:14 +0400	[thread overview]
Message-ID: <000601c03e56$f39287f0$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <200010250712.JAA23765@beta.informatik.hu-berlin.de>

>
> To Bart and Andrej: the lines Jay is referring to are:
>
> +    [[ $compstate[unambiguous_cursor] -gt $#compstate[unambiguous] ]] &&
> +        ins=yes compstate[insert]="$ocsi"
> compstate[pattern_insert]="$ocspi"
>
> These are new and don't have anything to do with the
> insert-unambiguous style.
>

O.K. I have not followed these patches ...
> >
> > That is the problem. It means, that if you have long pattern that
> results in
> > short match, menu completion is started.
> >
> > I was never happy about it as well. But I switched to menu
> selection some time
> > ago :-)
>
> Any suggestions about making this more clever or the results more
> intuitive are welcome ;-)
>

This condition predates styles. Now we do have suitable means for users to
configure desired behaviour.

As I said long ago, I did not want Zsh to decide for me when to start menu
completion if I did not request it. I do not want to invent another condition.

> As I sais in one of the previous mails, I wasn't completely happy with
> that condition myself. The problem is that we certainly don't want to
> insert the unambiguous string unconditionally even if insert-unambig
> is set, because that string might often be empty.
>

First, why are you _so_ sure there won't be any common prefix? For people that
know shell glob patterns by heart it is sometimes easier to type pattern than
to invent matching specification. And matches for foobar[1-9] are always
shorter than pattern itself.

Second, how does it differ from ordinary completion? The sole thing I wanted -
let's treat completion and matching equally. Both give you a set of matches to
select from. Let's use common rules to decide when and how these matches are
inserted. (After all, "ordinary" completion is just matching with pattern
$PREFIX*$SUFFIX ... even if not implemented this way. I do not see why
$PREFIX?#$SUFFIX should be treated differently :-)

cheers

-andrej


  reply	other threads:[~2000-10-25  7:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-25  7:12 Sven Wischnowsky
2000-10-25  7:41 ` Andrej Borsenkow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-10-25  7:50 Sven Wischnowsky
2000-11-06 15:34 ` E. Jay Berkenbilt
2000-10-24  7:44 Sven Wischnowsky
2000-10-24 15:00 ` E. Jay Berkenbilt
2000-10-24 15:15   ` Bart Schaefer
2000-10-24 15:28     ` Andrej Borsenkow
2000-10-23 13:20 Sven Wischnowsky
2000-10-19  9:11 Sven Wischnowsky
2000-10-20 16:38 ` E. Jay Berkenbilt
2000-10-20 16:57   ` Andrej Borsenkow
2000-10-20 20:45     ` E. Jay Berkenbilt
2000-10-23  7:15       ` Andrej Borsenkow
2000-10-23 13:11         ` E. Jay Berkenbilt
2000-10-16  8:05 Sven Wischnowsky
2000-10-17 19:30 ` E. Jay Berkenbilt
2000-10-13 11:03 Sven Wischnowsky
2000-10-12 19:56 E. Jay Berkenbilt
2000-10-12 20:32 ` E. Jay Berkenbilt
2000-10-16  5:01 ` Bart Schaefer

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='000601c03e56$f39287f0$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --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).