KDAB/knut

Add a find in files API to Project

Closed this issue · 3 comments

Would be nice to have a way to find something in multiple files.
The API should return a list of document + position of the find items.

  • Add unit-tests

We may want to use something like silver searcher - we don't want to open all files inside Knut, would be a waste of memory.

Use ripgrep (better than the silver searcher) for that... so this API will be available only if ripgrep is found (rg), and if not will display an error message.

@narnaud Shouldn't we fallback to something else like grep -r if rg isn't found, instead of just not working?
Or maybe we misunderstood and the idea wasn't to make it available to QML scripts?

Yes, we could use something else. The main idea is to not do the search ourselves, but use something that can do it easily and parse the result, so we can use it easily from the UI and the script.