X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Jay <jmandawg@hotmail.com>
Subject:  Re: need help with bash -c <command> with cygpath
Date: Fri, 11 Jan 2008 15:13:41 +0000 (UTC)
Lines: 26
Message-ID:  <loom.20080111T150132-291@post.gmane.org>
References:  <loom.20080109T014917-334@post.gmane.org> <47845595.5040406@byu.net> <loom.20080109T133322-382@post.gmane.org> <4784D93C.10803@byu.net>
Mime-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  7bit
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
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

> That's still somewhat wasteful, starting bash just to get a vim alias -
> why not use the full name gvim, and bypass the bash process to begin with?

you right, i'm going to remove it, thanks.

My main problem now is that for some reason the leading backslash on UNC names
is getting dropped when calling bash -c from the windows command prompt, even
when using just single quotes.  So if you run this from a windows command prompt:

H:\>C:\cygwin\bin\bash -v -c '\\UNC_PATH\Dir'
\UNC_PATH\Dir   <--Leading backslash dropped
/usr/bin/bash: UNC_PATHDir: command not found

It drops off the leading backslash.

When you run it from Cygwin bash:
>bash -v -c '\\UNC_PATH\Dir'
\\UNC_PATH\Dir       <--The leading backslash is preserved.
bash: \UNC_PATHDir: command not found

I know i can make it work by piping the path into sed, but I'm just wondering
why i'm losing the leading backslash when running from windows.

Maybe dos is passing in the single quotes as double quotes.

Thanks again for the help.


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

