The vgrep package

[ Tags: bsd3, library, program, web ] [ Propose Tags ]

vgrep is a pager for navigating through grep output.

Usage:

grep -rn foo | vgrep
vgrep foo /some/path
vgrep foo /some/path | vgrep bar

Use hjkl or arrow keys to navigate, Enter to view file, q to quit.


[Skip to Readme]

Properties

Versions 0.1.3.0, 0.1.4.0, 0.1.4.1, 0.2.0.0
Change log CHANGELOG.md
Dependencies aeson (==0.9.* || >=0.11 && <1.0), async (>=2.0.2), attoparsec (>=0.12.1.6), base (>=4.7 && <5), cabal-file-th (>=0.2.3), containers (>=0.5.6.2), directory (>=1.2.2), fingertree (>=0.1.1), generic-deriving (>=1.5.0), lens (>=4.13), lifted-base (>=0.2.3.6), mmorph (>=1.0.4), mtl (>=2.2.1), pipes (>=4.1.6), pipes-concurrency (>=2.0.3), process (>=1.2.3), stm (>=2.4.4), template-haskell (>=2.10), text (>=1.2.1.3), transformers, unix (>=2.7.1), vgrep, vty (>=5.4.0), yaml (>=0.8.12) [details]
License BSD3
Copyright 2016 Franz Thoma
Author Franz Thoma
Maintainer franz.thoma@tngtech.com
Category Web
Home page http://github.com/fmthoma/vgrep#readme
Source repository head: git clone https://github.com/fmthoma/vgrep
Uploaded Fri Jan 13 13:39:05 UTC 2017 by fmthoma
Updated Mon Jan 16 07:38:40 UTC 2017 by fmthoma to revision 1
Distributions NixOS:0.2.0.0
Executables vgrep
Downloads 195 total (7 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2017-01-13 [all 3 reports]
Hackage Matrix CI

Modules

  • Control
    • Concurrent
      • STM
        • Control.Concurrent.STM.TPQueue
    • Lens
      • Control.Lens.Compat
    • Monad
      • State
        • Control.Monad.State.Extended
  • Pipes
    • Concurrent
      • Pipes.Concurrent.PQueue
  • Vgrep
    • Vgrep.Ansi
      • Vgrep.Ansi.Parser
      • Vgrep.Ansi.Type
      • Vty
        • Vgrep.Ansi.Vty.Attributes
    • Vgrep.App
      • Vgrep.App.Internal
    • Vgrep.Command
    • Vgrep.Environment
      • Vgrep.Environment.Config
        • Vgrep.Environment.Config.Monoid
        • Vgrep.Environment.Config.Sources
          • Vgrep.Environment.Config.Sources.Env
          • Vgrep.Environment.Config.Sources.File
    • Vgrep.Event
    • Vgrep.Key
    • Vgrep.Parser
    • Vgrep.Results
    • System
      • Vgrep.System.Grep
    • Vgrep.Text
    • Vgrep.Type
    • Vgrep.Widget
      • Vgrep.Widget.HorizontalSplit
        • Vgrep.Widget.HorizontalSplit.Internal
      • Vgrep.Widget.Pager
        • Vgrep.Widget.Pager.Internal
      • Vgrep.Widget.Results
        • Vgrep.Widget.Results.Internal
      • Vgrep.Widget.Type

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for vgrep-0.2.0.0

[back to package description]

vgrep -- A pager for grep

Screenshot

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 git alias defined in your ~/.gitconfig:

    git config --global alias.vgrep '!__git_vgrep () { git grep --color=always "$@" | vgrep; }; __git_vgrep'
    git vgrep data
    
  • Using ack/ag instead of grep? 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 hjkl or the arrow keys to navigate
  • Enter opens a pager with the selected file
  • e opens the selected file in $EDITOR
  • Tab switches between results list and pager
  • q closes the pager and then the entire application.

Installation

Binaries

Debian/Ubuntu: .deb files are available for the latest release.

wget https://github.com/fmthoma/vgrep/releases/download/v0.2.0.0/vgrep_0.2.0.0-1_amd64.deb
sudo dpkg -i vgrep_0.2.0.0-1_amd64.deb

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