Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problem with completion matching control



On Feb 15, 10:42am, Sven Wischnowsky wrote:

> As for the cursor position: I tried to make the completion code clever 
> here by making it leave the cursor in the place where it is easiest to
> make the inserted line unambiguous. I know that this may look
> irritating but I think that this is the right thing to do. I could be
> convinced to make this controlled by an option, so that the cursor is
> left at the end if the option is unset.

I've done a few experiments and now agree with you that moving the
cursor back is better but I've also noticed something more subtle about
the behaviour which I think is a bug.

Starting with the usual:
zsh -f
compctl -M 'm:{a-z}={A-Z}'
:> temp > Temp

Now this behaves in a way that I like:
less t<tab><tab><tab>

But this behaves quite differently
less te<tab><tab><tab>

In the first case, the first tab completes 'temp', moves the cursor over
the e and lists 'Temp   temp' below the line. The second tab capitalises
the T and moves the cursor to the end. The third tab then lowercases the
t and any more tabs will continue to cycle.

In the second case, the first tab completes to 'temp' and moves the
cursor over the e as before but it doesn't list anything below. Any
subsequent tabs do nothing.

In practical use, I tended to get the second scenario because I normally
press tab after typing more than one character. Anyway, it is certainly
the second case which I find annoying.

> Playing with this I also noticed that there is some weird interaction
> going on between inserting such a string and the setting of recexact
> (the exact inserted match isn't immediatly accepted, which is wrong if 
> auto_menu is unset). I'll have a lokk at this.

I'm not sure if its the same as what you've noticed there. I get some
similar but different problems to what I described above when in the zsh
source directory after:
./co<tab><tab>
Here I again get no list and the menu completing stops at Config/ but
this is only with my options - its fine with zsh -f.

Thanks

Oliver Kiddle



Messages sorted by: Reverse Date, Date, Thread, Author