From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11511 invoked from network); 9 Feb 2008 19:15:33 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Feb 2008 19:15:33 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 71137 invoked from network); 9 Feb 2008 19:15:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Feb 2008 19:15:27 -0000 Received: (qmail 25290 invoked by alias); 9 Feb 2008 19:15:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24544 Received: (qmail 25274 invoked from network); 9 Feb 2008 19:15:23 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 9 Feb 2008 19:15:23 -0000 Received: from mtaout01-winn.ispmail.ntl.com (mtaout01-winn.ispmail.ntl.com [81.103.221.47]) by bifrost.dotsrc.org (Postfix) with ESMTP id A2E3A80482A1 for ; Sat, 9 Feb 2008 20:15:19 +0100 (CET) Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080209191658.VTMD18243.mtaout01-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Sat, 9 Feb 2008 19:16:58 +0000 Received: from pws-pc.ntlworld.com ([81.107.42.63]) by aamtaout04-winn.ispmail.ntl.com with ESMTP id <20080209191521.XAIH29112.aamtaout04-winn.ispmail.ntl.com@pws-pc.ntlworld.com> for ; Sat, 9 Feb 2008 19:15:21 +0000 Received: from pws-pc (pws-pc [127.0.0.1]) by pws-pc.ntlworld.com (8.14.2/8.14.2) with ESMTP id m19JDpe9012898 for ; Sat, 9 Feb 2008 19:13:51 GMT Message-Id: <200802091913.m19JDpe9012898@pws-pc.ntlworld.com> From: Peter Stephenson To: zsh-workers Subject: Re: Completion lockup In-Reply-To: Message from "Mikael Magnusson" of "Sat, 09 Feb 2008 19:04:04 +0100." <237967ef0802091004r5ad42cecof46abb401b0f98cb@mail.gmail.com> Date: Sat, 09 Feb 2008 19:13:51 +0000 X-Cloudmark-Analysis: v=1.0 c=1 a=Rw7lO6RaNG4A:15 a=3FTp5y5X6ml6ZCsPBftHHg==:17 a=NLZqzBF-AAAA:8 a=K7w5FhX0C3dYhbvc5u8A:9 a=CfuHnt8UhpULCXHlILQA:7 a=e22eGSaFVjYa6HLHT0QLXVfyC2kA:4 a=_dQi-Dcv4p4A:10 a=aFdSZ05Rf_QA:10 X-Virus-Scanned: ClamAV 0.91.2/5761/Sat Feb 9 19:02:33 2008 on bifrost X-Virus-Status: Clean "Mikael Magnusson" wrote: > The only funny thing I've noticed in the past 5 minutes > is that if i type a'''' i get the file as a\'foobar, but if i > leave out the a and > just tab the four quotes, i get it in the command line as 'a''foobar' which > seems weird, but maybe the _correct (i think?) completer does things > differently. This is not something that bothers me in the least, just thought > i should mention it. The code that handles quotes in completion is gruesome (and includes, in case you hadn't guessed, the most horrible function ever written, too---that's the one that deals with nested quotes when something inside quotes is to be treated as a command line in its own right). One of its tricks is that it makes some kind of guess early on how to quote the line. If there's a ' at the start it will use ' quoting and if there isn't it will use backslash quoting. It doesn't make much attempt to keep the form of quotes it started off with. Typically this is a pretty reasonable guess. You'd see this if the test file was called \'foobar and you typed '''f. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/