Dragging from Finder gives incorrect path with certain combinations of special characters

In Core Shell, dragging a file or folder from Finder to the prompt will paste the POSIX path at the current cursor position. This is very useful because it allows me to e.g. cd into a folder without manually navigating to the respective path first. Most of the time, this works fine for me. I did however encounter problems when paths contain a specific combination of special characters.

The case where I spotted the error was with the following folder name:

2019 — redis-server [tethys]

You can see that the name contains an em dash followed by some standard characters and then a pair of square brackets. When I drag this folder to a Core Shell window, this is how the resulting path looks at the prompt:

The em dash is replaced with something that looks like Mojibake, the rest of the path gets messed up with some seemingly arbitrary character escaping. For the record, this is not just a visual problem since it renders the path invalid, meaning when I hit enter, I get a "No such file or directory" error from the shell.

The path is printed correctly when either the em dash or the square brackets are absent in the folder name, so it must be the combination of both characters that triggers this behavior. Also, dragging the same folder to the built-in Terminal app in macOS works just fine.

I suspect this to be a bug but haven't tested it on a clean Core Shell install, so it may be something wrong with my configuration. Also, I didn't try other combinations of special characters.

Any help with this would be greatly appreciated.

Thank you so much for elaborating this issue, I can reproduce it by follow your steps, will fix it in next update.

Kindly Regards,

Yang

1 Like

3.6.2 beta is available on TestFlight for testing, please give it a try when you get a chance.

Kindly Regards,

Yang

Wow, that was really fast, @Yang.Y – the 3.6.2 beta build fixes the problem for me. Thank you very much for this, I love how responsive this community is. Looking forward to the official release!