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: Asterisk expansion...


On 27-Jul-1998, Earnie Boyd <earnie_boyd@yahoo.com> wrote:
> ---Fergus Henderson <fjh@cs.mu.OZ.AU> wrote:
> > My point is that your statement "It is the shells job to do the globbing
> > not the programs", while valid in Unix, is not valid in DOS, and it
> > is not valid in any unqualified sense in gnu-win32.
> 
> I know from the experience of my mingw32-sup package that cmd.exe and
> commmand.com do globbing, it is not as robust though.

It has nothing to do with robustness.  `cmd.exe' and `command.com' do
globbing only for their builtin commands, because according to the DOS
design it is the program's responsibility to do globbing, not the
shell's.  This design is in fact *more* robust (although arguably less
flexible) than the Unix design, because it problems with commands such
as `cp *.c' sometimes silently doing the wrong thing instead of
reporting an error message.

(The reason that the Unix design is arguably more flexible is that it
allows you to change the globbing syntax by simply changing shells.)

> For example:
> `ls' doesn't do any globbing, it only reports on a list of files given
> it on stdin.  I ported it to native win32 using mingw32.

If you didn't add code to `ls' to glob-expand its arguments as part
of that port, then you didn't do a complete port, and the problem
is thus best ascribed to a bug in your port, not to any lack of robustness
in the way DOS handles globbing.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3        |     -- the last words of T. S. Garp.
-
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]