Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compsys issues
DervishD wrote:
>
> OK, but that doesn't solve the problem I explained below. And I
> assumed that I must use $PREFIX :? I don't understand why I must
> remove the last path element from PREFIX :?
Sorry, I probably only confused things by mentioning that point. It only
really matters if you use matching control. For example, if you want
case-insensitive matching. If $PREFIX contains `mo', mo* would not match
a file named More while just adding * as matches allows the completion
matching control to decide for itself which files match.
> That works perfectly, thanks a lot :) The only part I didn't
> understand was the -W flag. I mean, the manual says this flag adds the
> string to the WORDS, and I though that the process was:
-W only controls the way the -f option works. The string is added to the
WORDS purely for the purpose of finding out whether the match refers to
a regular file, a directory or whatever. -W has no effect on what the
list of matches will be. Try removing the -W and -f options from compadd
and use `-S /' instead if you want.
> But if I understand correctly, the string that follows '-W' is
> added *before* compadd does the matching, am I wrong?
Whether it is before or after makes no difference. The string following
-W has nothing to do with matching.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author