Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Problem with completion matching control
- X-seq: zsh-workers 5381
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Problem with completion matching control
- Date: Mon, 15 Feb 1999 10:42:13 +0100 (MET)
- In-reply-to: opk@xxxxxxxxxxxxxxx's message of Sun, 14 Feb 1999 19:35:25 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Oliver Kiddle wrote:
> I've noticed the following behaviour which makes some sense but seems
> like a bug when first noticed.
>
> zsh -f
> :> Temp
> :> temp
> compctl -M 'm:{a-z}={A-Z}'
> less t<tab>
>
> Results in
> less temp
> ^ - Cursor here. 'Temp' and 'temp' are listed below
>
> So it if filling in the 'emp' which is unambiguous but moving the cursor
> back which I find very annoying. In my opinion, it should either
> complete to 'temp' or just beep and list the two files. The former would
> probably be better. Can the semantics of matching control be changed to
> accomodate this with out breaking it's other uses? i.e. Are there cases
> where the cursor moving back is useful?
As for the inserting and listing of matches: the explicitly used
matching spec makes both names possible matches, so only they should
be used and shown (after all that's what all this matching stuff is
about).
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.
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.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author