From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13160 invoked by alias); 10 Feb 2012 11:16:27 -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: 30196 Received: (qmail 8792 invoked from network); 10 Feb 2012 11:16:16 -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=-0.4 required=5.0 tests=BAYES_00,FAKE_REPLY_C autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.stack.nl designates 131.155.140.107 as permitted sender) Date: Fri, 10 Feb 2012 12:08:01 +0100 From: Jilles Tjoelker To: Zsh Hackers' List , Peter Stephenson Subject: Re: Bug with bash emulation regarding ':' Message-ID: <20120210110801.GB6723@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) > [zsh performs word splitting on ${...:=$(...)}] It seems strange to perform word splitting on word in ${var=word} because a single word is required to assign to var. Indeed, zsh pastes the resulting words back together to a single word to assign. Historically, there have been two ways to perform word splitting here: either by expanding the construct as ${var-word} or by expanding $var after assignment. POSIX requires the latter. This implies that quoting characters inside word does not prevent word splitting and pathname generation. (Quoting the entire expansion does.) In either case, if assignment takes place, the assigned value is the expanded value of word with quote removal performed on it. (POSIX lacked the detail of quote removal, formally requiring the assigned value to retain the quoting characters; an interpretation has been issued.) -- Jilles Tjoelker