zsh-users
 help / color / mirror / code / Atom feed
* Controlling the order of -/g produced files and directories
@ 1998-08-24 15:34 Hannu Koivisto
  1998-08-24 17:14 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Hannu Koivisto @ 1998-08-24 15:34 UTC (permalink / raw)
  To: Zsh User's List

Greetings,

I'd like to make such a completion for my utgz and vtgz shell
functions that it matches to *.tgz, *.tar.gz and directories.

My first attempt was as follows:

compctl -g '*.(tgz|tar.gz)' + -g '*(/)' utgz vtgz

This has the problem that the latter pattern is not considered
if the first matches. From completion examples I found "-/g"
option and decided to try it. That is,
compctl -/g '*.(tgz|tar.gz)' utgz vtgz

Although I didn't find explanation for this -/g option in the
documentation, this version seems to work. However, I would
prefer that if some directory has both matching files and
subdirectories then those files would be first in the list of
completions and those directories last. How should this be done?

TIA,
//Hannu


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

end of thread, other threads:[~1998-08-25 10:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-24 15:34 Controlling the order of -/g produced files and directories Hannu Koivisto
1998-08-24 17:14 ` Bart Schaefer
1998-08-25 10:24   ` Hannu Koivisto

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).