Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _subscript quotes too much
- X-seq: zsh-workers 24805
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: _subscript quotes too much
- Date: Wed, 9 Apr 2008 13:53:00 +0200
- 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=
- In-reply-to: <20080409122053.3ddfdc42@news01>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <237967ef0804081708h72b87699n6235099044238a13@xxxxxxxxxxxxxx> <237967ef0804081711t6b4a9d88qa8b5367ba1ba8fb0@xxxxxxxxxxxxxx> <200804090849.m398n4W2012023@xxxxxxxxxxxxxx> <20080409120025.5c4fd6f4@news01> <20080409122053.3ddfdc42@news01>
On 09/04/2008, Peter Stephenson <pws@xxxxxxx> wrote:
> On Wed, 9 Apr 2008 12:00:25 +0100
>
> Peter Stephenson <pws@xxxxxxx> 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[<tab>
should ideally produce "$hi[\"]" but I don't even know if that's
possible or worth it. :) Or even
hi=(\* hello)
echo $hi[<tab>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author