| delorie.com/archives/browse.cgi | search |
| 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 <corinna-cygwin AT cygwin DOT com> |
| 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: | <CAB3JEf8sr0r1SXXdwU080vq6NxWf8EJyQvTuy_ToiN7oQ4_SCA AT mail DOT gmail DOT com> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <CAB3JEf8sr0r1SXXdwU080vq6NxWf8EJyQvTuy_ToiN7oQ4_SCA@mail.gmail.com> |
| User-Agent: | Mutt/1.5.21 (2010-09-15) |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |