Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Controlling the order of -/g produced files and directories
- X-seq: zsh-users 1751
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Hannu Koivisto <azure@xxxxxx>, "Zsh User's List" <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: Controlling the order of -/g produced files and directories
- Date: Mon, 24 Aug 1998 10:14:16 -0700
- In-reply-to: <87af4ubdgk.fsf@xxxxxxxxxxxxx>
- References: <87af4ubdgk.fsf@xxxxxxxxxxxxx>
On Aug 24, 6:34pm, Hannu Koivisto wrote:
} Subject: Controlling the order of -/g produced files and directories
}
} I'd like to make such a completion for my utgz and vtgz shell
} functions that it matches to *.tgz, *.tar.gz and directories.
}
} compctl -/g '*.(tgz|tar.gz)' utgz vtgz
}
} Although I didn't find explanation for this -/g option
That's not one option, it's two:
-/
-g '*.(tgz|tar.gz)'
It happens that you can run them together as -/g because -/ doesn't
take any additional arguments. -/ means "complete filesystem paths."
} 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.
Zsh currently sorts the completion list itself, alphabetically; there
has been discussion of changing this on the developer's list, but at
the moment you can't force files to sort ahead of directories.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author