Jump to content

How can I "expand" a keyword into a Script Filter?


Recommended Posts

I'm looking to have a keyword that is essentially an alias for a script filter with arguments pre-filled.

 

Specifically, I'm using a bear workflow that allows you to search for a query filtered by tags:

TagFilter.png

 

I'm trying to add a keyword that expands to "bs #meetings {query}", but keeps the find-as-you-type functionality of the existing script filter. The closest I've gotten is using a "Show Alfred" action with the value `bs #meetings {query}`, but it requires you to press ENTER before the expansion happens and you get the find-as-you-type script filter functionality. Is there any way to have it work like this:

 

1. I type "meet[space]"

2. Results that match the `bs #meetings` filter are shown

3. Typing additional characters filters by `bs #meetings {query}`

 

I've searched for this a bunch on the forums, but couldn't find the right wording to get useful results, so please point me in the right direction if this has been asked before!

Link to comment
On 12/16/2021 at 8:42 PM, a41456 said:

I'm trying to add a keyword that expands to "bs #meetings {query}", but keeps the find-as-you-type functionality of the existing script filter.

 

Like Vítor says, "expanding" is the territory of snippets. Just be sure to remove Alfred from the excluded apps list (Alfred doesn't expand snippets in Alfred by default).

 

Your other option is to create a duplicate Script Filter and edit it so that the script receives your extra text in addition to your input, e.g. you change the script from some-script "$1" (which receives just your input) to some-script "#media/youtube $1" (which appends your input to #media/youtube).

 

Edited by deanishe
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...