firesofmay Posted July 19, 2019 Share Posted July 19, 2019 Hi, I'd like to do the following in snippets: {random:You are amazing, thank you, Thank you} i..e "You are amazing, thank you" OR "Thank you" one of the two should be pasted. But how do I escape the comma? Link to comment Share on other sites More sharing options...
vitor Posted July 19, 2019 Share Posted July 19, 2019 I’ve made a few tests and was unsuccessful, and the documentation doesn’t mention it. Looks as if it can’t be done as of now — moving to the feature requests forum. deanishe 1 Link to comment Share on other sites More sharing options...
deanishe Posted July 19, 2019 Share Posted July 19, 2019 36 minutes ago, vitor said: I’ve made a few tests and was unsuccessful Same as that. When using such a common character as the comma as a delimiter, it really needs to be possible to escape it with a backslash or a double comma. Link to comment Share on other sites More sharing options...
SummerChill Posted November 8, 2020 Share Posted November 8, 2020 On 7/20/2019 at 1:59 AM, deanishe said: Same as that I use snippet to help me remember many linux commands, such as setting ps -ef | grep {clipboard}, if the value of the clipboard contains points, for example, I run a shell called b.sh, "ps -ef | grep b.sh" will also filter out /bin/bash and other information. The correct one should be "b\ .sh". I hope sinppet can provide escape transform utility . Link to comment Share on other sites More sharing options...
deanishe Posted November 8, 2020 Share Posted November 8, 2020 (edited) 7 hours ago, SummerChill said: The correct one should be "b\ .sh". I wouldn’t hold out much hope for this one. Escaping is for writing coding, and I don’t think code-formatting features really belong in Alfred’s macro expansion. A lot of fields support macro expansion, so you’re kinda asking for every text field to be changed because the text might end up as an argument in a shell. I think a more appropriate approach would be to write a workflow that formats the text on the clipboard according to whatever rules. Perhaps add a Script/List Filter to the workflow so you can choose different escaping schemes (bash, grep etc.). Perhaps add a Hotkey (say ⌥⌘C) that pastes the clipboard contents escaped for a shell. Edited November 8, 2020 by deanishe Link to comment Share on other sites More sharing options...
SummerChill Posted November 9, 2020 Share Posted November 9, 2020 22 hours ago, deanishe said: Perhaps add a Script/List Filter to the workflow so you can choose different escaping schemes (bash, grep etc.). @deanishe Thanks for your reply, I will use this method to handle characters that need to be escaped. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now