Jump to content

Parse and show queries as you type?


Recommended Posts

Hey,

 

So say I want to set up a variety of keywords that will open different things but I need subcommands and want them to show up as I type. The basic format would be main command dot query: maincommand.{query}. I'd prefer to have no space there. So, for example: `team.calendar`. This I know how to do: I create a input trigger with the input `team.` and then a Filter with {query} is equal to for the subcommands. Great. No problem.

 

Here's the two things I want to achieve and I'm not sure how to do so. They are basically a slightly different version of the same thing, I think.

  1. Completion as I type
  2. Text matching

 

Let's use the  example that I have the following subcommands: `code` `codewarrior` `errorcodes` `coderepo` (Yes, this is an arbitrary example where things could be better named, but let's assume that I have these subcommands with the `code` word is common)

 

1. As I type `team.co` I would like Alfred to show all the subcommands in the options (maybe even showing `errorcodes` as part of those options, rather than just things that begin with `co`)

2. As I type `team.co`, the `code` subcommand comes up first if I don't complete my entry and when I hit enter, that's selected. If I type `team.codew` it'll show and, if I hit enter select, codewarrior

 

Is this possible? Thanks. :)

Link to comment
40 minutes ago, Ohaimarks said:

Is this possible?

 

Sure. You can use a List Filter or a Script Filter. The former uses a hard-coded list of options, and is ideal for a "dumb" list. A Script Filter executes your own custom script, so you can show whatever you want, and filter your commands however you want.

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