NCGREP, which is based on ncurses library to provide user interface, is a grep tool for searching text on target directory.
- Look for a pattern(just keyword for now) in your source code directory and display results in ncurses.
- Browse results with ease.
- Open a result with your favorite editor(just vim for now) at the right line.
- Search files which is ended in .php, .h, .c, .cpp suffixes.
ncgrep "grep" . 3.character stands for the current dirname3It 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:
KEY_UPupKEY_DOWNdownKEY_ENTERopen file in vimqquitkupjdownCTRL-uhalf page upCTRL-dhalf page downoopen file in vimCTRL-ereturn to the group interface
Firstly, you should install the dependency library:
# MAC
brew install ncurses
# CentOS
sudo yum install ncurses ncurses-devel
# Ubutun
sudo apt-get install libncurses5 libncurses5-devThen, compile & link:
# Just tested on Mac, CentOS and Ubutun
makeE-Mail to [email protected]