From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3732 invoked by alias); 27 Nov 2014 05:57:39 -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: 33806 Received: (qmail 13695 invoked from network); 27 Nov 2014 05:57:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,FROM_12LTRDOM, RCVD_IN_DNSWL_NONE,T_MANY_HDRS_LCASE autolearn=no version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=F/vgrRlI c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=5y4faFyK3SkA:10 a=MinfpBCo_9nrAV3480AA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141126215725.ZM13054@torch.brasslantern.com> Date: Wed, 26 Nov 2014 21:57:25 -0800 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Inconsistency of GLOB_ASSIGN MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Consider: torch% print C* Config torch% print c* config.h config.log config.modules config.modules.sh config.status torch% setopt GLOB_ASSIGN torch% integer x torch% x=C* torch% typeset -p x typeset -i x=0 torch% x=c* torch% typeset -p x typeset -a x x=(config.h config.log config.modules config.modules.sh config.status) torch% Shouldn't the glob assignment to x have turned it into an array, or at least into a non-integer scalar, even though there was only one match? Yes, I know the reason is that "Config" got expanded first and then taken as a variable name in arithmetic evaluation, therefore defaulting to the value 0 which was assigned to x. Still, the following seems wrong to me: torch% integer x torch% typeset -p x typeset -i x=0 torch% x=*.h zsh: bad floating point constant