From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51052 invoked by alias); 26 Dec 2017 19:12:02 -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 50052 invoked by uid 89); 26 Dec 2017 19:12:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mail-io0-f178.google.com Received: from mail-io0-f178.google.com (HELO mail-io0-f178.google.com) (209.85.223.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Dec 2017 19:12:00 +0000 Received: by mail-io0-f178.google.com with SMTP id i143so13209112ioa.3 for ; Tue, 26 Dec 2017 11:12:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:reply-to:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=e/o06He35LjvYrAesZHQ3Oim09fljngZZGqs9YcZk6U=; b=JGoKWR0oaxvLOu1WcOWcXj61tlsE2+DQaSqCE7aJ0yle+6IiUxLkG2NJ199rRvhE6v IwRidoDzPubrpEn5f0NXlGxfw2KzXLHoSUIAy4T9hzGtm5zGzeZFb86I93VyhUKFFt9+ GQ/yXSc/Y/CIySIktDBUykigPCPUX35wM8HswXsf7Qz4b5TvguUcTB3T8bIFdshDVmfp I/Vf6IiCF6PasbvLKLcpA1cm9Fh6TWG9t3H8B7VsDnC2GCb7yKbyiSF3ORC1H2WbCiOi /wLQXEClOqXuFMT2rwAj0PwkKTGn0n2rlfPHcMK1X4/mNH6xRAxVBGWM3UJrtNWxiFDP DdOw== X-Gm-Message-State: AKGB3mJlLBha9smBeSscoIxxppj/BVAM5y6Hm5S9ZT40byDUCXRLe6QV 1Q3QNSrMwgqKJjvzL0oI0sqeQg== X-Google-Smtp-Source: ACJfBotR3h/2g5QpxkWn5fSkGwMnm5OL/995Ritfb9ddiNGKWoZGt/V7X7iu7i9WwXKVo6Kjb/417A== X-Received: by 10.107.70.1 with SMTP id t1mr19735653ioa.269.1514315519049; Tue, 26 Dec 2017 11:11:59 -0800 (PST) Received: from [192.168.0.19] (d4-50-42-50.try.wideopenwest.com. [50.4.50.42]) by smtp.gmail.com with ESMTPSA id i203sm9793158itb.40.2017.12.26.11.11.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Dec 2017 11:11:58 -0800 (PST) Subject: Re: Run command in new window To: cygwin@cygwin.com References: <5a4087c1.cdebca0a.a4e97.8eb3@mx.google.com> <5a428a47.d0179d0a.4c14c.fe57@mx.google.com> Reply-To: cygwin@cygwin.com From: cyg Simple Message-ID: Date: Tue, 26 Dec 2017 22:44:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <5a428a47.d0179d0a.4c14c.fe57@mx.google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00262.txt.bz2 On 12/26/2017 12:43 PM, Steven Penny wrote: > On Sun, 24 Dec 2017 21:08:17, Steven Penny wrote: >> that did it - thanks - this also works: >> >>     cygstart bash '-c "echo hello; read z"' >> >> seems like a problem with cygstart parser? here is the syntax: >> >>     cygstart [OPTION]... FILE [ARGUMENTS] >> >> so should support multiple arguments - this command works as expected >> >>     cygstart touch 1 2 3 >> >> maybe the hyphen in "-c" is causing the problem? > > update - cygstart does support multiple arguments, but any spaces will > cause a > problem. for example this command works fine: > >    cygstart bash -c 'echo;read' > > but this fails > >    cygstart bash -c 'echo 1;read' > > and for some reason any spaces must be quoted - not escaped - these work: > >    cygstart bash -c '"echo 1;read"' >    cygstart bash -c "'echo 1;read'" > > these fail: > >    cygstart bash -c 'echo\ 1;read' >    cygstart bash -c "echo\ 1;read" This has to do with the where the interpretation of the quote marks are read. The -c option for bash expects a quoted command but the quotes are being interpreted by the parent shell executing the cygstart command. The quotes are not interpreted by cygstart itself. $ cygstart bash -c \'echo 1\;read\' -- cyg Simple -- 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