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

Re: compsys issues



    Hi Oliver :)

 * Oliver Kiddle <okiddle@xxxxxxxxxxx> dixit:
> >     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.

    OK, now I understand. If I use $PREFIX and '-M', that won't work,
am I right? If I use $PREFIX I should use too :t or something similar
so it affects the globbing pattern but not the matching mechanism of
compadd, right?

> >     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.

    Nice :)) I want coloring in the matching list, so I'll keep -f.
 
> >     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.

    Now I understand, right. I was confused by the manual and deduced
that -W affected the matching.

    Thanks a lot for your kind and useful explanation :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/



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