From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29121 invoked by alias); 25 Jul 2015 18:54:30 -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: 35906 Received: (qmail 11002 invoked from network); 25 Jul 2015 18:54:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 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=sadzMe3b6KvQsEWpneLcRIYhnSuOzh8BfY5B/4Io+lU=; b=Wda6nrPvdrUkHrUFQjFzu6BImdGQnTeYqAaS85bFYrm1IIok8TbsfHc3VBKful2CVV mwHXk/vQj9X3jl4JwcEqdudUG2vA2h9FWvztjy/eLrvyzpC/G2vhcHes2uF9105jMkfy cLQKFOsmli5iUney0J3L9sFZ+JGJ32FpGkyKckdjKSwYhlfX/GK/wnOTU9f6T0isUsob r8zUh7QeENc1DwgWrKdHTV2wEQ5NpRJuHbv2GpGfTo+ew3A2156oJhOS0BRwrj8hkdAS L/nOdpArc7MY9d+gbiKWz3e2fWoTUy9rYUStLg78sZUP18sXsX5Oeeu/UwGVoEZxcpH6 LEPQ== X-Gm-Message-State: ALoCoQmOD8qMe/yTzKqq3nSDJygKmuopRtqKNr+h+NYb7VPxGyNZXRbMEUMUvPBhmlTBM9l7FFqq X-Received: by 10.182.186.2 with SMTP id fg2mr21471801obc.35.1437850463177; Sat, 25 Jul 2015 11:54:23 -0700 (PDT) From: Bart Schaefer Message-Id: <150725115419.ZM2876@torch.brasslantern.com> Date: Sat, 25 Jul 2015 11:54:19 -0700 In-Reply-To: <20150725170340.GY2433@sym.noone.org> Comments: In reply to Axel Beckert "Fwd: [Pkg-zsh-devel] Bug#793168: zsh: expand-substitution-on-TAB broke for $(()) in 5.0.8 [origin: adi@hexapodia.org]" (Jul 25, 7:03pm) References: <20150725170340.GY2433@sym.noone.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Fwd: [Pkg-zsh-devel] Bug#793168: zsh: expand-substitution-on-TAB broke for $(()) in 5.0.8 [origin: adi@hexapodia.org] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 25, 7:03pm, Axel Beckert wrote: } } I can also reproduce this issue with zsh 5.0.8 in Debian and can } confirm, that it didn't happen with zsh 5.0.7 in Debian. } } ----- Forwarded message from Andy Isaacson ----- } } with zsh 5.0.7 and earlier versions, if I type $((5*8)) and then hit TAB, } the expression is replaced with its evaluation ("40" in this case). This appears to be a difference in behavior of the expand-or-complete built-in widget. With _expand added to the completer zstyle or with the expand-word widget, the behavior is unchanged. There's no change to the widget itself. The issue seems to be that the completion system is examining $((5*8) [without the trailing paren] insead of the full expression. You can see this in action if you "setopt completealiases"; using "_" to represent the position of the cursor: torch% setopt completealiases torch% echo $((5*8))_ [... list of parameter names appears ...] torch% echo $((5*8)_) This must in turn be due to the change in the parser to disambiguate "$((" as either math or command substitution; completion is trying it as command substitution without looking ahead to see if it can be done as math instead.