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: Run command in new window


On Tue, 26 Dec 2017 11:54:14, Dave Caswell wrote:
$ cygstart -v bash -c \'echo 1\;read \'
ShellExecute(NULL, "(null)", "bash", "-c 'echo 1;read '", "(null)", 1)
By escaping the quotes and semicolon so they get passed along intact,
the executed bash also gets an intact command string.

this is interesting, but it doesnt explain (or im not understanding) why it will
accept a quoted string and not an escaped one. in a normal setting, these
commands are identical:

   $ bash -c 'echo; read'
   + bash -c 'echo; read'

   $ bash -c echo\;\ read
   + bash -c 'echo; read'

but with cygstart this command works:

   cygstart bash -c '"echo; read"'

and this does not:

   cygstart bash -c 'echo\;\ read'


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


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