Jump to content
Ohaimarks

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

Share this post


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

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...