Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ ncgrep Public

NCGREP, which is based on ncurses library to provide user interface, is a grep tool for searching text on target directory.

License

Notifications You must be signed in to change notification settings

ncgrep/ncgrep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ncgrep

NCGREP, which is based on ncurses library to provide user interface, is a grep tool for searching text on target directory.

Join the chat at https://gitter.im/ncgrep/Lobby

Example

ncgrep demo

Features

  • 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.

Usages

ncgrep "grep" . 3
  • . character stands for the current dirname
  • 3 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:

  • KEY_UP up
  • KEY_DOWN down
  • KEY_ENTER open file in vim
  • q quit
  • k up
  • j down
  • CTRL-u half page up
  • CTRL-d half page down
  • o open file in vim
  • CTRL-e return to the group interface

Installation

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-dev

Then, compile & link:

# Just tested on Mac, CentOS and Ubutun
make

Contact

E-Mail to [email protected]

About

NCGREP, which is based on ncurses library to provide user interface, is a grep tool for searching text on target directory.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •