Skip to content
This repository has been archived by the owner on Jul 28, 2019. It is now read-only.

Latest commit

 

History

History
47 lines (33 loc) · 798 Bytes

README.md

File metadata and controls

47 lines (33 loc) · 798 Bytes

Smart Grep

Grep wrapper that tries to pick the most efficient tool available by context.

DEPRECATED: Just use https://github.com/BurntSushi/ripgrep

Installation

basher install juanibiapina/smart-grep

Usage

smart-grep pattern

smart-grep will select the tool with the following priority:

  • git grep if current directory is a git repository
  • ag if available
  • ack if available
  • grep

Usage from Vim

Add the following to your vim configuration:

if executable('smart-grep')
  set grepprg=smart-grep
endif

Development

  • First, make sure you have bats installed:
basher install sstephenson/bats

or manually: instructions here

  • Running Tests:
make test