zsh-users
 help / color / mirror / code / Atom feed
* bug with **/ syntax?
@ 1996-12-07 12:32 Matthew Braun
  1996-12-07 13:33 ` Zefram
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Braun @ 1996-12-07 12:32 UTC (permalink / raw)
  To: zsh-users

I'm trying to get the behavior of ksh's */, which according to the zsh
man page, looks like you should use **/ to get that behavior.  To me it
looks like **/ is really acting like ***/.

Examples below.

So is this a bug or am I not reading the man page correctly?

Matthew.

=====

sassy:ftp/glimpse-4.0.src> ls -F
CHANGES            Makefile.orig      communicate.c      glimpseindex.1
CONTRIBUTIONS      Makefile.rs6000    compress/          glimpseserver.1
COPYRIGHT          Makefile.sgi       configure*         index/
Makefile           Makefile.solaris   configure.in       install-sh*
Makefile.NeXT      Makefile.sunos     defs.h             lib/
Makefile.alpha     README             get_filename.c     libtemplate/
Makefile.hp        README.install     get_index.c        main.c
Makefile.in        agrep/             glimpse.1          mkinstalldirs*
Makefile.linux     bin/               glimpse.chronicle  split.c

sassy:ftp/glimpse-4.0.src> ksh -c 'ls -d */' 
agrep/        compress/     lib/
bin/          index/        libtemplate/


[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/

sassy:ftp/glimpse-4.0.src> \ls -d ***/
agrep/                 lib/                   libtemplate/template/
bin/                   libtemplate/           libtemplate/util/
compress/              libtemplate/include/
index/                 libtemplate/lib/


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: bug with **/ syntax?
  1996-12-07 12:32 bug with **/ syntax? Matthew Braun
@ 1996-12-07 13:33 ` Zefram
  0 siblings, 0 replies; 2+ messages in thread
From: Zefram @ 1996-12-07 13:33 UTC (permalink / raw)
  To: Matthew Braun; +Cc: zsh-users

>[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 ***/ .


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-12-07 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-12-07 12:32 bug with **/ syntax? Matthew Braun
1996-12-07 13:33 ` Zefram

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).