Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion of certain files suggested last
- X-seq: zsh-users 6550
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Jesper Holmberg <jesper.holmberg.5791@xxxxxxxxxxxxx>
- Subject: Re: Completion of certain files suggested last
- Date: Tue, 09 Sep 2003 09:51:17 +0200
- Cc: Zsh-users List <zsh-users@xxxxxxxxxx>
- In-reply-to: <20030908194641.GT6280@xxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20030908194641.GT6280@xxxxxxxxxxxxxxxxxxxxxxxx>
Jesper Holmberg wrote:
> I use menu-complete. I also have the following specified:
>
> zstyle ':completion:*:*:(^rm):*:*' ignored-patterns '*?.o' '*?~' '(|*/)CVS' '*?.class'
>
> so that object files, CVS directories etc are never tab completed. Now,
> I've realized that I sometimes still want to do something more than
> removing these kinds of files, and I've been bitten a couple of times by
> the fact that these files seem not to be there, as far as the completion
> system is concerned. So my question is this: is it possible to specify
> that these files be completed, but only after all other possibilities have
> been tried? I.e. if my directory contains the files:
>
> aa.o bb.class cc.txt
>
> pressing <tab> once gives me cc.txt, twice gives me aa.o etc?
There is an _ignored completer which completes ignored matches if no
others match. It's not entirely useful when the pattern is something
like *?.o though because a .c file tends to match. And it doesn't quite
do what you want. What you seem to be concerned with is the order in
which matches come up in menu-completion. I don't really use menu
completion myself so I've never thought about it. There is a file-sort
style but it probably isn't flexible enough. You might be able to use
file-patterns to put the .o etc files in a separate group which comes
later.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author