Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Controlling the order of -/g produced files and directories
- X-seq: zsh-users 1750
- From: Hannu Koivisto <azure@xxxxxx>
- To: "Zsh User's List" <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Controlling the order of -/g produced files and directories
- Date: 24 Aug 1998 18:34:51 +0300
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author