delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/06/13:54:51

X-Spam-Check-By: sourceware.org
Date: Thu, 06 Apr 2006 10:54:41 -0700
From: "Jerry D. Hedden" <jerry AT hedden DOT us>
Subject: RE: BUG: 'run -p' fails if path contains spaces
To: cygwin AT cygwin DOT com
Message-ID: <20060406105441.fb30e530d17747c2b054d625b8945d88.d80eae4e6e.wbe@email.secureserver.net>
MIME-Version: 1.0
User-Agent: Web-Based Email 4.0.18
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

Jerry D. Hedden wrote:
>run 1.1.8-1 fails if the path used with the -p option contains any
>spaces.
>
>The following works:
>   run '/cygdrive/c/Program Files/vim/vim64/gvim.exe'
>
>The following fails with a dialog box stating that it can't find
>gvim.exe:
>  run -p '/cygdrive/c/Program Files/vim/vim64' gvim.exe

Alexander J. Herrmann queried:
> Is there a special reason why you don't escape spaces?
>   run -p '/cygdrive/c/Program\ Files/vim/vim64' gvim.exe

You're not supposed to escape spaces when the argument is in single
quotes.  Doing so adds the backslash into the string as evidenced by:
  echo '/cygdrive/c/Program\ Files/vim/vim64'

The following are equivalent (although neither works):
  run -p '/cygdrive/c/Program Files/vim/vim64' gvim.exe
  run -p /cygdrive/c/Program\ Files/vim/vim64 gvim.exe

Further, your example (with single quotes and backslash) doesn't work
either.


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019