Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Sorting files by their extension
- X-seq: zsh-users 10609
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Sorting files by their extension
- Date: Tue, 15 Aug 2006 10:36:41 +0100
- In-reply-to: <060814200232.ZM8032@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060814214005.GF4770@princo> <060814200232.ZM8032@xxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer wrote:
> 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.
Are you sure? It's parsed left to right and it's supposed to look for
the delimiters for the "e" before even thinking about the next
qualifier---given that pretty much anything can occur in the middle
that's about the only way it could work. I can do this:
% echo g*
glob.c glob.epro glob.o glob.pro glob.syms
% echo g*(e:'reply=(${REPLY[2,-1]}${REPLY[1]}ay)':)
lob.cgay lob.eprogay lob.ogay lob.progay lob.symsgay
% echo g*(e+'reply=(${REPLY[2,-1]}${REPLY[1]}ay)'+)
lob.cgay lob.eprogay lob.ogay lob.progay lob.symsgay
% trangefysay() { reply=(${REPLY[2,-1]}${REPLY[1]}ay) }
% echo g*(e+'trangefysay'+)
lob.cgay lob.eprogay lob.ogay lob.progay lob.symsgay
% echo g*(+trangefysay)
lob.cgay lob.eprogay lob.ogay lob.progay lob.symsgay
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
Messages sorted by:
Reverse Date,
Date,
Thread,
Author