Web lists-archives.com

RE: cygpath




I suppose the glob explanation from Michael explains this behavior in sh.
Though unsupported, it seems to work (probably some side cases do not).

$ cygpath -w /usr/bin/*
C:\cygwin64\bin\[.exe
C:\cygwin64\bin\2to3
C:\cygwin64\bin\addftinfo.exe
C:\cygwin64\bin\addr2line.exe
C:\cygwin64\bin\whatis.exe
C:\cygwin64\bin\ar.exe
C:\cygwin64\bin\arch.exe
C:\cygwin64\bin\as.exe
C:\cygwin64\bin\ash.exe
C:\cygwin64\bin\gawk.exe
C:\cygwin64\bin\b2sum.exe
....



-----Original Message-----

Greetings, Gluszczak, Glenn!

> * is a legal character for ls but perhaps not cygpath?

"*" is not a legal path name character. And cygpath expects a path.

> I don't know.
> No files or directories are using * in the name. 

See above.

> Not sure about incorrect terminal settings as I never touched any.  
> It shows up in mintty and ssh equally. The characters that appear vary.

For me, it shows a single blank box character. (The required character is missing from the font I'm using in mintty.)

> Some non-existent paths do *not* produce the gibberish.

> %%%cygpath -w /aaa/bbb/*
> C:\cygwin\aaa\bbb\

Works equally for me.

$ cygpath -w /usr/non-existent/* | od -t x1
0000000 43 3a 5c 50 72 6f 67 72 61 6d 73 5c 43 79 67 77
0000020 69 6e 5f 36 34 5c 75 73 72 5c 6e 6f 6e 2d 65 78
0000040 69 73 74 65 6e 74 5c ef 80 aa 0a
0000053

$ cygpath -w /aaa/bbb/* | od -t x1
0000000 43 3a 5c 50 72 6f 67 72 61 6d 73 5c 43 79 67 77
0000020 69 6e 5f 36 34 5c 61 61 61 5c 62 62 62 5c ef 80
0000040 aa 0a
0000042

Also please don't top-post https://cygwin.com/acronyms/#TOFU and don't quote raw email addresses. https://cygwin.com/lists.html


--
With best regards,
Andrey Repin
Saturday, February 11, 2017 00:27:02

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple