X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:reply-to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=RrZGsKdw+/5TNP1N 79tVYU6aQi+x6wgQtUtyul160JqOD66IXCvuWCnXlkhFqfWGLOD31KH7NvfdNSmA wZN+iXfDrTHD1zT1t2ox+o0RFB/dmm2dsIMKy2lY7hA71UoAo+diJHUU1TRq+Th6 8GGMFQLLqLv066Ht95kMrH6Oaq4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:reply-to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=BJaW1brNqbh9UsSzRAq+yt gBbuM=; b=y1lCUZO0l8+kn0x7UsGAa/N0VjEAQeZB5yHlhYFUPeZYkSg/IkFd3I RRpKQbPOwxGtocCKCkEgiTdZ+4sLMAjFvfVQ7SA5ZxbW4qhYDTgROpHHZLDx1Wb/ 1Z7i+cKkY46OGe2xH3F4HaUl/NhTmD0F/uqloDIaRHch9iCE1uoyk= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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) Subject: Re: Run command in new window To: cygwin AT cygwin DOT com References: <5a4087c1 DOT cdebca0a DOT a4e97 DOT 8eb3 AT mx DOT google DOT com> <5a428a47 DOT d0179d0a DOT 4c14c DOT fe57 AT mx DOT google DOT com> Reply-To: cygwin AT cygwin DOT com From: cyg Simple Message-ID: Date: Tue, 26 Dec 2017 14:11:57 -0500 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 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