Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: suggestion for new glob modifiers
- X-seq: zsh-workers 4983
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: suggestion for new glob modifiers
- Date: Mon, 25 Jan 1999 13:51:50 +0100
- In-reply-to: "Sven Wischnowsky"'s message of "Mon, 25 Jan 1999 12:06:56 NFT." <199901251106.MAA12163@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Sven Wischnowsky wrote:
>
> 1) A new glob modifier that allows to make the resulting list sorted
> not only by name. The syntax is `Oc' where `c' is a character
> saying how the list should be sorted:
>
> `n' - by name
> `L' - by size (length)
> `l' - by number of links
> `a', `m', ac' - by access, modification, or inode change time
>
> The modifiers `^' and `-' are respected, so `*(^OL^On)' gives you a
> list sorted largest file first, with files with the same size being
> sorted by name in ascending order.
>
> 2) The second change is that you can give subscripts in modifier lists
> which say which matches you want to get.
This is excellent --- I've been using completion trickery for things
like this, but this is very much more flexible.
One minor question is whether (Om) etc. should really be oldest first.
I can see that's logical --- `time order' certainly implies oldest
first --- but unfortunately it's the other way round from ls -t, which
is the order I've grown to expect. I can easily get used to using ^,
though.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author