From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2102 invoked from network); 9 Apr 2008 11:53:15 -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.6 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 Apr 2008 11:53:15 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 2503 invoked from network); 9 Apr 2008 11:53:08 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Apr 2008 11:53:08 -0000 Received: (qmail 25837 invoked by alias); 9 Apr 2008 11:53:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24805 Received: (qmail 25812 invoked from network); 9 Apr 2008 11:53:05 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 9 Apr 2008 11:53:05 -0000 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by bifrost.dotsrc.org (Postfix) with ESMTP id 2D05E802A5F0 for ; Wed, 9 Apr 2008 13:53:01 +0200 (CEST) Received: by py-out-1112.google.com with SMTP id h31so2653727pyc.23 for ; Wed, 09 Apr 2008 04:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=vimzP1HtO1rMwuB4qwxgApA3LSncM6nxpihe+AbG6x0=; b=RvG6O9JME0qfM0zbb92soKbykfSuahHaRZN1FdBIiBpXfByzknrdIamf4D5CUh8dSfHeX2OgwnvD4P57Gqk6yhLbi5gBHcbaFfb8+4IBgx7x+QcoTWqXsPavjtxKDCYsWb7blPkTkkKSk55+1g1c2seMwo4mwInSRuedLNxAA4s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=d8CGXHUiOJlcdJyU5NLRaWfXAcsSAvk8Mlw2am8HRvH7YqlHs6WrT4RXkLB2DvyB0d4IcGibPm/GdVJDPjfVzUxnaN9axKq52qUsAJEfjWeXvRScHN6v6NSW8ePH5UjQNFd1zkCGDnMttJzDw3Bu3iunFx/59V7gCyMqigYs5yg= Received: by 10.141.23.7 with SMTP id a7mr16297rvj.58.1207741980853; Wed, 09 Apr 2008 04:53:00 -0700 (PDT) Received: by 10.141.202.18 with HTTP; Wed, 9 Apr 2008 04:53:00 -0700 (PDT) Message-ID: <237967ef0804090453i19952670ic40093e119bcd983@mail.gmail.com> Date: Wed, 9 Apr 2008 13:53:00 +0200 From: "Mikael Magnusson" To: zsh-workers Subject: Re: _subscript quotes too much In-Reply-To: <20080409122053.3ddfdc42@news01> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <237967ef0804081708h72b87699n6235099044238a13@mail.gmail.com> <237967ef0804081711t6b4a9d88qa8b5367ba1ba8fb0@mail.gmail.com> <200804090849.m398n4W2012023@news01.csr.com> <20080409120025.5c4fd6f4@news01> <20080409122053.3ddfdc42@news01> X-Virus-Scanned: ClamAV 0.91.2/6682/Wed Apr 9 13:17:55 2008 on bifrost X-Virus-Status: Clean On 09/04/2008, Peter Stephenson wrote: > On Wed, 9 Apr 2008 12:00:25 +0100 > > Peter Stephenson wrote: > > > As far as _subscript is concerned, it would have to be taught the rules for > > which characters can be backslashed, this applied with ${...//.../...}, and > > then the -Q flag passed to compadd. This shouldn't be too hard. > It wasn't. Thanks for the explanations and the fix. I read the section in zshparam you referred to, not sure if i'm more or less confused now but I think I found two typos. "This is because parameter expansions may be surrounded balanced braces, and subscript flags are introduced by balanced parenthesis." should probably be 'surrounded by' and 'balanced parentheses'. > + keys=(${${(kP)compstate[parameter]}//(#m)[\$\\\[\]\(\)\[\{\}]/\\$MATCH}) wow :). > If you can find cases that still don't complete successfully > it can be tweaked further. Well, typeset -A hi hi=(\" hello) echo $hi[ should ideally produce "$hi[\"]" but I don't even know if that's possible or worth it. :) Or even hi=(\* hello) echo $hi[ would produce $hi[(e)*], but I guess at some point I just have to read the manual and learn some of the subtler rules instead of depending on the completion system as these are explained quite clearly there. -- Mikael Magnusson