Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Sorting files by their extension
- X-seq: zsh-users 10606
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Sorting files by their extension
- Date: Mon, 14 Aug 2006 20:02:32 -0700
- In-reply-to: <20060814214005.GF4770@princo>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060814214005.GF4770@princo>
On Aug 14, 5:40pm, Jean-Rene David wrote:
} Subject: Sorting files by their extension
}
} Has anyone got a ready-made way to do this?
It's pretty much impossible to do as a glob qualifier, because sorting is
the very last thing to happen, after all the other qualifiers are done.
You can play games if you don't need the actual file name, or by first
assigning to an array variable and then manipulating the array, but with
only filename generation you're out of luck.
x=( *(e%'reply=( $REPLY:e/$REPLY )'%) )
print -l $x:t
Aside to PWS: It appears that as a side-effect of the *(+func) syntax,
it is no longer possible to use "+" as the delimiter in *(e+'stmt'+).
This should at least be documented.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author