From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: still confused about completion and matching
Date: Wed, 25 Oct 2000 09:12:12 +0200 (MET DST) [thread overview]
Message-ID: <200010250712.JAA23765@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "E. Jay Berkenbilt"'s message of Tue, 24 Oct 2000 11:00:58 -0400
E. Jay Berkenbilt wrote:
> ...
>
> The most recent change to _match seems to cause it to revert to menu
> completion in many cases. If I just completely remove lines 56 and 57
> (dealing with unambiguous_cursor) then all my test cases work just the
> way I want them to.
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.
> The only thing I lose is earlier expansion in
> some cases, but the result doesn't change the behavior or the amount
> of typing required.
And this is exactly what they were supposed to achieve. Inserting the
right expansions a bit earlier. The test is a bit weird, I admit, but
worked for the cases I tested, but probably not for other cases, so I
have don't have any problems whatsoever with removing them (or later
trying to come up with a better test.
> ...
>
> Would the
> next step be committing these changes and waiting for fallout? :-)
I'd like to ask what the other people around here think about
it. Without setting one of the new styles, the patch should only have
one visible effect: allowing to complete paths with multiple pattern-
containing components.
Should we give it a try? Has anyone else tried it yet? (Andrej? I
/think/ you once asked for this multi-component-pattern completion.)
Andrej Borsenkow wrote:
> > insert-unambiguous
> > This is used by the _match and _approximate completer functions,
> > where the possible completions may not have a common prefix so
> > that menu completion is often the most useful may of choosing
> > completions. If the style is set to `true', the completer will
> > start menu completion only if no unambiguous string could be
> > generated that is at least as long as the original string typed by
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > the user.
> ^^^^^^^^^^
>
> 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 ;-)
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.
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-10-25 7:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-25 7:12 Sven Wischnowsky [this message]
2000-10-25 7:41 ` Andrej Borsenkow
-- 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=200010250712.JAA23765@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).