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

Re: Excluding files & directories from a glob



> >> >> >  grep -i 'host' **/(*.cfm~(ctpigeonbot|env).cfm)~*((#s)|/)junk*/*(.)
> >>
> >> Ok I give in what does the qualifier #s mean and do, and where is it in the doc.
> >
> >The #s qualifier matches the start of a string. In the manual you can find its
> >description on the "13.8 Filename generation" section, under 13.8.4 :
> >globbing flags.
> >Here is the relevant chunk of documentation :
> Thanx Jean
> Now I understand the above.
>
> However the following (simplified example) still seems to work:-
>
> list all files fred unless they are in a subdirectory *junk*
>
> ls **/fred~*junk*/*

Of course it does ! It's just *less* restrictive than the pattern Peter wrote.
If you have a subdirectory named not_junk, this pattern will skip all
its contents,
whereas Peter's pattern will include it.

--
J
"If you wish to leave a record of your call,
 please state your messij at the sound of the tone."


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