X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 26 Jan 2012 16:04:03 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Problems with UNC filenames passed to bash when called from a windows shortcut Message-ID: <20120126150403.GB5363@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Jan 24 11:10, john refling wrote: > I have noticed that some filenames (with spaces) specified as UNC paths are > not passed properly as positional parameters at the cygwin / windows > interface. > > > Specifically, I have an XP shortcut to cygwin bash placed in my XP SendTo > folder. Bash calls another custom script called ARGTEST.sh. The names of > files that were selected by the mouse before clicking the SendTo are tacked > onto the end of the command line by the standard windows mechanism. > > > These filenames ultimately become the positional parameters for the custom > script, which simply prints them out. The shortcut is named ARGTEST. > > > So the "target" for the XP shortcut ARGTEST is the following: > > > %SYSTEMDRIVE%\cygwin\bin\bash.exe /ARGTEST.sh > > > the script /ARGTEST.sh is nothing more than: > > > #!/bin/sh > export PATH=/bin > for i in "${@}"; do > echo "$i" > done > read -p "Press Enter..." > exit > [...] > Running the same 2 examples above, but selecting files on a network share > results in some wrong results: > > > \\q04\place\mnt\mnt\how2bu.txt > \\q04\place\mnt\mnt\Questionable > \q04\place\mnt\mnt\Copy of how2bu.txt (WRONG!) > \q04\place\mnt\mnt\tmp - must sort soon (WRONG!) > \\q04\place\mnt\mnt\.master Try setting the environment variable CYGWIN to "noglob" before calling bash. Other than that, I'm looking if we can fix that for 1.7.10. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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