Why does "view" not allow wildcards?

Eli Zaretskii eliz at gnu.org
Mon Jan 4 09:35:54 GMT 2010


> From: Ben Finney <ben+bazaar at benfinney.id.au>
> Date: Mon, 04 Jan 2010 18:40:40 +1100
> 
> Eli Zaretskii <eliz at gnu.org> writes:
> 
> > > From: Ben Finney <ben+bazaar at benfinney.id.au>
> > > You can use the existing tools to gather those filenames for you::
> > > 
> > >     $ bzr view --name changelogs $(find . -name 'ChangeLog*')
> >
> > Where are these facilities documented, please?
> 
> I may not have been explicit enough. I was referring not to Bazaar
> tools, but to “existing tools” of the operating system — i.e. the tools
> provided by any POSIX operating system good for software development.

Sorry, the use of $(..) duped me.  I see the light now.

> If you are on the MS Windows operating system, you can install a
> suitable POSIX environment with Cygwin <URL:http://cygwin.org/>, which
> also comes with the manual pages.

No need for Cygwin Bash, as the latest Windows versions have a cmd.exe
shell that is powerful enough to do something similar, albeit with a
somewhat weird syntax.  This should work on Windows 2000 and newer
(untested), assuming you have a Windows port of GNU Find:

  for /f "useback tokens=1*" %i in (`find .  -name "ChangeLog*" -printf "%p "`) do bzr view --name changelogs %i %j

However, note that if the wildcard expands into a very large list, it
might overflow the 32KB limit of Windows command-line length.  E.g.,
imagine a view for all *.py files in a very large project.  So I
would submit that Juanma's original request still has its merit.



More information about the bazaar mailing list