* ls c:/aax/*(.om[1]) stops working CygWin
@ 2007-10-06 13:28 zzapper
2007-10-06 18:37 ` Matthew Wozniski
0 siblings, 1 reply; 7+ messages in thread
From: zzapper @ 2007-10-06 13:28 UTC (permalink / raw)
To: zsh-users
Hi
at some time the following has stopped working
$ ls c:/aax/*(.om[1])
zsh: no matches found: c:/aax/*(.om[1])
this is OK /c/ is a mount to c:/
$ ls /c/aax/*(.om[1])
/c/aax/xt
zsh 4.3.4 (i686-pc-cygwin)
I cant remember changing anything recently
--
zzapper
http://www.rayninfo.co.uk/vimtips.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ls c:/aax/*(.om[1]) stops working CygWin
2007-10-06 13:28 ls c:/aax/*(.om[1]) stops working CygWin zzapper
@ 2007-10-06 18:37 ` Matthew Wozniski
2007-10-08 9:08 ` zzapper
0 siblings, 1 reply; 7+ messages in thread
From: Matthew Wozniski @ 2007-10-06 18:37 UTC (permalink / raw)
To: zsh-users
On Sat, Oct 06, 2007 at 01:28:40PM +0000, zzapper wrote:
> $ ls c:/aax/*(.om[1])
> zsh: no matches found: c:/aax/*(.om[1])
That's not supported by cygwin. Sometimes it will work for simple
things, but there's no guarantee that it will ever work. Using
mountpoints is guaranteed to work.
To quote Brian Dessent on the cygwin mailing list:
> Also, knock this off:
>
> > cd c:/cygwin/usr/src/grep-2.5.1a-4/
>
> Stop using Win32 paths. They work only by coincidence, not by design.
> "cd /usr/src/grep-2.5.1a-4" is what you should use.
~Matt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ls c:/aax/*(.om[1]) stops working CygWin
2007-10-06 18:37 ` Matthew Wozniski
@ 2007-10-08 9:08 ` zzapper
2007-10-08 9:20 ` Peter Stephenson
0 siblings, 1 reply; 7+ messages in thread
From: zzapper @ 2007-10-08 9:08 UTC (permalink / raw)
To: zsh-users
Matthew Wozniski <godlygeek@gmail.com> wrote in news:20071006183720.GA18943
@mastermind:
> On Sat, Oct 06, 2007 at 01:28:40PM +0000, zzapper wrote:
>> $ ls c:/aax/*(.om[1])
>> zsh: no matches found: c:/aax/*(.om[1])
>
> That's not supported by cygwin. Sometimes it will work for simple
> things, but there's no guarantee that it will ever work. Using
> mountpoints is guaranteed to work.
>
> To quote Brian Dessent on the cygwin mailing list:
>
>>
>> Stop using Win32 paths. They work only by coincidence, not by design.
Trouble is I need the c:/ style path as I need to pass it to a windows App.
I guess I'll have to do a variable substitute to transform the
/c/path/newest.file back to c:/path/newest.file
--
zzapper
http://www.rayninfo.co.uk/vimtips.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ls c:/aax/*(.om[1]) stops working CygWin
2007-10-08 9:08 ` zzapper
@ 2007-10-08 9:20 ` Peter Stephenson
2007-10-08 10:19 ` zzapper
0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2007-10-08 9:20 UTC (permalink / raw)
To: zsh-users
zzapper wrote:
> Trouble is I need the c:/ style path as I need to pass it to a windows App.
> I guess I'll have to do a variable substitute to transform the
> /c/path/newest.file back to c:/path/newest.file
I've been known to do this as a glob modifier:
cyg() {
reply=("$(cygpath -w $REPLY)")
}
% print /c/path/newest.file(+cyg)
c:/path/newest.file
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ls c:/aax/*(.om[1]) stops working CygWin
2007-10-08 9:20 ` Peter Stephenson
@ 2007-10-08 10:19 ` zzapper
2007-10-08 11:00 ` Peter Stephenson
0 siblings, 1 reply; 7+ messages in thread
From: zzapper @ 2007-10-08 10:19 UTC (permalink / raw)
To: zsh-users
Peter Stephenson <pws@csr.com> wrote in
news:200710080920.l989KhKP027086@news01.csr.com:
> zzapper wrote:
>> Trouble is I need the c:/ style path as I need to pass it to a windows
>> App. I guess I'll have to do a variable substitute to transform the
>> /c/path/newest.file back to c:/path/newest.file
>
> I've been known to do this as a glob modifier:
>
> 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
--
zzapper
http://www.rayninfo.co.uk/vimtips.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ls c:/aax/*(.om[1]) stops working CygWin
2007-10-08 10:19 ` zzapper
@ 2007-10-08 11:00 ` Peter Stephenson
2007-10-08 12:05 ` zzapper
0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2007-10-08 11:00 UTC (permalink / raw)
To: zsh-users
zzapper wrote:
> Peter Stephenson <pws@csr.com> wrote in
> news:200710080920.l989KhKP027086@news01.csr.com:
> > 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@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ls c:/aax/*(.om[1]) stops working CygWin
2007-10-08 11:00 ` Peter Stephenson
@ 2007-10-08 12:05 ` zzapper
0 siblings, 0 replies; 7+ messages in thread
From: zzapper @ 2007-10-08 12:05 UTC (permalink / raw)
To: zsh-users; +Cc: zsh-workers
Peter Stephenson <pws@csr.com> wrote in news:200710081100.l98B0OrY010759
@news01.csr.com:
> zzapper wrote:
>> Peter Stephenson <pws@csr.com> wrote in
>> news:200710080920.l989KhKP027086@news01.csr.com:
>
gvim.exe $(echo /c/aax/*(.om[1]))(+cyg) & ###BEST###
gvim.exe /c/aax/*(.om[1]+cyg) & #### VERY SLOW###
The slow version is slow because i believe it is duplicating the path
conversion on every file in /aax/
--
zzapper
http://www.rayninfo.co.uk/vimtips.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-10-08 12:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-06 13:28 ls c:/aax/*(.om[1]) stops working CygWin zzapper
2007-10-06 18:37 ` Matthew Wozniski
2007-10-08 9:08 ` zzapper
2007-10-08 9:20 ` Peter Stephenson
2007-10-08 10:19 ` zzapper
2007-10-08 11:00 ` Peter Stephenson
2007-10-08 12:05 ` zzapper
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).