zsh-users
 help / color / mirror / code / Atom feed
From: Hannu Koivisto <azure@iki.fi>
To: "Zsh User's List" <zsh-users@math.gatech.edu>
Subject: Controlling the order of -/g produced files and directories
Date: 24 Aug 1998 18:34:51 +0300	[thread overview]
Message-ID: <87af4ubdgk.fsf@quasar.vvf.fi> (raw)

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


             reply	other threads:[~1998-08-24 23:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-24 15:34 Hannu Koivisto [this message]
1998-08-24 17:14 ` Bart Schaefer
1998-08-25 10:24   ` Hannu Koivisto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87af4ubdgk.fsf@quasar.vvf.fi \
    --to=azure@iki.fi \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).