Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#519535: history expansion: modifier completion missing
- X-seq: zsh-workers 26755
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#519535: history expansion: modifier completion missing
- Date: Thu, 19 Mar 2009 16:28:55 +0100
- 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=
- In-reply-to: <20090316181852.27e9420d@news01>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20090313105555.GA19025@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20090315062253.GB14010@xxxxxxxx> <20090316181852.27e9420d@news01>
2009/3/16 Peter Stephenson <pws@xxxxxxx>:
> On Sun, 15 Mar 2009 06:22:53 +0000
> Clint Adams <schizo@xxxxxxxxxx> 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 !$:<TAB>
>
> 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:<tab> (it doesn't for me). It does
complete if you write $PWD(:<tab>, but also in ${PWD(:<tab>, 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-<tab>
_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(:<tab> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author