MSYS2-built Linux applications internally rewrite Linux paths to Windows paths.
This can be problematic if those are supposed to interface with other, proper-Linux applications (e.g. in my case, MSYS2 rsync connecting to a Debian 12 rsync server).
It can be configured but neither are the means particularly elegant nor are they particularly dependable, it would seem.
There is however a very appealing shorthand: Use an absolute path prefixed with a second /.
e.g. /home/me/something will become C:\msys64\home\me\something but //home/me/something will remain unchanged (and the rsync server treats it as single / at least on Debian 10 and 12).
I am using MSYS2 to make a single Windows machine work mostly-seamlessly in an environment otherwise dominated by Debian 12 machines, wanting to use the same tools/scripts there, if possible, so I wonder:
Can I presume a path beginning with // equals a path starting with / on all or most Linux distributions / for all or most common CLI tools?
As per the Unix standard, interpretation of the first slash in // is implementation-defined. But what do the implementations define?
(This question deals with the native Linux side, but if you just happen to know whether this is a stable solution on the MSYS2 side, I would be grateful for mentioning it.)
ls -l //results in the machine trying to read and list the entire available network..." So you might observe unexpected interpretation of paths starting with a double slash in some environments. As far as I know, Git Bash is based on MSys2.ls -l //emitsls: reading directory '//': No such file or directoryas expected. (/would be silently replaced byC:/msys64/and verbatim it really does not exist.) Maybe this behaviour recently changed. I hope to eventually receive a response to the respective question in my msys-packages issue...rhash --path-separator='/'= "RHash: path-separator is neither '/' nor '\': C:/msys64/" ----- linux CLI:rhash --path-separator='//'= "RHash: path-separator is neither '/' nor '\': //" . consensus: // is not always portable.