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 15617
- From: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Using the same completion function for various commands
- Date: Mon, 6 Dec 2010 15:11:24 +0000
- In-reply-to: <AANLkTin+NCoBRzx90fo+s0z7urCCoTA6T3cXTYdt_VD2@xxxxxxxxxxxxxx>
- 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
- Organization: Cambridge Silicon Radio
- References: <201012061512.21791.mrichter@xxxxxxxxxxxxxxxxxxxxxxxx> <AANLkTimY=rEETn1uOdkDJ33kGE=YUDAvevsBvvvMU7YL@xxxxxxxxxxxxxx> <AANLkTim1Ac1-VOkRQ1NXn_qL6-EV06bagVkK7y_UThwB@xxxxxxxxxxxxxx> <AANLkTin+NCoBRzx90fo+s0z7urCCoTA6T3cXTYdt_VD2@xxxxxxxxxxxxxx>
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.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
Messages sorted by:
Reverse Date,
Date,
Thread,
Author