Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5090405
  • 博文数量: 553
  • 博客积分: 13864
  • 博客等级: 上将
  • 技术积分: 11041
  • 用 户 组: 普通用户
  • 注册时间: 2011-11-28 21:25
个人简介

个人Blog: hhktony.com

文章分类

全部博文(553)

文章存档

2015年(1)

2014年(2)

2013年(12)

2012年(384)

2011年(154)

分类: LINUX

2012-07-28 10:08:22

Why should I love happygrep?
  • It's dead simple to use.
  • You don't have to leave the terminal.
  • It looks and works like .
Installation (Ubuntu)

Firstly, install the ncurses libs.

$ sudo apt-get install libncursesw5 libncursesw5-dev

Secondly, get the code, and install.

$ git clone
$ cd happygrep/ $ make 
$ sudo make install
Usage

The small application has limited usages, just two forms, so in order to improve it, there are many work needed to do. By default, it will skip the .git directory when you search a git repository, and it does support regular expression, since the search task is done by grep command. In addition, happygrep can specify one directory to ignore. The directory name can use regex.

For instance, we want to search the string hello world in a git repository called techdoc/, we can do like this:

$ happygrep "hello world"

Also, you can ignore a directory named image/:

$ happygrep "hello world" image

After running the commands above respectively, then you will get a nice window based text user interface.

  • use j,k to move up and down in the result window
  • type e to open with vim
  • close vim to return to the original window to continue
  • type q character to quit


阅读(1974) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~