njzhangyifei/msys2-mingw-shortcut-menus

cd directory failed when its name has "&" character

Closed this issue · 4 comments

This script is no problem with blank space such as "Program Files", but if the directory's name has & character, such as "x&y", this script will failed.
"/usr/bin/bash: 第 0 行: cd: C:\Users\Nero\Desktop\x: No such file or directory
"
environment: windows 10 x64, msys2 x86_64

Thank you for your bug report.

I've fixed this with commit af50a23. Please try it now and see if it works.

Thanks, it works with "x&y", but it failed with disk root directory. Such as "C:" or "D:"
when I open the disk D, and right click the "MSYS2 Bash Here", it failed with "/usr/bin/bash: eval:行0: 寻找匹配的 `"' 是遇到了未预期的文件结束符
/usr/bin/bash: eval:行1: 语法错误: 未预期的文件结尾"

google translate:
/ usr / bin / bash: eval: Line 0 : Find the matching ` ' ' is encountered unexpected end of file
/ usr / bin / bash: eval: Line 1: Syntax error: Unexpected end of file

Fixed with commit f5c9547. I've tested on root directory, directory with name x&y and '. It should be working now.

Btw: I haven't got time to test whether this script can be installed into directory with names containing special characters.

Great! It works!
I think your script is very useful~