tartarus-git / grep Goto Github PK
View Code? Open in Web Editor NEWWanted the grep tool for windows so I thought I would implement it from scratch. Works on linux and windows.
Wanted the grep tool for windows so I thought I would implement it from scratch. Works on linux and windows.
Pressing Ctrl + C will send SIGINT to program in linux, which gets triggered fine, but the program doesn't exit until you press enter to send the current line to the program. Fix this.
Make it so that you can define an amount of context (in lines) to display before and after every matched line. You could say for example -a 5 and have 5 lines before and 5 lines after every match with TODO show up for context.
If stdout is disconnected because a piped program exits or something, this program has an unhandled exception. Handle it.
add flag that you can set, which will output all lines, not just the target ones, but still only highlight the hits, so you can have context when reading where you got the hits.
You've added the -a flag and the --context flag and still have no documentation in the help text, definitely add that.
We forgot that regex lib can have errors as well. Log those to the console so you can debug your regex when using grep.
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.