delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Date: | Mon, 14 Jan 2008 21:10:33 -0800 |
From: | Gary Johnson <garyjohn AT spk DOT agilent DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: need help with bash -c <command> with cygpath |
Message-ID: | <20080115051032.GA8900@suncomp1.spk.agilent.com> |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <2D9E96311DCA4C48BF185EA6928BC7BB030AAB8D AT asc-mail DOT int DOT ascribe DOT com> <01a501c85470$647dde60$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <4787E0A0 DOT 3010102 AT byu DOT net> <loom DOT 20080111T215048-569 AT post DOT gmane DOT org> |
MIME-Version: | 1.0 |
In-Reply-To: | <loom.20080111T215048-569@post.gmane.org> |
User-Agent: | Mutt/1.5.17 (2007-11-01) |
X-IsSubscribed: | yes |
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 2008-01-11, Jay wrote: > Thanks everyone for the help. Since i'm getting the path from the registry i > can't add in the extra backslashes without using sed. I ended up with this > registy key which seems to work for local drives as well as network drives > (UNCs) (haven't tested files with special characters). Something I used to work around this problem was to have Windows invoke a bat file and have that bat file invoke bash. The key, though, suggested in this list some time ago, is to add "noglob" to the CYGWIN environment variable in the bat file, so that the bat file can pass the file name, directory name, or network path given to it by Windows to the bash command unchanged. E.g., set cygwin_save=%CYGWIN% set CYGWIN=%CYGWIN% noglob C:\cygwin\bin\rxvt.exe -e C:/cygwin/bin/bash --login -c "run_bash_here "'%1'" "'%cygwin_save%' where run_bash_here is a function defined in ~/.bashrc that contains, among other things, # Restore original value of CYGPATH. # CYGWIN="$2" Regards, Gary -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |