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

Re: bug with **/ syntax?



>[this next example is the alleged bug, it shouldn't show the directories
>under libtemplate --matthew]
>
>sassy:ftp/glimpse-4.0.src> \ls -d **/    
>agrep/                 lib/                   libtemplate/template/
>bin/                   libtemplate/           libtemplate/util/
>compress/              libtemplate/include/
>index/                 libtemplate/lib/

That is correct behaviour:

A pathname component of the form
.BI ( foo /)#
matches a path consisting of zero or more directories
matching the pattern foo.
As a shorthand,
.B **/
is equivalent to
.BR (*/)# .
Thus:
.RS
.PP
ls
.BI (*/)# bar
.RE
.PP
or
.RS
.PP
ls
.BI **/ bar
.RE
.PP
does a recursive directory search for files named bar, not following
symbolic links.  For this you can use the form
.BR ***/ .



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