jerzygangi Posted July 19, 2014 Posted July 19, 2014 (edited) I am a long-time Alfred user, and today I created my first workflow, but I need help. My workflow runs a terminal command from Alfred -- very, very simple. To do this I created a new Workflow, added a keyword input object, and linked it to a terminal command object. For the keyword, I typed "create ruby on rails project" since that's what it does. Here's my problem. Alfred only finds it if I type, "create ruby on rails project", or the beginning of that string. If I type, "create rails project" Alfred won't find it. Or if I type "rails project" Alfred won't find it. This sucks because I can't remember exactly what phrase to type, and so I can't find it. How do I make it so, if I type just parts of the keyword, Alfred will still find my workflow? Also, there is a chance I'm doing this entirely wrong in Alfred, and there's a better way. So please let me know if that's the case. Thank you!! Edited July 19, 2014 by jerzygangi
smarg19 Posted July 19, 2014 Posted July 19, 2014 This is simplistic, but you can simply create multiple keywords that all lead to the same Action. Obviously, this isn't optimal, but I've used it in workflows to have "long" and "short" keywords for the same action.
jerzygangi Posted July 19, 2014 Author Posted July 19, 2014 Thanks for the idea smarg19, but won't work. I would have to create a dozen permutations for each workflow... Anyone else? There must be a way to do this. I just want my workflow to work the way all of the other Alfred commands work.
Andrew Posted July 20, 2014 Posted July 20, 2014 Alfred works on the basic premise that you have a keyword and an argument, e.g. the open keyword before a file search, or the google keyword before a search string. The only side case to this is the default file and app search where the keyword can essentially be empty, but the argument and matching is still the filename (search phrase). In your case, your best bet is to have a script filter with keyword 'create', then you have full control over any subsequent matches after this keyword, then make your script action create anything you like... e.g. create php project create rails project create new folder ~/Desktop/bob There are quite a few examples of workflows using script filters, take a look at the built in "Script Filter XML Format" example to see how to return results and suggestions into Alfred. Cheers, Andrew
deanishe Posted July 20, 2014 Posted July 20, 2014 Here's my problem. Alfred only finds it if I type, "create ruby on rails project", or the beginning of that string. If I type, "create rails project" Alfred won't find it. Or if I type "rails project" Alfred won't find it. This sucks because I can't remember exactly what phrase to type, and so I can't find it. How do I make it so, if I type just parts of the keyword, Alfred will still find my workflow? As Andrew says, that isn't how keywords work. If you can't remember your keyword, try to think of a better one. Preferably a much shorter one. In this case, I'd go with "rails" or "ror" (though I'd be much more likely to remember the former). If you still have difficulty remembering the keyword, you can prefix all your own keywords with a character like ";", e.g. ";rails". That way, when you just enter ";", you should see a list of all your own keywords and nothing else.
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