zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <borsenkow.msk@sni.de>
To: "Sven Wischnowsky" <wischnow@informatik.hu-berlin.de>,
	<zsh-workers@sunsite.auc.dk>
Subject: RE: PATCH: was RE: PATCH: old lists compstate
Date: Tue, 30 Mar 1999 13:34:52 +0400	[thread overview]
Message-ID: <000801be7a90$8ffd8b30$21c9ca95@mowp.siemens.ru> (raw)
In-Reply-To: <199903300837.KAA06917@beta.informatik.hu-berlin.de>

> > bor@itsrm2:~%> l /t/s/gl/co<TAB>
> > bor@itsrm2:~%> l /tools/src/glib-1.<TAB>/config
> > bor@itsrm2:~%> l /tools/src/glib-1.<TAB>/config
> > glib-1.1.15/  glib-1.2.0/
> > bor@itsrm2:~%> l /tools/src/glib-1.1.15<CURSOR>/config
> > glib-1.1.15/  glib-1.2.0/
>
> That's without menucompletion, but with automenu, right?
>

Yep.

> > that is O.K., but
> >
> > bor@itsrm2:~%>  compconf completer=_menu:_complete:_match
> > bor@itsrm2:~%> l /t/s/gl/co<TAB>
> > bor@itsrm2:~%> l /tools/src/glib-1.1.15/config.cache <CURSOR>
> > glib-1.1.15/  glib-1.2.0/
>
> Leaving the cursor at the end is normal menucompletion behavior. Then
> I was about to say that to have the cursor in the middle, you have to
> add a `compstate[to_end]=single' for normal menucompletion and a
> `compstate[to_end]=""' for `_menu' -- when I discovered the bugs fixed
> by the patch below. And now I can say it.
>

And I can confirm, that it did the trick :-) But the question I have, is -
what is the difference? I mean, in both cases we have menu completion. In
both cases to_end is set to single (am I wrong?) and is not reset (except in
_menu now). But these two behave differently. And even more differently, as
here is what I get with _menu (after I set to_end to "":

bor@itsrm2:~%> l /t/s/gl/co<TAB>
bor@itsrm2:~%> l /tools/src/glib-1.1.15<TAB>/config.cache
glib-1.1.15/  glib-1.2.0/
bor@itsrm2:~%> l /tools/src/glib-1.1.15/config.guess
glib-1.1.15/  glib-1.2.0/

Note, that the list is shown for some part of path, but menu completion
cycles through the last component.

Please, understand me. I find it great, that it is possible to program menu
(and list) via shell function - but, then, I'd like to know, how to get at
least the same behaviour as builtin :-) And what I see here, seems to be
plainly wrong in any case.


>
> Nonono. bashautolist shows the list on the *third* TAB if something
> unambiguous could be inserted on the first TAB. listambiguous shows it
> if nothing unambiguous could be inserted. And in your example there
> definitly was a lot unambiguous stuff inserted on the first TAB.
>

What is interaction with autolist+listambiguous and automenu (I don't have
menucompletion set, so I presume, automenu is set by default?) It looks to
me, that

first TAB inserts prefix
second TAB shows list (due to autolist? listambiguous? or both?)
third TAB starts menu (due to automenu?)

I just tested (_complete:_match), and am still confused :-)

with automenu without autolist, listambiguous
 - menu is started at the second TAB. List is never shown. Cursor moves to
end of word when menu starts
with automenu,autolist without listambiguous
 - list is shown at the first tab; menu at the second TAB; cursor moves to
the end of word when menu starts
with all three set
 - list is shown at the second TAB; menu is started at the third TAB; cursor
is moved at the end of inserted string when menu starts!

It is the difference in cursor placement that confuses me. I would not
expect any difference except in when list is shown/menu is started. I think,
that probably a description how all these options work together would be
really useful in completion manual.

Do I understand it correctly, that when compstate[insert] is set to a
number, menu completion is started immediately? (BTW, manuals are not
updated) Is it possible to completely emulate builtin code by testing
compstate[insert] for menu, ambiguous values? And probably take in account
the compstate[list] value? But to do this, one needs the clear picture, how
they all play together ...

cheers

/andrej


  reply	other threads:[~1999-03-30  9:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-30  8:37 Sven Wischnowsky
1999-03-30  9:34 ` Andrej Borsenkow [this message]
1999-03-30 10:07 Sven Wischnowsky
1999-03-30 10:22 ` Andrej Borsenkow
1999-03-30 11:10 Sven Wischnowsky
1999-03-30 12:02 ` Andrej Borsenkow
1999-03-30 12:52 Sven Wischnowsky
1999-03-31 16:28 ` 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='000801be7a90$8ffd8b30$21c9ca95@mowp.siemens.ru' \
    --to=borsenkow.msk@sni.de \
    --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).