Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Date: Thu, 10 Jun 1999 15:17:33 -0400 From: cygwin AT sourceware DOT cygnus DOT com To: Henry Gessau Cc: cygwin AT sourceware DOT cygnus DOT com Subject: Re: Bug Report: File globbing in CMD shell Message-ID: <19990610151733.A25580@cygnus.com> References: <19990610141756 DOT A25372 AT cygnus DOT com> <000001beb371$11fc8230$84c82ca1 AT gessau-pc DOT cisco DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: <000001beb371$11fc8230$84c82ca1@gessau-pc.cisco.com>; from Henry Gessau on Thu, Jun 10, 1999 at 02:43:02PM -0400 On Thu, Jun 10, 1999 at 02:43:02PM -0400, Henry Gessau wrote: >Hmmm. That doesn't quite make sense either. I tried the same thing on >Solaris: > >$ ls tmpdir/* >tmpdir/tmp.txt >$ ls tmpdir\* >tmpdir*: No such file or directory >$ ls tmpdir\\* >ls: No match. >$ ls tmpdir\tmp.txt >tmpdirtmp.txt: No such file or directory As I stated in another mail, the arguments to a cygwin program are not globbed unless an unquoted wildcard character is seen. Cygwin does collapse a quoted backslash to a backslash, however. It also leaves single backslashes, that do not quote anything "special", alone. I don't see this as being too inconsistent. We can't emulate UNIX behavior 100% because backslashes do mean something to Windows. >Note the difference between the fourth example above and the fourth example >below. It looks like Cygwin is trying to accommodate the DOS backslash path >separator when invoked from CMD.EXE, but it is not very logical when the >argument contains an asterisk. > >My opinion is that backslash should not quote the next character when using >CMD.EXE (at least there should be an option for specifying this). > >I would like to have a look at the file globbing code - any hints as to >where I might find it? (I have not delved into the Cygwin sources before.) It is in the winsup sources. Grep for 'glob'. cgf -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com