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

Re: PATCH: tricky.c (was messages from Andrej and Bart)



Bart Schaefer wrote:

>  > The problem is that after expansion, the code can't find out
>  > what came from the expansion in cases like `${foo}x<TAB>'.
> 
> Hrm ... so what was happening in the old completion code in this case?

Thinks went utterly wrong, even worse than what the new code did
before the patch: 

  % echo $PWD:h<TAB>
  % echwischnow/

... of course, the result depends on the last pathname component.

>  > So the patch just uses the expanded prefix if it has the problem that
>  > the expanded prefix contains slashes and the original string doesn't.
>  > Maybe a better solution would be to do nothing in such cases.
> 
> Does this apply only to file completion?  What if the expansion happens
> in some other context where slashes aren't special?

The error occured only in the code that is used when completing
filenames. In other contexts the expanded prefix would be used and
completed.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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