Jump to content

Incorrect example in File Search > Advanced UI?


Recommended Posts

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




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.

Link to comment
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.





Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...