Jump to content

How to do Partial / Mixed Keyword Inputs?


Recommended Posts

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 by jerzygangi
Link to comment

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

Link to comment

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.

Link to comment

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...