X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_SORBS_WEB,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD,WEIRD_QUOTING X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Oleksandr Gavenko Subject: CYGWIN=noglob remove double quotes from args. Date: Thu, 30 Sep 2010 18:31:29 +0300 Lines: 47 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com As I understand docs if I set CYGWIN=noglob then command line arguments passed to Cygwin app WITHOUT changes. I use native Emacs build so worry about stop Cygwin damage passed arguments. And seems this is not true. With CYGWIN=noglob all double quotes removed from args! Originally I discaver this when I call Cygwin application from NT Emacs by: (call-process "bash" nil t nil "-c" " echo \"a b\" ") I get: a b (ONE space!) I wrote simple app that print its args quoted: (call-process "printarg" nil t nil "-c" "echo \"a \"\"\"\" b\"\"\"\"\"") "/cygdrive/d/home/usr/bin/printarg" "-c" "echo a b" If compile printarg.c with MSVC all quotes printed: (call-process "printarg" nil t nil "-c" "echo \"a \"\"\"\" b\"\"\"\"\"") "/cygdrive/d/home/usr/bin/printarg" "-c" "echo "a """" b"""""" Same happen with cmd.exe: cmd# printarg-msvc "a \" b" "printarg-msvc.exe" "a " b" cmd# set CYGWIN=glob cmd# printarg-cygwin "a \" b" "printarg" "a " b" cmd# set CYGWIN=noglob cmd# printarg-cygwin "a \" b" "printarg" "a \" "b" -- 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