Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ls c:/aax/*(.om[1]) stops working CygWin
- X-seq: zsh-users 11963
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: ls c:/aax/*(.om[1]) stops working CygWin
- Date: Mon, 08 Oct 2007 12:00:24 +0100
- In-reply-to: <Xns99C3731EA3D7Ezzappergmailcom@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Xns99C1931E92DCDzzappergmailcom@xxxxxxxxxxx> <20071006183720.GA18943@mastermind> <Xns99C36723F5EBAzzappergmailcom@xxxxxxxxxxx> <200710080920.l989KhKP027086@xxxxxxxxxxxxxx> <Xns99C3731EA3D7Ezzappergmailcom@xxxxxxxxxxx>
zzapper wrote:
> Peter Stephenson <pws@xxxxxxx> wrote in
> news:200710080920.l989KhKP027086@xxxxxxxxxxxxxx:
> > cyg() {
> > reply=("$(cygpath -w $REPLY)")
> > }
> >
> > % print /c/path/newest.file(+cyg)
> > c:/path/newest.file
>
> Peter
> This works if I use (cygpath -m $REPLY) thanks.
>
> But I'm having trouble combining the
>
> (+cyg) and the *(.om[1])
>
> into one expression
That shouldn't be a problem. (+cyg.om[1]), (.om[1]+cyg), (e:cyg:.om[1]),
(.om[1]+cyg) should all work. It's the standard modifier syntax, so you
can use multiple sets of parentheses if you have EXTENDED_GLOB set and
you put #1 at the start of each: (#qom[1])(#q+cyg). The only problem I
can see with the code is if you try to apply more than one
transformation by that mechanism, since it keeps the last one.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author