xilun / cbwin

Launch Windows programs from "Bash on Ubuntu on Windows" (WSL)
Other
327 stars 25 forks source link

msys-style cmdline processing heuristics #8

Open Artoria2e5 opened 8 years ago

Artoria2e5 commented 8 years ago

Just an idea on converting the arguments in a more Linux-ish way: http://www.mingw.org/wiki/Posix_path_conversion

(Since this mangles stuff, consider allowing for a env var to disable it.)

xilun commented 8 years ago

Thanks for the idea, that would be a good thing to not invent new rules incompatibles with other tools, so I'll consider implementing it. (Any patch would also be welcome)

xilun commented 8 years ago

I'm not sure about when conversion is automatically performed by current toolsets. I've just tried launching explorer on a directory (using various ways to address it) from cygwin and git bash, and neither appears to have automatically translated anything.

xilun commented 8 years ago

Same behavior in MSYS2.

However: the fact that it doesn't work with explorer might simply be a bug, but a rather important one IMO.

Mangling do work in git bash with e.g. cmd //C echo foo=/bar

However Cygwin does not do mangling, so it is unclear if it should be done by default. Given it's based on convoluted heuristics that I'm not sure are even fixed, and has trivial bugs (explorer one) in famous implementations (Git for Windows, MSYS2), I think I will at least not activate it by default if I implement it at all.