delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/07/15/09:48:59

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Hannu Koivisto <azure AT iki DOT fi>
Subject: CYGWIN / (no)glob documentation bug
Date: Fri, 15 Jul 2011 16:48:17 +0300
Lines: 32
Message-ID: <83fwm764f2.fsf@kalahari.s2.org>
Mime-Version: 1.0
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.3 (gnu/linux)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hi,

http://cygwin.com/cygwin-ug-net/using-cygwinenv.html says:

"(no)glob[:ignorecase] - if set, command line arguments containing
UNIX-style file wildcard characters (brackets, question mark,
asterisk, escaped with \) are expanded into lists of files that
match those wildcards. This is applicable only to programs running
from a DOS command line prompt. Default is set."

It seems that globbing is applicable not only to programs running
from a DOS command line prompt, but to programs run from any native
Windows (non-Cygwin) application.

FWIW, that behaviour may cause somewhat mysterious problems.  For
example, I just had a non-Cygwin git front-end attempting to run
git with command line parameters "cat-file", "-e" and
"123456789^{commit}" and the result was a failure because of brace
expansion.  But I guess there isn't much that can be done about
this (except fix the documentation and have users use noglob) since
the cygwin dll can't really know when globbing is desired and when
it isn't.

Also, braces aren't listed as wildcard characters in the quoted
documentation even though GLOB_BRACE is passed to glob() in the
argument globbing code.

http://www.cygwin.com/faq/faq-nochunks.html#faq.api.globbing should
probably be updated as well.

-- 
Hannu


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019