@hackage vgrep0.2.3.0
A pager for grep
Categories
License
BSD-3-Clause
Maintainer
franz.thoma@tngtech.com
Links
Versions
Installation
Dependencies (22)
- aeson >=0.11 && <1.6 || >=0.9 && <0.10 || >=2 && <2.1
- async >=2.0.2
- attoparsec >=0.12.1.6
- base >=4.11 && <5
- containers >=0.5.6.2
- directory >=1.2.2 Show all…
Dependents (0)
vgrep -- A pager for grep

Usage
-
As a pager:
grep -rn data /some/path | vgrep # -n for line numbers -
As a drop-in replacement for
grep:vgrep data /some/path # recursive by default vgrep data /some/path | vgrep default # works with pipes, too -
With a
gitalias defined in your~/.gitconfig:git config --global alias.vgrep '!__git_vgrep () { git grep --color=always "$@" | vgrep; }; __git_vgrep' git vgrep data -
Using
ack/aginstead ofgrep? No problem:ack data | vgrep # Output of `ack` is compatible ack --color data | vgrep # Even coloring works ag --color data | vgrep # Same for `ag`
Keybindings:
- Use
hjklor the arrow keys to navigate Enteropens a pager with the selected fileeopens the selected file in$EDITORTabswitches between results list and pagerqcloses the pager and then the entire application.
Installation
Via nix from nixpkgs
nix-env -iA nixpkgs.haskellPackages.vgrep
From Hackage
Installation from Hackage via stack is recommended:
stack update
stack install vgrep
This will install vgrep to your ~/.local/bin directory.
From source
git clone https://github.com/fmthoma/vgrep.git
cd vgrep
stack setup
stack install