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

Fuzzy Finding Apps by Name #59

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

Conversation

metagrapher
Copy link

@metagrapher metagrapher commented Feb 5, 2020

_app_for_name() used to use an equality operator to check for a match, meaning that you had to know the full and exact name of the app you wished to invoke.
This function now does a find operation on the app.name string, allowing for a partial match of the app name.

_app_for_name() used to use an equality operator to check for a match, meaning that you had to know the full and exact name of the app you wished to invoke.
This function now does a find operation on the app.name string, allowing for a partial match of the name. This has the limitation, of course, of only returning the first match.
@metagrapher
Copy link
Author

It's worth noting that this change should be immediately merge-able without affecting existing implementations, as this does not change the function signature nor the return value. Most notably that it will not change the matched app for an exact match.

@metagrapher metagrapher changed the title Made _app_for_name() into fuzzy finding Fuzzy Finding Apps by Name Feb 15, 2020
@jcarbaugh
Copy link
Owner

@metagrapher thanks for the contribution! If we're going to go with fuzzy matching, I'm trying to think through other scenarios here. Would we want to potentially ignore case as well with something like app.name.lower().find(name.lower())? What if we kept the get item access as it was but add a method that does fuzzy matching and returns multiple results? Just want to consider different scenarios before committing to something.

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