Closed pcause closed 6 years ago
Hmm, that's strange, I'm not seeing this behaviour. For example, if I go to /mnt/c/Windows
and do wslpath WindowsUpdate.log
I get this:
$ wslpath WindowsUpdate.log
C:\Windows\WindowsUpdate.log
Then if I do notepad.exe $(wslpath WindowsUpdate.log)
it opens the file as expected. Is it doing this with a particular path?
Cannot replicate
Might be an issue with ZSH. See these threads: https://stackoverflow.com/questions/64079604/what-are-the-differences-in-echo-between-zsh-and-bash
Use setopt BSD_echo
if i do an echo $(wslpath foo) the name looks like:
c:\x\foo
but if from the wsl/linux environment i pass this to a windows program as an argument the windows program as follows:
somexex.exe $(wslpath foo)
the windows exe sees
c:xfoo
since the shell will trest a \x as x when parsing to pass to the executable. you need to double the backslashes to get the right path format to use with Windows apps from wsl