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

RE: PATCH: cleanup in zle_tricky.c



> >
> > Bsically, the completion does not work with ambiguous prefix.
> In my case I
> > had /u1/informix* as well - that way _path_files took another branch.
>
> Ah, I thought you had made sure that this didn't happen because we had
> this discussion already -- and hence I didn't test for it (the real
> problem was that without globcomplete there were no matches). At that
> time I had asked if we wanted the path to expand as far as possible in
> such cases.
> Since you perceived this as a bug, the patch below makes the answer
> `yes'.
>
> > In case of `.../*.suffix', the `/.*' was replaced by `/.', that 'course
> > could not match.
>


I am sorry for this misunderstanding - obviously, I was not clear enough
-( What I intended to say, was:

the bug with .../*.suffix (* removal) happened (or had effect) only in case
of ambiguous prefix (at least so my test results). I did not mean anything
else.

Now, that I have been working with this a bit more, the result of this patch
is somewhat unexpected. Now, the /a/b/c/d expands the prefix even if nothing
would match. Returning to my expamle - the bug with /u/i/s/*.h was, that
this does match, but the match failed (because of bug). And current
/u/i/s/*.c -> /usr/include/sys/*.c is a bit too much ...

> Ok, with the patch below and the ones from 5871, 5872, and 5875: does
> everything work as you want (or expect ;-) it now? Including those
> `test/{a1,b1,x1y}' problems you mentioned?

Yes, with your great completers all works as expected - with above exeption.

May I suggest, that this change would be backed off? Probably, with
configuration option (but I fail to see, when it would be useful). If direct
completion of /a/b/c/d fails, this is the job for approximate/correcting
completion then.

To be more precise - the change makes prefix to be expanded even if nothing
matches. I did not intend it, and did not ask for it.

cheers

/andrej

P.S. Sorry for turmoil this week. But when after every patch I get different
results after pressing TAB ... :-)



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