Closed blemelin closed 2 years ago
Thanks for letting me know, and a fix for this would be greatly appreciated.
This definitely isn't intended behaviour and I believe the difference in handling of arguments might be in the nature of windows programs, maybe. On linux, an argument passed to a program is just that, and it can contain any character including whitespace, no additional splitting is performed as it doesn't go through a shell. On windows, a single string is passed as concatenation of all arguments, as I understood it, which then is split by the program itself. Hence one will always have to escape certain characters to avoid the splitting from happening, which isn't done yet.
I've created the requested pull request. See PR #54. Thanks a lot for your work. :smiley:
Let's say we want to open this file with Visual Studio Code :
D:\projects\work 5.txt
.Doing this ends up opening two files :
work
and5.txt
. For this to work properly, the path must be inside double quotes like this :Is this the intended behaviour ? On other platforms, this crate seems to handle spaces perfectly fine, so I created a fix for Windows in a fork of this repository. I can open a Pull Request if you are interested. A lot of programs can open multiple files at the same time, but this crate seem to be intended to open one file at a time, hence this issue.