NCGREP, which is based on ncurses library to provide user interface, is a grep tool for searching text on target directory.
ncgrep "grep" . 3
.
character stands for the current dirname3
It represents the level of search directory grouping, the three level directory as a group for text search
After entering the interactive interface, the commands are illustrated as followed:
q
quitj
downk
upo
open file in vimKEY_ENTER
open file in vimCTRL-e
return to the group interface
Firstly, you should install the dependency library:
# MAC
brew install ncurses
# CentOS
yum install ncurses
Then, compile & link:
g++ -c files.cpp -o files.o
g++ -c grep.cpp -o grep.o
g++ -c tui.cpp -o tui.o
g++ -c data.cpp -o data.o
g++ -g main.cpp -o ncgrep files.o grep.o tui.o data.o -lncurses
TO BE CONTINUED...