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

Add a find in files API to Project #21

Closed
narnaud opened this issue Jun 19, 2024 · 3 comments · Fixed by #143
Closed

Add a find in files API to Project #21

narnaud opened this issue Jun 19, 2024 · 3 comments · Fixed by #143
Assignees
Labels
⬆️ feature New feature or request 🙋 good first issue Good for newcomers

Comments

@narnaud
Copy link
Member

narnaud commented Jun 19, 2024

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.

@narnaud narnaud added the ⬆️ feature New feature or request label Jun 19, 2024
@narnaud
Copy link
Member Author

narnaud commented Jul 15, 2024

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.

@LeonMatthesKDAB LeonMatthesKDAB added the 🙋 good first issue Good for newcomers label Jul 30, 2024
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 7, 2024
Fixes KDAB#21
The API return a list of document + position of the find items.
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 7, 2024
Fixes KDAB#21
The API return a list of document + position of the find items.
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 7, 2024
Fixes KDAB#21
The API return a list of document + position of the find items.
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 7, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in the system's PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 7, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in the system's PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 7, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in the system's PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 7, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 7, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 8, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 8, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 8, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 9, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 9, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 9, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
@dfaure-kdab
Copy link
Member

@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?

@narnaud
Copy link
Member Author

narnaud commented Aug 9, 2024

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.

smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 20, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 20, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 21, 2024
The API return a list of document + position of the find items.
The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
The `pattern` parameter should be a valid regular expression.
Fixes KDAB#21
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 22, 2024
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 26, 2024
smnppKDAB added a commit to smnppKDAB/knut that referenced this issue Aug 26, 2024
dfaure-kdab pushed a commit that referenced this issue Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⬆️ feature New feature or request 🙋 good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants