zsh-users
 help / color / mirror / code / Atom feed
* Completion of certain files suggested last
@ 2003-09-08 19:46 Jesper Holmberg
  2003-09-09  7:51 ` Oliver Kiddle
  0 siblings, 1 reply; 2+ messages in thread
From: Jesper Holmberg @ 2003-09-08 19:46 UTC (permalink / raw)
  To: Zsh-users List

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?

TIA,

Jesper


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Completion of certain files suggested last
  2003-09-08 19:46 Completion of certain files suggested last Jesper Holmberg
@ 2003-09-09  7:51 ` Oliver Kiddle
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Kiddle @ 2003-09-09  7:51 UTC (permalink / raw)
  To: Jesper Holmberg; +Cc: Zsh-users List

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-09  7:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-08 19:46 Completion of certain files suggested last Jesper Holmberg
2003-09-09  7:51 ` Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).