From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1729 invoked by alias); 28 Dec 2017 00:03:08 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 1718 invoked by uid 89); 28 Dec 2017 00:03:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*UA:github.com, H*M:google X-HELO: mail-ot0-f179.google.com Received: from mail-ot0-f179.google.com (HELO mail-ot0-f179.google.com) (74.125.82.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Dec 2017 00:03:07 +0000 Received: by mail-ot0-f179.google.com with SMTP id p31so27759113ota.4 for ; Wed, 27 Dec 2017 16:03:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:subject:to:references :user-agent; bh=PR5+gaiCTwxWZwKDFe1f2hMPtd5hVI9CF5bjiuhPA+w=; b=PStI1GtKEr4xzyOWMyoS0IRnT1CMW1qQmOszNAwprtO+ikVYJ/miLW3lvJFGcIBPBr DDh4c3dVoCxRkVsZYjqlFTvS6avtyvH89xKUGcuak+zWnTBEJMPpCCA7jcvGZvKC+9oP bhc5ey8dzV/ow9tHcnflZpmKEZFVfqMu+6gRsgUGi+qZVmCG7FlJQQ4IevCQM3Vq1u9f yZN3+N1r1Hbtf+OebC3xsirfHJ5lspZPB1zMOl/TLBT6MOyxww2MqZQx9zGC7t9mdBTG NAY1Dr/FCBBh94RR3yZAxZ2OjgsFQ7p4SNU28qyKwc83rFhLdFDNhRXOfLp2QI8PUal3 Zb3g== X-Gm-Message-State: AKGB3mJ8rlkSK94PsvgGUEeAFeH+UXJvAJ+3eK9BOwhkVcyshMcIPy4E P9wZIyXfhkHri6B/jtMFTURjYQ== X-Google-Smtp-Source: ACJfBouXMdTWYbbrQ+ey2LfUdVuL5l/M3gPRObCEz205nFU42Vx+LkJjN1y5j5rs+Rs6MSNsDwxxTA== X-Received: by 10.157.52.246 with SMTP id t51mr12752210otd.169.1514419385164; Wed, 27 Dec 2017 16:03:05 -0800 (PST) Received: from cG7 ([2605:6000:9fc0:56:c54d:2844:d0c:ba]) by smtp.gmail.com with ESMTPSA id r62sm14208394oih.13.2017.12.27.16.03.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Dec 2017 16:03:04 -0800 (PST) Message-ID: <5a4434b8.41f3ca0a.39c99.67f8@mx.google.com> Date: Thu, 28 Dec 2017 20:11:00 -0000 From: Steven Penny X-Google-Original-From: Steven Penny Subject: Re: Run command in new window To: cygwin@cygwin.com References: <096b28f1-2e30-e371-f0b7-e090a24498f5@gmail.com> Content-Type: text/plain; charset=utf8; format=flowed User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst) X-SW-Source: 2017-12/txt/msg00271.txt.bz2 On Wed, 27 Dec 2017 17:46:37, cyg Simple wrote: > $ cygstart bash -c \"echo \\\'\; read\" > $ export z="'" > $ bash -c "echo \\${z}; read" works > $ cygstart bash -c \"echo \\\\${z}\; read\" this assumes that "z" is something, if you do "z=" then it breaks > $ bash -c 'echo \'; read' > > fails to work when I think it should as the \ should cause the ' > following it to be ignored by the command line processor. na, you can never single quote a single quote, it is not possible. you have to split the string on each single quote, assuming the string has any - then you single quote the substrings as needed and escape the single delimiting quotes: $ echo "hello ' world" + echo 'hello '\'' world' it gets more complicated with cygstart because an extra layer of quoting/escaping is added - I about have a function to automate it - hopefully will post soon -- 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