Jump to content
deanishe

Incorrect example in File Search > Advanced UI?

Recommended Posts

I think I've found a typo in Alfred Preferences > Features > File Search > Advanced

 

DiMfbIL.png

 

I believe the proper escaped path should be 'Users/preppeller/Desktop/Andrew\'s Folder!/', i.e. the apostrophe isn't escaped and/or there's an erroneous double quote in text.

Share this post


Link to post
Share on other sites

@deanishe if you create a folder called Andrew's Folder! on your desktop and copy it from Alfred, you'll see it's copied literally as shown (which can then be used e.g. for a cd in bash).

 

What's happening is the entire path is wrapped in single quotes, then the single quote before the backslash is the end of the string literal, then it's adding a single quote with \', then it's adding the end of the path as a string literal in single quotes.

 

There are alternative ways this could be escaped, i.e.

 

'/Users/preppeller/Desktop/Andrew'\''s Folder!'

/Users/preppeller/Desktop/Andrew\'s\ Folder\!/

 

... but many years ago, when this was first done, there was a reason I went with wrapping the entire path in single quotes. I think it may have been to do with UTF8 characters, but don't quote me on that.

 

Cheers,

Andrew

 

Share this post


Link to post
Share on other sites

×
×
  • Create New...