Skip to content

Conversation

@0xleodevv
Copy link

Hopefully fixes #160

I think the easiest way to solves this issue is to simply consider spaces between words as the user specifying a filepath.

So now "helper mod" matches to helper/mod etc.. (each search term is still typo resistant etc).

Also added whitespace trimming to begging of search query so " mod" will search for "mod".

Let me know if you think this is the right approach (i tried to go with the simplest / minimal change route)

@dmtrKovalenko
Copy link
Owner

Thank you but I am not sure that what people actually need is the matching of "helper mod" to match on helper/mod but instead they want matcher to match all the results of helper and then run the search of mod within a previous search

@0xleodevv
Copy link
Author

Thank you for the feedback!

Funnily enough I initially implemented it this way but found that I was inadvertently searching for files within a path hence this approach.

Maybe I'm slightly confused but do you mind giving me an example where the current approach matches on a query when it shouldn't ?

(I guess im asking if you think this approach would match too much or too little)

(I was basing the implementation based of this issue #160)

Thanks again for the review!

@dmtrKovalenko
Copy link
Owner

I am pretty sure that for the path like

'rust/helper/mod.rs' people are expecting to put query like "helper mod rust" and get a match which is reasonable and likely useful. While your implementation requires to put rust helper mod which is weird because if you know the path you can always match it using slashes

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.

Space is treated as part of the search query

2 participants