From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24846 invoked by alias); 8 Feb 2016 19:17:02 -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: 37919 Received: (qmail 22070 invoked from network); 8 Feb 2016 19:17:01 -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,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JKPQm+IEMAz5ZrQcaD70L0RkkDiA0CK3rTQMHbvbxco=; b=xgELrqM8Tq4q8pS5xX2mXK0ToMRpE317OqWeRBe6xGyuzXIqnnwaHIrFSUS8Tc7A9p rkzjGoDt6zFSwP4DTXz+Jh0gnNBcC4bpgp5RRVJFnrWIhQ0E1YRaxsA3uSaRehVFUBWk LerY0+yeVY2Sn70SC52LC2ibm1DETFoBKFY5po0rfjmSVRqBe+WVXuNl+LQipRuhiJm8 TkedDsgcJFEWtzzu2eKewNYMZQomYk9oRFzryw2+l/9twoJzMKcI2OE0usGf+WHl1xhH sRvqQcUDO64Qv6cmHPzxTnjVZwijNQIziLOo2T7vo+L643wbqIhZtgQcOGlPC7W2UKWs 2WWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=JKPQm+IEMAz5ZrQcaD70L0RkkDiA0CK3rTQMHbvbxco=; b=BowNwps2w/K8XM7B04BbhqlauHcCjxZ+OTqzZ9rzi+UycarXkD2M0PUZWmuVAJXtLH R0b6A4UZX8PcYrJdhgt+XO2rnFKScAVOk+dFJZooM7DaLvqPdl72kY9wtblusCkk4j77 Iasmd/GWzNNDp3A8P4U+334sf4CJwwu6sMkeBXxsZAdDnq/vu0jbhvBrs9gAAs4t+xZp FpHCJYFUFeZ3fFR/5gZ3kMotiO8MWUepNVZVAuG3mpVRJbhTkblFhyab5OQAnBBVB4AG HlU45tvh4L8OU394zosvXR5K0yuIfckzhjcHaCaBgk2TzEHRyH8iuGbwuf4VvcAg5WYu JYpQ== X-Gm-Message-State: AG10YOQQkMENENI8w+Jabi2DaOKtMC0XmlXBl/LBQmcgp7Iu3GW4iYDKXxwxd7bBORnCodXvAugedUfehT1oUw== MIME-Version: 1.0 X-Received: by 10.140.178.195 with SMTP id y186mr38471682qhy.100.1454959018232; Mon, 08 Feb 2016 11:16:58 -0800 (PST) In-Reply-To: <160208104528.ZM12107@torch.brasslantern.com> References: <160207111638.ZM30626@torch.brasslantern.com> <160208104528.ZM12107@torch.brasslantern.com> Date: Mon, 8 Feb 2016 20:16:58 +0100 Message-ID: Subject: Re: Unexpected foo==bar errors From: Mikael Magnusson To: Bart Schaefer Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Mon, Feb 8, 2016 at 7:45 PM, Bart Schaefer wrote: > On Feb 8, 4:52am, Mikael Magnusson wrote: > } > 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. Well, considering that something simple as foo*.tar (expanding only to one file) also leaves $tf empty, I'd say it's better to leave $tf empty for any weird command substitutions as well, but suppress the error messages. -- Mikael Magnusson