From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25162 invoked by alias); 26 Jun 2015 19:20:47 -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: 35617 Received: (qmail 4812 invoked from network); 26 Jun 2015 19:20:45 -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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1435346045; bh=V1BzK9hXJDAH+ZBIy0sPoYTuGZXFlAUV5jeZ4Nhu1JU=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=UODdzCDCn7WY/rCy2L/H/YE/SD488Yz4WUOIVO9hulmRVWO7qw3I3uwXIJpcx1ELb3bDBaqvYwgpsGnYOPNAfBqyOyZwCx9B1vMmd9B+JxSC63d3qmS5mSf99H7Lw7o6bAKrwHbW7aAd4TDY3MPRSLfmT4nA5+8F2yElC5M76TS0wLNpfrkrLkLvjhUuM/7WMV9uLS10ASiRCvg40hKgsEbfkInyGNxEPEct2z6A8z6Cn/15NdFl0JNQQ03TvL51G780Vr3W3XfOyphIEtgsUf3NnAScoSFpN20gZIxNyKSEKiMn7KymqNmQ6pbvSd1jt+AAhLo5cMFWi7A+86PqgA== X-Yahoo-Newman-Id: 657136.68489.bm@smtp131.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: g5RIUoAVM1n16qx9wb0mysDEoLNEjLO38YiMZz7BEfg9uaz sT86lV0sJc.FviudHFIIsU27TAmQfXFR89Sn8nXDbQoQwzw3VDvi_NAvIYuk md8vUGlnCpwEwrKhg9k2ZGGfBV54QULXrVwKi_X8QY8mg_BhZgBXCTveWPhM GmuEtzzkeCTpN9xb8CsvbG1hiO6d19pju8Ceao5Dn.QfNr1YWkVEM.rVisWA 2Q4rENK0aeZVDUxkLaWSwHLLF1A7my9JqmVh8KpldNXqKWT7ubw1i36mALLs ydRE.uqyis3qQU_tPrAZzxlW6AnOwPqERpC5ULLS_VKEjUUmTbTU59a0MQ6s JW0qzxGZOEt2FBo8o9R7uNvloeqnor_Yi1wdnQPFb11EI8mpsSXVo7MJT4CO KryGqOF3_7SIUpQuLl_A82CQ2Opq8H4a5akGiT6yWZ4wZDs7t8sSjA9rKFLU yiWBTG8teKrtodQi3Mq3HdNHjZLM_MC0th2qJOrsxSPyPV2UNtvJwWBcZbq9 c_SbUrAPJ.9uInXpfmK6E8rkX8LuLbt8gFTW7xiNVSCoCY_frFg-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <20150625102923.1dc227ff@pwslap01u.europe.root.pri> From: Oliver Kiddle References: <5578996E.3080700@thequod.de> <150610191427.ZM30841@torch.brasslantern.com> <5579C247.1060800@thequod.de> <150611183639.ZM32247@torch.brasslantern.com> <20150612094237.338f79d5@pwslap01u.europe.root.pri> <20150619123930.2688d9e3@pwslap01u.europe.root.pri> <7337.1434735386@thecus.kiddle.eu> <20150625102923.1dc227ff@pwslap01u.europe.root.pri> To: Zsh Hackers' List Subject: Re: Typeset with array MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24942.1435346044.1@thecus.kiddle.eu> Date: Fri, 26 Jun 2015 21:14:04 +0200 Message-ID: <24943.1435346044@thecus.kiddle.eu> Peter wrote: > Oliver Kiddle wrote: > > Similarly: typeset -i foo=(23) > > I decided to make these errors --- the user is in a good position to do > the right thing here since it's staring them in the face and fixing > things up in typeset by guessing what the user actually meant is (you > can trust me on this :-/) very messy, so I think this is reasonable. Sounds fair enough, however, in the case of something like: % typeset -i i=(2+3)*4 zsh: no matches found: *4 it isn't exactly staring you in the face. Both bash and ksh allow math expressions starting with parentheses. They do different things in this case: typeset -i bob one=5 typeset bob=(one) echo $bob Also, note the following: typeset var1=(one two)var2=three Bash treats that as a string assignment. Zsh and ksh consider that to be two separate assignments. That's also true without the typeset. That seems reasonable. This is not new but what is going on here?: % var=x( > That's a PS2 prompt where %_ is nothing. Oliver