From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17137 invoked by alias); 1 Jun 2015 16:32:21 -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: 35354 Received: (qmail 4754 invoked from network); 1 Jun 2015 16:32:18 -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=-0.3 required=5.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.0 Message-ID: <556C890E.80506@inlv.org> Date: Mon, 01 Jun 2015 18:32:14 +0200 From: Martijn Dekker User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: zsh-workers@zsh.org Subject: Arith expansion accepts extra closing parenthesis Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit I just found some more arithmetic parsing strangeness. zsh 5.0.8 and 4.3.11 both happily accept and ignore one (1) extra closing parenthesis in variable expansion within arithmetic expansion (even in POSIX mode). % X='1)' % echo $(($X)) 1 % echo $((X)) 1 (Expected output: error message in both cases) Yet, 'echo $((1)))' errors out as expected, as do 'echo $(($X))' and 'echo $((X))' for X='1))', X='1)))', X='(1', etc. - Martijn