I have added some functionality to the Everything plugin which allows the user to define some searches like in WebSearch plugin linked to a specific keyword. This means I can define a search like this:
pattern = *.doc|*.docx %s
description = Search for Word documents
It will now add a new catalog item with the title Everything: doc and description Search for Word documents which will if selected search for any word document with name like the user input.
Furthermore I added a flag empty_search which will allow to do an instant search after selecting the catalog item to list all documents matching the basic pattern (here *.doc|*.docx) and it will filter out items as soon as the user starts to type. I use this quite regulary to list all available projects of a specific type and to see what is available.
Thank you for your contribution! It sounds like a nice feature to have.
At first glance, code seems pretty neat and blends very well with the existent. Kudos for that. I'll review it in detail and may have some tiny modifications to do (or not) if you don't mind but right now I see no cons on integrating it without altering the main idea.
In the meantime and as discussed previously in the chat, I will credit you in the Contributions section if I happen to integrate your modifications to the official package. If you feel like you want to step back on this, do not hesitate to shout it here.
Thank you and you're welcome. I'm still totally fine with what we talked about.
I just found out a small but maybe essential part may be missing for the functionality and just added a flag for enabling regex for the searches with enable_regex flag. So e.g. a pattern like ^.*%s.*\\\.git$$ would list all git repositories available with regex enabled.
I've integrated your patch and it will be available in the next release.
For the record, I was about to just leave it almost untouched (minor corrections) when I realized it was not blending perfectly due to the default Search and Regex Search items. So I added some default_search that are conceptually equivalent to predefined_site in the WebSearch package to blend in the Search and Regex Search originally available as hard-coded searches.
I took the liberty of doing some renaming as well.