ConEmu
ConEmu copied to clipboard
In an MSYS2 shell, PasteExplorerPath both escapes the spaces and quotes the path, making the path invalid
Versions
ConEmu build: 230724 stable x64 OS version: Windows 10 21H2 x64 Used shell version: MSYS2 ucrt shell
Problem description
When using PasteExplorerPath(1, 0) to paste a path with space in it, e.g., D:\name with space, conemu runs
$ cd "/d/name\ with\ space"
It both escapes the spaces and quotes the path, causing
bash: cd: /d/name\ with\ space: No such file or directory
Steps to reproduce
- Open a MSYS2 shell. My setup for the task is:
set CHERE_INVOKING=1 & set MSYSTEM=UCRT64 & "%ConEmuDir%\msys64\usr\bin\bash.exe" --login -i -new_console:m:"":C:"%ConEmuDir%\msys64\ucrt64.ico" - Set a macro to run
PasteExplorerPath(1, 0) - In explorer, visit a path with space in it.
- Call the macro.
Actual results
Conemu runs
$ cd "/d/name\ with\ space"
Expected results
Either
$ cd "/d/name with space"
or
$ cd /d/name\ with\ space
will do the work.