This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: BUG: 'run -p' fails if path contains spaces


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]