Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ls c:/aax/*(.om[1]) stops working CygWin



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