From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10545 invoked by alias); 27 Sep 2015 01:23:42 -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: 36652 Received: (qmail 26557 invoked from network); 27 Sep 2015 01:23:42 -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=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Gd9 YmkNZTNAjNkAB1wkqYsOc/kE=; b=h+NzPEB7eJK3eGGWl86Au8R0Wtk+tHnpYL8 6E5MTXmNKlj1GhfOVzubEMpUg82X+5MgiDGr6KxpYvHfiMkHXf57+3CeX5jnTw+u e61W1lxt6Jfhnvt3rlJopEzhhQ7PgV6Hrf+4dbRccF5CWIaE+MWvHDss7PWWyMu+ FvLAZYtg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Gd 9YmkNZTNAjNkAB1wkqYsOc/kE=; b=gXczIsQ4cFJ7cB23LRd80FIjfSms4efZem qitX7IIAc3HROx9LidEXAUxHnbNJtxCCraT0rMo1aZ+zCKdwjYMu7O8bC+nfP3PZ 9SWgU022YZzOFP0U8gkSM1jZ5nPMAZ8n/gfKNQWFaYWt3B4q9AkiAgZUCe+W1ab5 c8MUrobP4= X-Sasl-enc: sOT0q0u9AqLGcDLGaA4V2v5Mp3x2hWtZ3o/z1yVyROg/ 1443317020 Date: Sun, 27 Sep 2015 01:23:37 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: ${(z)} split of unmatched, doubled (( Message-ID: <20150927012337.GD1989@tarsus.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Consider: % print -rl - ${(z):-'(( e'} e % Shouldn't it output the parentheses as well? I realise it can't know yet whether it's an arithmetic evaluation or two subshells, but pretending the parentheses don't exist will never be the right parse... Other unfinished constructs don't seem to exhibit this behaviour: % print -rl - ${(z):-'( e'} ( e % print -rl - ${(z):-'( ( e'} ( ( e % print -rl - ${(z):-'echo "hello w'} echo "hello w I ran into this in zsh-syntax-highlighting when BUFFER='(( 42 ', with the closing-double-paren not having been typed yet. For that use-case, I don't care whether I get a single '((' token or two '(' tokens; either would be fine. Cheers, Daniel