From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 7b2b4619 for ; Sun, 18 Aug 2019 12:52:47 +0000 (UTC) Received: (qmail 18345 invoked by alias); 17 Aug 2019 21:45:01 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44681 Received: (qmail 17237 invoked by uid 1010); 17 Aug 2019 21:45:01 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f41.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25538. spamassassin: 3.4.2. Clear:RC:0(209.85.166.41):SA:0(-1.9/5.0):. Processed in 2.638949 secs); 17 Aug 2019 21:45:01 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.41 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Iz8PZVcdsImDE8UHDC6S2RGY/0ZlWT68kvONH0jiSn8=; b=PixZhbi7qmsUdqHBMKjML6tQMtWHgKU5ssSXMO+m58a1FxJbNPKm9Fx4FrUwZmZ+Tq iQX7TlmQZ8695sUTYQJnabGjqzWvRzIgl4f+Xgnp/E4m9f01q9Hh0sJkT+s1yFEfobez RZa/rT3j/v/e6lWxWeLbBM0leifJDe7vajM0EKXb30ayeCFsx/5c+cNuhMWXy+QJnOPn fndRqiAVKxk8e16jaIvax0ZCiWp1hF7LC1Q9p8yIZoA07Ekzk3CvAcYqP2hK9jBNLGiO 1vq+PA13jQ/6UELqiEMfhTeN+AObbN/3gsLpjxzXAnksLM4mEO8oNmXDpTmFofvugupV 1J7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Iz8PZVcdsImDE8UHDC6S2RGY/0ZlWT68kvONH0jiSn8=; b=rUy9DGolHHtI+WBFU/V0+v3Cz0crWnmqGal5Gl+RssrWCIBJHvTZwWw673IKal7SMu WpqfEVZBxdSms6N0C9wIArOGo0uLMHPCsP0xQHxJIrB1GaOFWdf3VlXLQN0YKrW8DHAm e53H/o7e5LKzcswKLA+ntapt9GlQhVd3h0/uPd+LwAA6W0rhoCDObkZM8hc2DNhB+7K3 qziNejSiJyN5kWxu+EPDZCIQcC7QeNganuXQ2HhTWeNOH7v94UvFS8ujGD+0sqvOtSqg gvWJVPiY8rcsX4u1XzDO2XE8v+NBk60T2droY5nm5Dc5CMhq/ktl/HVcSGfRfPf/RRwy 8ngg== X-Gm-Message-State: APjAAAVZyVgmIMca+TmXWZQHebzKhM1Cyz3hYm+wGUKrFM9vbionxDvj h7M98WQMhlVAcbtefrAeOR9kSw== X-Google-Smtp-Source: APXvYqwLVJdr5LyhpgkTnMKZyqTGoa7E/hI0cN4XAZSgFe3Pv1B2j009wOJlsMA5VdmP11Q3r6SjqQ== X-Received: by 2002:a6b:5a12:: with SMTP id o18mr17015473iob.159.1566078264539; Sat, 17 Aug 2019 14:44:24 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: help for writing GNU stow completion From: dana In-Reply-To: <0618d7fc-5334-4e51-829a-8684a81744c1@www.fastmail.com> Date: Sat, 17 Aug 2019 16:44:22 -0500 Cc: =?utf-8?B?QXVyw6lsaWVu?= , Zsh hackers list Content-Transfer-Encoding: quoted-printable Message-Id: References: <1e5195bb-3126-8d0c-8a6a-1f5a5fd2a6c0@yahoo.fr> <0618d7fc-5334-4e51-829a-8684a81744c1@www.fastmail.com> To: Daniel Shahaf X-Mailer: Apple Mail (2.3445.104.11) On 17 Aug 2019, at 12:53, Daniel Shahaf wrote: > Sorry, but I have to object to the PR as it stands. As I said, using > =C2=ABeval $1=C2=BB causes expressions on the command line to be = evaluated > _when completion is attempted_. To me, that breaks the principle of > least surprise, and could lead to unexpected and undesired results. > > I would strongly prefer another solution, or to be corrected on my > interpretation that this violates least surprise. Oh, i didn't notice that the GitHub thing was a PR for zsh. I agree with this. And i can't think of a general-purpose alternative = that's currently built into the shell. Apparently i made the same mistake when i wrote _composer, though; = attached replaces the eval by (as i mentioned) what seems to be the prevailing convention. I think a similar change might be warranted in _git @ 2866? dana diff --git a/Completion/Unix/Command/_composer = b/Completion/Unix/Command/_composer index 2b9f2cd32..191350453 100644 --- a/Completion/Unix/Command/_composer +++ b/Completion/Unix/Command/_composer @@ -115,7 +115,7 @@ __composer_prune_global_opts() { (( $+functions[__composer_update_work_dir] )) || __composer_update_work_dir() { if [[ -n ${(v)opt_args[(i)(-d|--working-dir)]} ]]; then - eval _composer_work_dir=3D${(v)opt_args[(i)(-d|--working-dir)]} + _composer_work_dir=3D${(Q)${(v)opt_args[(i)(-d|--working-dir)]}} elif [[ -z $_composer_work_dir ]]; then _composer_work_dir=3D$PWD fi