TIL escaping things for cmd.exe is sometimes impossible
like, if you have a file:
C:\folder with spaces (And parens)\fancy!!! chars'`@;,[]{}().txt
the only way to get that escaped as a subshell in bash is like:
cat "$(wslpath $'C:\\folder with spaces (And parens)\\fancy!!! chars\'`@;,[]{}().txt')"
and i'm trying to write something that will throw this into bash.exe -ic, but how the heck do you escape it?
backslashes won't do it, carets don't do it
looking it up, turns out you can't??
it's unfortunate that i'm relying on base64 existing in any wsl that this is used in, but i guess i'm already relying on bash as it is anyway, soooo....
always happy to come across another situation that's "not such a big deal because it's simply a contrived problem which you'll likely never encounter."
(from https://superuser.com/a/962805/149426)