Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion not inserting matches
- X-seq: zsh-users 7367
- From: Thorsten Kampe <thorsten@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: completion not inserting matches
- Date: Mon, 19 Apr 2004 17:40:29 +0200
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <x1n6gf1ludq1.dlg@xxxxxxxxxxxxxxxx> <1040418232047.ZM8981@xxxxxxxxxxxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
* 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:|=*'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author