From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12164 invoked from network); 19 Mar 2009 15:29:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) 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.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 19 Mar 2009 15:29:13 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 53365 invoked from network); 19 Mar 2009 15:29:08 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Mar 2009 15:29:08 -0000 Received: (qmail 2965 invoked by alias); 19 Mar 2009 15:29:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26755 Received: (qmail 2948 invoked from network); 19 Mar 2009 15:29:02 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 19 Mar 2009 15:29:02 -0000 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by bifrost.dotsrc.org (Postfix) with ESMTP id B387B8058ADC for ; Thu, 19 Mar 2009 16:28:55 +0100 (CET) Received: by nf-out-0910.google.com with SMTP id d3so117722nfc.11 for ; Thu, 19 Mar 2009 08:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=MaK/dKg4kCLCegTDmZt/f6xiG2SlEL/rgsq4W8Kgqng=; b=Nqm7kryDk9PMm5s7jEdBNC0BOdvwcT9wGGWzcFBQTjO+QS9OIjJkr5qpui83Bv/GIK 2tS53qj0CztQC2+RInQOIZil56EsRpa6CDm50SkeAPzFvdFKHvHTg+/m5U8HHC9ybkMw h7UfglS8Dl/D6Q0TKR7U9Onq0i/OE4xt324Cc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=bElrwAPL80JRLOsNF/uln/mbCR79LIQWHowDAQXDJYd1TUlUgZU0QAc9PCyie68DGd WqTa34SA8Qv7N36OPaFQCiIh6BqOatiqGEROyqGi/2jZgl/8F4sii7k2dwCcYOv+dmiP MGo2aiYvcjAeUHX0kga+vhhTJKVstidltaI5w= MIME-Version: 1.0 Received: by 10.210.105.8 with SMTP id d8mr1324165ebc.33.1237476535369; Thu, 19 Mar 2009 08:28:55 -0700 (PDT) In-Reply-To: <20090316181852.27e9420d@news01> References: <20090313105555.GA19025@piper.oerlikon.madduck.net> <20090315062253.GB14010@scru.org> <20090316181852.27e9420d@news01> Date: Thu, 19 Mar 2009 16:28:55 +0100 Message-ID: <237967ef0903190828k4b9f7edbyc85405b630c50d5d@mail.gmail.com> Subject: Re: Bug#519535: history expansion: modifier completion missing From: Mikael Magnusson To: zsh-workers@sunsite.dk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/9139/Thu Mar 19 15:09:58 2009 on bifrost X-Virus-Status: Clean 2009/3/16 Peter Stephenson : > On Sun, 15 Mar 2009 06:22:53 +0000 > Clint Adams wrote: >> On Fri, Mar 13, 2009 at 11:55:55AM +0100, martin f krafft wrote: >> > I tried to show off zsh to a sceptic today and had to find out the >> > hard way that it does not (yet) provide completion for history >> > expansion modifiers, e.g. >> > >> > echo !$: > > I thought this was going to be harder than it turned out to be; as you can > see it's really quite simple, particularly since I already wrote modifer > completion and it would appear had the foresight to make it handle the > history case. > > It's in _normal which is where we handle normal command arguments. I think > this is both the first and last place where get to massage command line > arguments generically---we don't just want this in default completion since > history expansion, if active, trumps everything else. [...] > So it seems to work fine (possibly depending on your options and > completers---there are other things around that will do other things to > !'s), but I'm still a bit confused. Is it supposed to work here? $PWD: (it doesn't for me). It does complete if you write $PWD(:, but also in ${PWD(:, but accepting one of the latter produces a syntax error: % echo ${PWD(:A)} zsh: bad substitution (regardless of which modifier you use) Also, i get this: $PWD(:s- _history_modifiers:34: bad math expression: operand expected at `^-' _history_modifiers:34: bad math expression: operand expected at `^-' _history_modifiers:34: bad math expression: operand expected at `^-' _history_modifiers:34: bad math expression: operand expected at `^-' _history_modifiers:34: bad math expression: operand expected at `^-' _history_modifiers:34: bad math expression: operand expected at `^-' (same with / or other separator (but it says `^/' then, of course)) As an aside, after i write $PWD(: to get the s, how do i "accept" the completion to make tab complete the - instead of cycling to the next completer? The only way i found is typing something and deleting it... When completing directories i usually just type a /. -- Mikael Magnusson