This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: running gnu-win32 tools under another Unix-ported shell?


Scott Blachowicz wrote:
> 
> "Earnie Boyd" <earnie_boyd@hotmail.com> writes:
> 
> > Don't know if this will help; but, try using the double quote instead of
> > the single quote.  ie: find . -name "*.cpp" -perm 222 -ls
> 
> Nope...doesn't matter.  I'm running a normal Unix type shell - the quotes
> get stripped by the shell before they get to the sub-process.
> 
> What I'm betting on (without having seen the cygwin source code) is that
> the crt0 (or whatever gets run before main() is called) is detecting
> whether or not it is being run by something that expands glob patterns
> (e.g. the cygwin bash).  I'm guessing that the pre-main() code in find.exe
> is deciding that it got run by command.com or something that doesn't
> expand glob patterns.  My zsh shell (from ftp://ftp.blarg.net/users/amol/)
> IS expanding glob patterns and find.exe (possibly by way of this
> pre-main() code) IS also expanding the glob patterns it sees.  So, I'm
> trying to figure out if there's a way to let cygwin-built programs know
> that the parent shell already does expand the glob patterns.

I have the same problem with tcsh.

I propose that cygwin32 not assume that the parent shell cannot glob 
unless some env vrbl is set to indicate same.

This whole issue of interoperability with windows and windows shells 
(IMHO) is not being handled right.  It can't be that hard to design 
a library/system that can handle globbing/non-globbing shells and 
CR/CRLF/LF files.  A simple environment vrbl (maybe COMSPEC or some such) 
should take care of the globbing problem.  As far as files go, since 
noone is going to want to add a switch to each program, an environment 
vrbl may have to be used here also.

-- 
  ,-/-  __      _  _         $Bill Luebkert
 (_/   /  )    // //       DBE Collectibles
  / ) /--<  o // //      http://www.wgn.net/~dbe/
-/-' /___/_<_</_</_    Mailto:dbe@wgn.net
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]