From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25113 invoked by alias); 20 Feb 2017 22:13:09 -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: 40600 Received: (qmail 14597 invoked from network); 20 Feb 2017 22:13:09 -0000 X-Qmail-Scanner-Diagnostics: from kahlil.inlv.org 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(37.59.109.123):SA:0(-0.0/5.0):. Processed in 2.116928 secs); 20 Feb 2017 22:13:09 -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=-0.0 required=5.0 tests=RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: martijn@inlv.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at inlv.org does not designate permitted sender hosts) Subject: Re: [BUG] var=$* and var=$@ create array with SHWORDSPLIT and null or unset IFS To: Zsh hackers list References: <62e5833f-14b1-b42b-31af-2f1532b565ed@inlv.org> <170216211431.ZM25042@torch.brasslantern.com> <170220105837.ZM12210@torch.brasslantern.com> <170220132058.ZM27903@torch.brasslantern.com> From: Martijn Dekker Message-ID: <9b3871e1-322a-b148-3554-907618cf05a0@inlv.org> Date: Mon, 20 Feb 2017 23:13:31 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <170220132058.ZM27903@torch.brasslantern.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Op 20-02-17 om 22:20 schreef Bart Schaefer: > Thanks to Chet Ramey for pointing me at > http://austingroupbugs.net/view.php?id=888 > > Which says (very last block of examples) that var=$@ and var="$@" and > a whole slew of their variations, have unspecified behavior. True. I should not have included that in the test case. It makes sense for var=$@ and var="$@" to be unspecified. In a pure POSIX context these does not make sense, because POSIX does not have arrays, and we've already got $* to combine the PPs into a scalar. But for zsh or bash, which do have arrays, it could actually make sense to make var=$@ and var="$@" properly equivalent to var=("$@"). It's just that no shell currently does this, at least not intentionally; zsh's current behaviour as reported was clearly not consistent. > Consequently I'm going to take the position that zsh is allowed to join > these with empty string rather than pulling a field separator out of > its proverbial hat, and I will tweak 40565 appropriately and commit. Thanks. - M.