From: Steven Penny <svnpenn@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Run command in new window
Date: Wed, 27 Dec 2017 09:39:00 -0000 [thread overview]
Message-ID: <5a42f476.8335ca0a.1ba14.0c39@mx.google.com> (raw)
In-Reply-To: <e12dbeac-a27f-4f41-42c6-d5467433c553@gmail.com>
On Tue, 26 Dec 2017 17:44:11, cyg Simple wrote:
> If you want to pass quotes to the process on the command line then you need
> to quote them or use a backslash on the quote to prevent the shell doing
> the exec to process them.
>
> $ cygstart bash -c \'echo 1\; read\'
continuing from my previous email [1], here is an example of your command in
action:
$ z=1
$ cygstart bash -c \'echo $z\; read\'
and here is something that breaks your example:
$ z=\'
$ cygstart bash -c \'echo $z\; read\'
so you see, your command assumes that no single quotes will be between the
single quotes, which is just not robust. it seems something like one of these
will be needed:
- bash printf %q
- coreutils printf %q
- homebrew function [2]
[1] http://cygwin.com/ml/cygwin/2017-12/msg00263.html
[2] http://github.com/svnpenn/stdlib/blob/45df8cf/libstd.awk#L318-L326
--
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
next prev parent reply other threads:[~2017-12-27 1:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-25 3:50 Steven Penny
2017-12-25 4:06 ` Andrey Repin
2017-12-25 4:37 ` Steven Penny
2017-12-25 4:54 ` Dave Caswell
2017-12-25 5:11 ` Steven Penny
2017-12-26 17:43 ` Dave Caswell
2017-12-26 18:54 ` Steven Penny
2017-12-26 19:12 ` Steven Penny
2017-12-26 19:41 ` Dave Caswell
2017-12-26 23:44 ` Steven Penny
2017-12-27 1:11 ` cyg Simple
2017-12-27 1:16 ` Steven Penny
2017-12-27 1:38 ` Jürgen Wagner
2017-12-27 22:46 ` Steven Penny
2017-12-27 9:39 ` Steven Penny [this message]
2017-12-28 12:07 ` cyg Simple
2017-12-28 20:11 ` Steven Penny
2017-12-26 22:44 ` cyg Simple
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5a42f476.8335ca0a.1ba14.0c39@mx.google.com \
--to=svnpenn@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).