Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Using the same completion function for various commands
- X-seq: zsh-users 15618
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Using the same completion function for various commands
- Date: Mon, 6 Dec 2010 16:18:47 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=BFXQxzNqXKjqWdjokFpwmsAZRyxxx4yecMOqHHTQdzw=; b=T3jALnj11zQb7/4QLcAhzzGEnt65tMOoaYAf/Lqk3egzLpZVLm4evA/cg5rNBRDr1V UI7/hKt0Z+530QONOdfDB83q6GYRAUC/WirIQ7YD4j0iC+WhFOEM7zmBlFEDRDtC2UST xJLB4xba4qp0zIX/qvbppWjWqjhZA2pqn78UQ=
- 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=Inm8IvdcXE2CkWNQYjKE9zdwC9QreS4ow0DX1eimkIJ3GHuj+UmcHsjYb2TVJwzZd4 wnBia6kwQpvWiIFfDSkP7EAKLbvNobG5xnxbMthK7H6kK4k2A0mol3+3j/dL+UHds+w7 T//xoKLAT0KdANxPThlWsGzO8wuoffCwXfkQI=
- In-reply-to: <20101206151124.389fd287@xxxxxxxxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <201012061512.21791.mrichter@xxxxxxxxxxxxxxxxxxxxxxxx> <AANLkTimY=rEETn1uOdkDJ33kGE=YUDAvevsBvvvMU7YL@xxxxxxxxxxxxxx> <AANLkTim1Ac1-VOkRQ1NXn_qL6-EV06bagVkK7y_UThwB@xxxxxxxxxxxxxx> <AANLkTin+NCoBRzx90fo+s0z7urCCoTA6T3cXTYdt_VD2@xxxxxxxxxxxxxx> <20101206151124.389fd287@xxxxxxxxxxxxxxxxxxxxxxxxx>
On 6 December 2010 16:11, Peter Stephenson <Peter.Stephenson@xxxxxxx> wrote:
> On Mon, 6 Dec 2010 16:03:51 +0100
> Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
>> 2010/12/6 JÃrÃmie Roquet <arkanosis@xxxxxxxxx>:
>> > Hi,
>> >
>> > 2010/12/6 Mikael Magnusson <mikachu@xxxxxxxxx>:
>> >> You can also do this in your .zshrc instead of in the completer if
>> >> you wish, just write
>> >> compdef _foo -p 'foo_*'
>> >>
>> >> At least that's what the documentation says, it doesn't seem to
>> >> work that well.
>> >
>> > It works fine for me with 4.3.10, did I miss something?
>>
>> When i tried compdef _du -p foo_\*, i only got single-letter options
>> completed.
>>
>
> That means it's working perfectly. ÂIt's hitting this line at the top of
> _du
>
> Â_pick_variant gnu=Free\ Soft unix --version /dummy/no-such-file
>
> and deciding, quite reasonably in my opinion, that foo_\* is not a GNU
> variant of du. ÂSo it's going to the other branch, where the options are
> simpler.
Ah, er, right. But. Is there any way to combine -p and saying foo=du ?
When I tried compdef _du -p 'foo_*=du' nothing happened.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author