zeux / qgrep Goto Github PK
View Code? Open in Web Editor NEWFast regular expression grep for source code with incremental index updates
License: MIT License
Fast regular expression grep for source code with incremental index updates
License: MIT License
perhaps something obvious for others..., but really would be nice to have an example of multi-line search. not sure whether is feature request or docs improvement request.
otherwise all works great on Win10 20H2 with Windows Terminal and PS 7.2
update
what i understand from https://zeux.io/2019/04/20/qgrep-internals/ is that qgrep works on a line-by-line basis, but then the article states that ...
The search is done on a line by line basis, however instead of feeding each line to the regular expression engine at a time, the regular expression is ran on the entire file at a time
which means that there should be an option to apply an s or sm modifier to the regexp (re2 supports these, although I tried to feed (?sm) to qgrep and error is produced).
... so the issue is rather a feature request.
Dear Arseny,
Could you be so kind to generate .exe
for the rest of us who are merely users w/o compiler?
Looks like there are 2 additional commands which are missing from printHelp: watch, change.
It fails to iterate through sub-directories. The problem is in fileutil_posix.cpp:44. You are depending on the d_type field returned by readdir() to determine what is a directory. If you you check the readdir man page you'll see that this field is optional and not supported by all systems; it turns out that XFS on Linux doesn't provide this information.
Summary:
I am using qgrep (build be me from sources on github) on Linux CentOS, and in the search results I see back-slashes instead of slashes in file paths (those files where the matches occur)
Test steps:
root@DevMachine:/opt/devenv/projects# qgrep search tos Vl "xsl.cgi"
\opt\devenv\project\build.shinobi(465): "xsl.cgi":{"files":"cgi/xsl/.cc",
\opt\devenv\project\build.shinobi.old(453): "xsl.cgi":{"files":"cgi/xsl/.cc",
\opt\devenv\project\deploy_new_sdk.sh(9): pkill xsl.cgi
\opt\devenv\project\deploy_old_sdk.sh(25):pkill xsl.cgi
\opt\devenv\project\stinst.spec(167):cp ${STPUB}/${OPT}/xsl.cgi ${RPM_BUILD_ROOT}/var/www/cgi-bin
\opt\devenv\project\stinst.spec(2503):/var/www/cgi-bin/xsl.cgi
Expected result:
Files in the search result should contain paths separated by "/", and not "", since I am on Linux, not Windows, so it makes it impossible for me to open that file in Vim for instance, without first replacing all "" with "/".
So, the output should be like:
/opt/devenv/project/build.shinobi(465): "xsl.cgi":{"files":"cgi/xsl/*.cc"
qgrep should find out on which platform it runs, and display the paths according to this.
For a large filesystem the first update takes a lot of time and puts the whole server to 100% cpu for hours. Is there a way to optimize this, for e.g:
I get
Assertion failed: context->pendingSize == 0 && context->pendingFiles.empty(), file C:\Users\brianc\projects\tools\external\qgrep\src\build.cpp, line 678
when I run qgrep update
I've been using this for about a month, no problems until now. Anything obvious I can look for, or check? Thanks,
Hi I have an issue on Linux, trying to create db files in an alternative directory
(system drive is 250gb nvme, so ~/.qgrep is no good for large datasets).
I specify the init and update commands with explicit pathways instead of a project name, as suggested in README.md.
Files are indexed/created, it seems to run without issue.
When trying to run a search (again using explicit pathway to .cfg file), I get error "Unable to read file.cfg".
I have created test directories on mounted internal drives, set permissions to 777 for pathway and all files to rule out permissions.
Are you able to replicate this?
Many thanks, this tool is great!
It's cut my search time in half.
Just wondering why it reaches out to the following IP addresses as show in the virus total summary?
192.229.211.108:80 (TCP)
20.99.133.109:443 (TCP)
I was using the watch
command and used git
to update the watched folder contents by switching the branch.
qgrep
crashed around that time, tell me what kind of details I can provide even though it will probably be hard to reproduce.
C:\project>qgrep watch main
Watching C:\Users\Admin/.qgrep/main.cfg:
Watching folder C:/project...
Listening for changes
Updating C:\Users\Admin/.qgrep/main.cfg:
Assertion failed: file.startLine < startLine, file D:\a\qgrep\qgrep\src\build.cpp, line 583
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.