zsh-users
 help / color / mirror / code / Atom feed
From: Thorsten Kampe <thorsten@thorstenkampe.de>
To: zsh-users@sunsite.dk
Subject: Re: completion not inserting matches
Date: Mon, 19 Apr 2004 17:40:29 +0200	[thread overview]
Message-ID: <iw5pveco3uox$.dlg@thorstenkampe.de> (raw)
In-Reply-To: <1040418232047.ZM8981@candle.brasslantern.com>

* Bart Schaefer (2004-04-19 01:20 +0100)
> On Apr 18,  4:17pm, Thorsten Kampe wrote:
> } | root@wolfbrand# cd r3<TAB>
> } | root@wolfbrand# cd linux-2.4.2---sr3
> } |                                ^ Cursor jumps to this point
> } | local directory
> } | linux-2.4.20-wolk4.11s-r3/  linux-2.4.25_pre7-gss-r3/
> 
> At this point things are a little messed up.  Note that there isn't any
> matching file that actually has three hyphens; those are standing in for
> "-.-" in the first match and "_--" in the second match.

Yes.

Without "m:[-._]=[-._]"      it completes to "linux-2.4.2--sr3"
Without "r:|[-./_]=** r:|=*" it completes to "s-r3"

> Also, the right completion would be "linux-2.4.2--s-r3", so I'm not
> sure how the final hyphen and the "s" are becoming transposed.

Yes. Another oddity:

root@wolfbrand# cd 20<TAB>
root@wolfbrand# cd linux-2..420-wolk4.
local directory
linux-2.4.20-wolk4.9s-r6/   linux-2.4.20-wolk4.11s-r3/

...while it should complete to "linux-2.4.20-wolk4." (the longest
unambiguous part). In this case it cycles through the completions.
 
> } | root@wolfbrand# cd linux-2.4.2--<TAB>-sr3
> 
> That doesn't match where you said the cursor was.  Did you move the
> cursor to the right before pressing TAB, or should that have said
> 
>     root@wolfbrand# cd linux-2.4.2-<TAB>--sr3
> 
> ??

Yes, "-<TAB>--" is more accurate as the cursor sits and blinks on the
middle hyphen "-".
 
> If I understand correctly, you were expecting this to take you into menu
> completion cycling between the two previous matches.  I confess I don't
> know why it does not, except that it may be related to the transposed "s".

Actually I had a phenomenon yesterday while trying to complete some
directories in /usr/src like the one mentioned, where pressing <TAB> a
second time resulted in a "logout" (first log out of "screen" and then
on a third TAB out of the shell thereby closing the ssh connection). I
could reproduce this. So I thought that I had really messed things up.
 
> } These are my completion settings: [1] and [2].
> 
> It'd be a little easier to work with these if they didn't have the ascii
> art border.  As it is it's not possible to cut'n'paste them into a shell
> to duplicate your setup.

These "ascii art borders" are "box quotes" and supposed to make the
quoted text more readable and structured (and it prevents unwanted
linebreaks), but I learned my lesson...
 
> I do notice that you're not using the _oldlist completer.  You might try
> adding that to the front of your list of completers and see if it helps.

Yes, that works perfectly. Although

* I cannot see where I am "using special completion functions, i.e.
commands other than the standard completion system"

* I don't use any other key to generate any completion except the
Tab-key

* My matcher list[1] should work that way (because of the "+") that
even on the second try when case-insensitive and partial-word
completion didn't generate matches, substring completion uses the
other ones ("case-insensitive and partial-word"), too. So the matches
could (in theory) never decrease only increase.


Thorsten

[1]
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z} m:[-._]=[-._] r:|[-./_]=** r:|=*' '+l:|=*'


  reply	other threads:[~2004-04-19 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-18 14:17 Thorsten Kampe
2004-04-18 23:20 ` Bart Schaefer
2004-04-19 15:40   ` Thorsten Kampe [this message]
2004-04-20  4:23     ` Bart Schaefer
2004-04-18 23:35 ` Bart Schaefer
2004-04-19 14:42   ` Thorsten Kampe

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='iw5pveco3uox$.dlg@thorstenkampe.de' \
    --to=thorsten@thorstenkampe.de \
    --cc=zsh-users@sunsite.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).