X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; q=dns; s=default; b=NP
	fQmAPM66a71vvCM1CxS/Pa3/hlMZ9K9P8ZYj8t5KdpirslugOucaKDRm1Ru05SMZ
	SMek/Fnq9j/DKxiOXBoXTvQ1Ji9w5cjPmokVvVI9TNZcRKJRjpcj5u6nfUcJhAy9
	m5E80UxaOXgz89KcjseK8rEfcO6eUl/1LrHPkRvfU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; s=default; bh=4aofWH3t
	yg93sQbGxEbGygIOfaQ=; b=CD65qLpU6arRiaYuppTctRWaGks8CQPy1iCxZQRg
	F/9IAfIYNAxrxIbdobJszOLu/NeY2xJqkaf5/43JXb1qf1S/lYqIotr/9iRfUc3H
	8dL/rqi3GisrfqmB5emoy52c6eSyxxa6b01JeU7yHJ1BnV1xjobsSiHlLzVl8k4r
	Skw=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-qc0-f175.google.com
MIME-Version: 1.0
X-Received: by 10.55.21.166 with SMTP id 38mr38091326qkv.88.1430683576335; Sun, 03 May 2015 13:06:16 -0700 (PDT)
In-Reply-To: <CA+Ni7jMAtGL=xV2GoM5CCo282OdU1aDed++1kGX_UrrT=FbzFA@mail.gmail.com>
References: <CA+Ni7jNBd0WZu37OMiPEyvxwkgvYnDfonKoLjpuvNrZ95A9Rbw@mail.gmail.com>	<CA+Ni7jMAtGL=xV2GoM5CCo282OdU1aDed++1kGX_UrrT=FbzFA@mail.gmail.com>
Date: Mon, 4 May 2015 00:06:16 +0400
Message-ID: <CA+Ni7jMCym9_txVuvoFCeV_3t8NV7CD68unR8WjKP9f6szx4hw@mail.gmail.com>
Subject: Re: Passing double quotes to DOS
From: =?UTF-8?B?0J/RkdGC0YAg0JEu?= <satnatantas@gmail.com>
To: cygwin <cygwin@cygwin.com>
Content-Type: text/plain; charset=UTF-8

cygwin.com/ml/cygwin/2002-02/msg00336.html


There was a statement saying that cygwin does everything to preserve
double quotes.

It does not. I was recently doing some symbolic links with "cmd /c
mklink "path" "filename" " recently and it was fine until I had a file
with ampersand.

If I type
cmd /c mklink "path" "filename"

cmd.exe is called without doubleqoutes (I use ProcExp to see cmd line).

If I type same thing in "Run" dialog of TaskManager, doublequotes are
passed as intended.


If I type
cmd /c mklink \"path\" \"filename\"

reverse slash spills to cmd line.

If I type
cmd /c mklink "\"path\"" "\"filename\""

reverse slash and all doubleqoutes spill to cmd line.


I really do not get it. How do I pass doubleqoutes to CMD? Problem is
not related to mklink or any internals of CMD and even bash - Cygwin
does not pass doubleqoutes instead.

Example:
echo "\"bbb\""
cmd /c echo "\"bbb\""

There must be an error somewhere on the CYGWIN/Windows boundary.

Can I somehow whitelist "cmd.exe" so it does not get special treatment?

CYGWIN_NT-6.1 USER 1.7.33-2(0.280/5/3) 2014-11-13 15:47 x86_64 Cygwin

--
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

