From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17547 invoked by alias); 8 Feb 2016 18:45:27 -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: X-Seq: 37918 Received: (qmail 16956 invoked from network); 8 Feb 2016 18:45:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=aQ0A0eFT4y0NbPOh1JgzvoQD00wFJ0XQ7wDCg2yPHSo=; b=D7SB/k5AWoiJVi9dtdEc4OkqwVNedEQRSfpfazmBOnOROKplvKB8kcVKMKYNxwMunj H8Glw64TtCqkWXcJTQfnrpy2lv7+5DDEG1V3DiRuQCfv2jODNNZcZ5KDdpMX47mnoo7b VHgQT/Ei7fOsaTOJJrTzgKG5OoZ8uZYrjgJ3Dsftnv0brgWQwNvCiXoGh3AqsnH8mSEd DKOXLavtQH6hFlM7dztrQ8WB23M0qCvk6ukuP8tWPdhYhpYtvcOJtjLb3b1bnMMK1duE fd7kSMqEJ++HA1gBbK/8Pof0pxfbED3o8ouBhruoUgBbgmxZfQOT1iltTNEHCcGNyLF1 n+xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=aQ0A0eFT4y0NbPOh1JgzvoQD00wFJ0XQ7wDCg2yPHSo=; b=Gf30vHxYJn3Xh6D/5YhEqPNGS2zje/cKYy7fyWohET23OfsjLhCcALP1//S6C8SX9i rr2VT8ndnxe9AGGz3coYEh03wp0SYeU2dNU6oPowuhNJ0p6qwG0mXS0vJG32ChV0rydG Dby7kZjrBe3HdMLzGzi+kwy3UH9onOX0DV08ZRMW4EXp6/pvbe0dXDYfOIJsafNANFyC c0pXcSsZi/TGYpqfCsAbSZMF37P1u3SnolydJSRaL7EegondmJpc/muE3HznT3G6aM/F ICtMr/3BFPspHdj2r/9cgfFTELbVO5dHAxm2xsC/rngBmvJJRKXkoXC8P+FvmOrT6yDz EF+A== X-Gm-Message-State: AG10YOTxE7zq8h/LISa5Gq7HfJtTRC0H8VMJtWffKCoZNtL9m8/VH4qJEP6f0Ow3shf7Aw== X-Received: by 10.66.152.204 with SMTP id va12mr44604541pab.0.1454957122253; Mon, 08 Feb 2016 10:45:22 -0800 (PST) From: Bart Schaefer Message-Id: <160208104528.ZM12107@torch.brasslantern.com> Date: Mon, 8 Feb 2016 10:45:28 -0800 In-Reply-To: Comments: In reply to Mikael Magnusson "Re: Unexpected foo==bar errors" (Feb 8, 4:52am) References: <160207111638.ZM30626@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh workers Subject: Re: Unexpected foo==bar errors MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Feb 8, 4:52am, Mikael Magnusson wrote: } } On Sun, Feb 7, 2016 at 8:16 PM, Bart Schaefer wrote: } [...] } > } _tar:70 is } > } tf=${~words[3]} } > } > Ooh, that's a fun one: (foo) is being taken as glob qualifiers, which is } > a larger problem in this case than the expansion of "=". Then because } > globassign is off, the equals expansion (on the empty string) is done, } > but the qualifiers are never applied to the result. One potentially open question here is whether the value should be parsed as a glob (qualifiers recognized) when no globbing is possible. } > The only use of $tf as far as I can see is to do lookups in the cache. } } Presumably at some point the given filename has to be interpreted so } that it can give any completions at all, even if it's not cached? On closer inspection yes, I'm wrong about this, $tf is passed to "tar -tf" to list the contents of the tar file even if not found in the cache. } I wonder if there's anywhere in the completion system that depends on } EQUALS being set... But maybe we should just 2> /dev/null the } assignment since tilde expansion also prints errors. (_zattr and _zip } also have this issue, presumably there are other places as well). Redirecting error would still leave $tf empty. But there's no way to cause process substitution [that is, <(...) >(...) and =(...) syntax] to be applied to the result of parameter expansion, except by using "eval" -- and of course globbing won't happen without GLOB_ASSIGN, so the only reason for tf=${~words[3]} (and the other assignments in _tar from lines 66-82) is to do tilde and equals expansion.