From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21671 invoked by alias); 17 Jun 2010 11:51:06 -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: 28046 Received: (qmail 24288 invoked from network); 17 Jun 2010 11:51:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Thu, 17 Jun 2010 12:50:56 +0100 From: Peter Stephenson To: Zsh hackers list Subject: Re: PATCH: bug in ${(z)...} with newlines Message-ID: <20100617125056.21e77f3e@csr.com> In-Reply-To: References: <15865.1276088859@csr.com> <20100609165429.7e19ca2c@csr.com> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.9; i686-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 17 Jun 2010 11:50:56.0888 (UTC) FILETIME=[58E6CF80:01CB0E13] X-Scanned-By: MailControl A_09_40_00 (www.mailcontrol.com) on 10.68.0.125 On Wed, 16 Jun 2010 15:13:29 -0700 Bart Schaefer wrote: > On Wed, Jun 16, 2010 at 3:06 PM, Bart Schaefer > wrote: > > I don't find any use of (z) in _history or indeed anywhere in > > Completion/**/*(.) [scanning with egrep] that conflicts with your > > proposed change. =C2=A0I just want to make sure the ramifications have > > been considered. Thanks for checking... =20 > BTW there are uses of (z) in Functions/Zle/ that may very well be > relying on the last ten years of behavior, including in > match-word-context and match-words-by-style and even which-command. Several of those are mine, which definitely don't rely on getting something other than split arguments. I've been assuming up to now that as long as the words can be parsed (there are odd cases with unquoted parentheses and the like) there should be no gotchas, and in particular that if you've input quoted words separated by white space you should just get the words back (hence the current thread). I suspect it would be safest at the least to ensure bufferwords() behaves the same for calls from ZLE; trying to sanity check that is a whole different ballgame from looking to see whether shell code has made assumptions about undocumented behaviour. --=20 Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, = UK Member of the CSR plc group of companies. CSR plc registered in England and= Wales, registered number 4187346, registered office Churchill House, Cambr= idge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom