From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9768 invoked by alias); 12 Mar 2018 08:07:34 -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: List-Unsubscribe: X-Seq: 42451 Received: (qmail 2830 invoked by uid 1010); 12 Mar 2018 08:07:34 -0000 X-Qmail-Scanner-Diagnostics: from mail-wr0-f196.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.128.196):SA:0(-1.9/5.0):. Processed in 1.100734 secs); 12 Mar 2018 08:07:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: stephane.chazelas@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=exI4ZjeLOB2qwH3omcdSLTXIXE/BMY/j9nHyXR2m0Ik=; b=N8Q+4Z6Zal40tqEfRpB6kK/7OxeK9rorh0HJvIx+93tQGzFkzJ9aWD9GGZTxC2Z6hQ bpZnyoeajZC2ELYXmyT2hPjKSQoBw7jAYVLj7eBSIaVIW9RM6GFrv0aY9kodsgQorpTG piVoje1pIZkOaEIw2UxtsTNRXYZVxdo+pZW+EqvGzOZJp+Yahv7+8vp0Laavsb1F1qQx wXdWy4YPPvClQWXptoURepnPV9oH2lYvFQlrY6pTDeL070E14YcJuA+DwttJGg8Jvajd d1FAZTQrQXcWh7xdVHMBSjm22nyJigzDAEWAJJfjdmgMwv4fICUoFz39n/RQEOO6++E8 iJ8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=exI4ZjeLOB2qwH3omcdSLTXIXE/BMY/j9nHyXR2m0Ik=; b=UwBTGMcPdlnLnwqyElLwMW3Y62X8G/tZyt+Sy9sSpIKJSU0umvQZUkQ8YdfhQnXVhK e7+1zyhHlOOPWxpxX2z7Ww9t8fn8UTH0UOlTuG3QTTEQZ9k/HdRY8AYco7dSPEanAGF9 axqzomsDpcVC8lH6a+MsU08QdRhMJ+Rv8WqYYKDPoPq6AnO9TKcp8VNjyQm8RImsVC8c vjUeOwwBt5fdEj53+nFIUb9zvWqeZZ4Scdr5UdK5uCuooUYTzibuHmT9NYXX22J49Jti OJieXTMlDC9expFOWbrvszcENRpTPs0D7U9LR4Twnyhi3uldSaDd1LzHF5Juao6haMX7 nrPw== X-Gm-Message-State: AElRT7FFd/2nFXAGF/o60lQY6M2zGlHQXGmlQN+sH/bKgc5TnT04iW7Q tbUpqgs4MWYxsVHpeozbdZt9BA== X-Google-Smtp-Source: AG47ELux7A+H/CFn69WGvsFkTepZJ0FjaTSiCSn75RsjRMT1N+nIOcATZb0zb+lVrbag3ctwdBKf6Q== X-Received: by 10.223.198.199 with SMTP id c7mr5198772wrh.125.1520842049226; Mon, 12 Mar 2018 01:07:29 -0700 (PDT) Date: Mon, 12 Mar 2018 08:07:27 +0000 From: Stephane Chazelas To: Martijn Dekker , zsh-workers@zsh.org Subject: Re: [doc] "sh_word_split nothing to do with word splitting"? Message-ID: <20180312080727.GB6416@chaz.gmail.com> Mail-Followup-To: Martijn Dekker , zsh-workers@zsh.org References: <20180311094458.GA6450@chaz.gmail.com> <180311112407.ZM2303@torch.brasslantern.com> <20180311205348.GC6450@chaz.gmail.com> <20180312074329.GA6416@chaz.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180312074329.GA6416@chaz.gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) 2018-03-12 07:43:29 +0000, Stephane Chazelas: [...] > Not doing so would keep fixing scripts where authors omitted to > quote arithmetic expansions in contexts where $IFS contained > dashes (or digits) on the ground that no shell author in their > right mind would ever want to subject arithmetic expansion to > split+glob (note that no shell does split+glob upon tilde > expansion nor process substitution nor $'...' expansions (though > bash used to do globbing upon tilde expansion) where that > wouldn't make sense *either*). [...] Also note that zsh arithmetic expansions may output globs (though the extendedglob + emulate sh + [#base] is an unlikely combination): /dev/fd$ ARGV0=sh zsh -o extendedglob -c 'a=$(([#8]8)); echo $a' 10 (8#10 expanded to 10 as # is an extendedglob operator and there's a "10" file in /dev/fd). POSIX also requires the result of arithmetic expansions to be subject to globbing though of course it doesn't really apply in POSIX scripts except maybe in things like [0$((-3))] So if zsh was made POSIX compliance in that regard, echo $(([#8]8)) would expand to 10 in that context above. -- Stephane