From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106033 invoked by alias); 27 Dec 2017 01:38:05 -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 106016 invoked by uid 89); 27 Dec 2017 01:38:04 -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=intricacies, Thata, That'a, thata X-HELO: mail-ot0-f180.google.com Received: from mail-ot0-f180.google.com (HELO mail-ot0-f180.google.com) (74.125.82.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Dec 2017 01:38:02 +0000 Received: by mail-ot0-f180.google.com with SMTP id g59so7684256otg.11 for ; Tue, 26 Dec 2017 17:38:02 -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=Vif8hwYCw6EbhMW3ZIk53SHoi4y9n0+JNPd8scRArNo=; b=FbGvrEs5Rk5SwWQXMGt456OGyyx3tdfpLu+UzB+oGu2we8wsxmZBrRfbAwlmXhISEE xvaRfoTEef/PDhYhT128j+7i+7qrEtX25azM9vbw21oKHjJgeK/u50mBBDwTrOt39Mq6 u9W5i2sLNaFnLZK/mq4geDaWWPnekr1I3BidR96/HMbDALJYdMOdgoXB14EzHM1y5+Ek 7oyGdeh+BkJ1c8aWm1lG4UaXwnGmBARZuTUk5wE3CgOB/4jNtebvKG8Gl4Wn2ueTyBo6 I9ocET9rtSZ8hd2u95xctDU83ass/rQocRbAVCQN//mDZknUJj6sM5um7JyqphwwuTJ/ JX5w== X-Gm-Message-State: AKGB3mLq0uLFnropbYKcY8Qw8cwG74R8GT4ba0S3XLGo4c5rQKxnKmNw xGJPQm2hOWEJ/rvjoolyf+w6VA== X-Google-Smtp-Source: ACJfBosx4csOyzYqmvIUFvXMCDw2c+jheKkcAgOvsTdwsv7snBaAai3ymvdFRb1KYZgF17IJgzwkBg== X-Received: by 10.157.14.241 with SMTP id 104mr22675883otj.301.1514338680906; Tue, 26 Dec 2017 17:38:00 -0800 (PST) Received: from VBn ([2605:6000:9fc0:56:c54d:2844:d0c:ba]) by smtp.gmail.com with ESMTPSA id r33sm15787780otr.58.2017.12.26.17.37.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Dec 2017 17:38:00 -0800 (PST) Message-ID: <5a42f978.e4149d0a.552a1.1125@mx.google.com> Date: Wed, 27 Dec 2017 22:46:00 -0000 From: Steven Penny X-Google-Original-From: Steven Penny Subject: Re: Run command in new window To: cygwin@cygwin.com References: <844ea576-1047-8366-d5b0-36a7ac2a5be7@wagner.is> Content-Type: text/plain; charset=utf8; format=flowed User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst) X-SW-Source: 2017-12/txt/msg00268.txt.bz2 On Wed, 27 Dec 2017 02:11:52, Jürgen Wagner wrote: > Why don't you put the stuff to execute into a nice shell script and get > rid of the intricacies of quoting on the command line level? > That'a way easier to manage and test. really that seems like the best option. the only drawback to that is you wouldnt be able to pass parameters to the script, else you run right back into the previous problem: $ cat hw.sh printf '%s\n' "$@" read $ z='hello world' $ cygstart bash hw.sh "$z" hello world so then you try to fix it with quoting: $ cygstart bash hw.sh "'$z'" hello world which works until you get a variable with single quote: $ z=\' $ cygstart bash hw.sh "'$z'" # nothing so you would either need a robust quoting solution [1], or need to create temporary scripts for each invocation needed. not ideal either way [1] http://cygwin.com/ml/cygwin/2017-12/msg00265.html -- 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