From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 81608452 for ; Mon, 31 Dec 2018 02:30:25 +0000 (UTC) Received: (qmail 15867 invoked by alias); 31 Dec 2018 02:30:13 -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: 43961 Received: (qmail 16717 invoked by uid 1010); 31 Dec 2018 02:30:13 -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.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(37.59.109.123):SA:0(-1.9/5.0):. Processed in 4.038203 secs); 31 Dec 2018 02:30:13 -0000 X-Envelope-From: martijn@inlv.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Subject: Line continuation between $ and { [was: The big kre zsh bug report] To: Bart Schaefer , Zsh hackers list References: <18f684a8-2fec-4ebe-a63e-cf6688ae519f@inlv.org> From: Martijn Dekker Message-ID: <6ce0f860-e389-c7f7-81d9-a00e611b03c8@inlv.org> Date: Mon, 31 Dec 2018 03:08:29 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Op 21-12-18 om 08:53 schreef Bart Schaefer: > On Thu, Dec 20, 2018 at 2:48 PM Martijn Dekker wrote: >> Robert Elz wrote: >>> [...] my guess is >>> that the ${ with a \newline between the $ and { is not working as it should. >> Confirmed. A bit more experimenting shows that it breaks between '$' and >> '{' and nowhere else. Very unlikely for line continuation to be used >> there in real-life scripts, but still a bug. > Not going to argue with that one. I suspect it's because the parser > is treating "{" as beginning a brace expansion (e.g., {a,b,c}) at that > point and so encodes it differently. Sure enough, when turning on brace expansion: $ zsh --emulate sh -o braceexpand -c 'foo=bar; echo $\ {foo}' bar it works correctly all of a sudden. - M.