From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13860 invoked by alias); 24 Jun 2015 13:20:54 -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: 35590 Received: (qmail 2175 invoked from network); 24 Jun 2015 13:20:52 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f4-f79c56d0000012ee-85-558aaeafb286 Date: Wed, 24 Jun 2015 14:20:44 +0100 From: Peter Stephenson To: Zsh Hackers' List Subject: Re: Typeset with array Message-id: <20150624142044.3e2a2e6d@pwslap01u.europe.root.pri> In-reply-to: References: <5578996E.3080700@thequod.de> <150610191427.ZM30841@torch.brasslantern.com> <5579C247.1060800@thequod.de> <150611183639.ZM32247@torch.brasslantern.com> <20150612094237.338f79d5@pwslap01u.europe.root.pri> <20150619123930.2688d9e3@pwslap01u.europe.root.pri> <20150621210512.113577a6@ntlworld.com> <20150621213842.621886e0@ntlworld.com> <20150623174719.43eaa1e2@pwslap01u.europe.root.pri> <150623132522.ZM6177@torch.brasslantern.com> <20150624101404.71c21adc@pwslap01u.europe.root.pri> <20150624102942.6c3f1e06@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsVy+t/xq7rr13WFGmzuErE42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGW9bOxkLvnBUNE46wtLA2MzexcjJISFgItG7aQ8zhC0mceHe erYuRi4OIYGljBKd6/YwQTgzmCTW3JrBDuFsY5S48fg+UAsHB4uAqsSknzEg3WwChhJTN81m BAmLCGhLtH8UAwkLC8hL7D65H2wBr4C9xJNX31hAbE6BYInTXy8wgthCAr9ZJHb/1QGx+QX0 Ja7+/cQEcZC9xMwrZxghegUlfky+B9bLLKAlsXlbEyuELS+xec1bZog56hI37u5mn8AoNAtJ yywkLbOQtCxgZF7FKJpamlxQnJSea6hXnJhbXJqXrpecn7uJERKyX3YwLj5mdYhRgINRiYeX 4XNnqBBrYllxZe4hRgkOZiUR3sr+rlAh3pTEyqrUovz4otKc1OJDjNIcLErivHN3vQ8REkhP LEnNTk0tSC2CyTJxcEo1ME7t61ZZHLH/VvnyxqcbjiS9OPekyCPsMdPfxt9XyzZ95jfL23Hv zjLxqQvddTc/2Ot2bm2vulPTvCUW5/tLHstLBYjbXJLdHtWht8TRz3PynaevT6w/OeGa9uVX 4a6tq01uLnYtWcok1Mu9O6C4coZnREnwrnb2ZxIbC8oeLjxjUGHw2PIi+wYlluKMREMt5qLi RAC0JyruVQIAAA== On Wed, 24 Jun 2015 15:00:22 +0200 Mikael Magnusson wrote: > % foo() { typeset -g foo=bar }; which foo > foo () { > typeset -gfoo=bar > } > > Notice the lack of space after -g. I've just remembered what I meant to test. pws diff --git a/Src/text.c b/Src/text.c index a72ab33..3287c54 100644 --- a/Src/text.c +++ b/Src/text.c @@ -189,6 +189,8 @@ taddassign(wordcode code, Estate state, int typeset) static void taddassignlist(Estate state, wordcode count) { + if (count) + taddchr(' '); while (count--) { wordcode code = *state->pc++; taddassign(code, state, 1); diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst index 4afb189..e6285bc 100644 --- a/Test/B02typeset.ztst +++ b/Test/B02typeset.ztst @@ -651,3 +651,15 @@ >odd >number >here + + fn() { typeset foo bar thing=this stuff=(that other) more=woevva; } + which -x2 fn + fn2() { typeset assignfirst=(why not); } + which -x2 fn2 +0:text output from typeset +>fn () { +> typeset foo bar thing=this stuff=(that other) more=woevva +>} +>fn2 () { +> typeset assignfirst=(why not) +>}