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

Respect subtasks in fuzzy search #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dhhyi
Copy link
Contributor

@dhhyi dhhyi commented Nov 12, 2017

I had an issue that can be replayed with the current example snippets: You have the snippets 'alias:add' and 'sshconfig:add' in shell.yml, 'user:add' in mysql.yml and 'vhost:add' in apache.yml.

If you run 's run add' it promptly runs 'user:add' as it is the nearest match. I think the ':'-separator should be respected and it should recognize all 4 snippets as equal concerning the query for just 'add' and report 'Multiple Snippets matched'.

Great project, btw. It really helps in my day-to-day work. :)

@tokozedg
Copy link
Owner

Hi,
Thanks for the feedback and collaboration, much appreciated.
Would you mind if I leave this pull request open for some for now?
I like the idea of using colon as a separator.
But I would expect it to be clearly defined in guidelines what is recommended way of naming snippets, when it's good to use colon etc.

@dhhyi
Copy link
Contributor Author

dhhyi commented Nov 18, 2017

Sure, leave it open, no problem. 👍
I'm not entirely satisfied with this solution myself. I just found a scenario where the solution is not good enough: Imagine 2 snippet names: 'project:build' and 'project:build:full'. With this patch the query for 'project:build' will be ambiguous because it is a whole part for the second snippet name. I think I'll add a special handling for this.

@dhhyi dhhyi changed the title Respect subtasks in fuzzy search WIP: Respect subtasks in fuzzy search Nov 18, 2017
@dhhyi dhhyi force-pushed the feature/respect_subtasks_in_fuzzy_search branch from 5cb9dea to 2121005 Compare November 18, 2017 17:29
@dhhyi dhhyi changed the title WIP: Respect subtasks in fuzzy search Respect subtasks in fuzzy search Nov 19, 2017
@dhhyi dhhyi force-pushed the feature/respect_subtasks_in_fuzzy_search branch from 2121005 to 1a34457 Compare November 22, 2017 06:41
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