Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add matcher property to actions and pass search to handler function #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simonc
Copy link

@simonc simonc commented Apr 29, 2024

This pull request adds a matcher property to actions that allows for dynamic matching of actions. The matcher property can be a function that receives the search string and returns a boolean indicating whether the action should be executed.

When the matcher function is defined, the search will only use it and not match on the title or keywords of the action.

It also passes the search string to the handler function, so that the handler can use it to perform actions.

Both additions allow actions based on the search string, like jumping to resources (user, project, …) pages. Coupled with semantic object IDs this can open the gate to a lot of possibilities.

@simonc simonc changed the title This pull request adds a matcher property to actions that allows for dynamic matching of actions. The matcher property can be a function that receives the search string and returns a boolean indicating whether the action should be executed. Add matcher property to actions and pass search to handler function Apr 29, 2024
@aMaze613
Copy link

aMaze613 commented May 2, 2024

I think this would be a great addition! Unfortunately, this repo seems a bit abandoned, so I would suggest creating the PR on this fork https://github.com/KonnorRogers/konnors-ninja-keys created by @KonnorRogers, which seems to be pretty active.

@simonc
Copy link
Author

simonc commented May 2, 2024

Hi @aMaze613. Thanks for letting me know! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants