Comments (1)
Hi @CharlemagneLasse, I'd love someone to improve this but for now I've done my best with this situation. Traditional grep
output is not unambiguously parseable: it uses characters as separators that may appear in file names. In my defense,
-
See the ~500 lines of unit tests here: https://github.com/dandavison/delta/blob/main/src/handlers/grep.rs#L653-L1177. If you can improve the parsing while keeping all those tests passing (and hopefully adding a test for what you're fixing) that would be fantastic.
-
This is documented in the manual: https://dandavison.github.io/delta/grep.html
If you don't need special features of git grep, then for best results pipe rg --json output to delta: this avoids parsing ambiguities that are inevitable with the output of git grep and grep.
Personally, I have gone all-in on ripgrep, using rg --json | delta
in all my rip grep aliases / shell commands / fzf utilities etc. But I do understand that git grep
can do things that rg
cannot.
If you don't mind I'm going to close this, since I'm not personally planning more development on it (but would welcome contributions) and it's a dup of #1083 and #1259. But as always please don't interpret a closed issue as discouragement to keep discussing.
from delta.
Related Issues (20)
- π Always using light theme on dark background HOT 9
- π 0.17.0 seems much slower then 0.16.5 HOT 13
- π --navigate n/N jumps to next/prev hunk, not file? HOT 1
- RUSTSEC-2024-0320: yaml-rust is unmaintained.
- π Incorrect syntax-highlight with comment tag "#"
- π [Docs] Show the default config values
- π Extra newline before diffs
- π Empty diff for proc files
- [Feature Request] Show percentage of how far the entire diff has been read
- `git grep -l` replaces first `-` with a `:`
- Not working in Ubuntu 22.04 as intendedπ
- π inserted/deleted blank lines are sometimes hard to see
- Specify light and dark themes simultaneously, and auto-switch based on system appearance HOT 1
- π ripgrep JSON output causes panic with UTF character
- π PAGER env variable will omit command line parameters
- Weird EOL characters in side-by-side diff output ( ^[[0K )
- π Mouse scroll not working in jetbrains ide's terminal
- π output using html <ins> and <del> tags
- π Printing special terminal control characters "^[]11;rgb:0000/0000/0000^G" HOT 2
- π Memory allocation error for non root user
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delta.