igrep

Interactive grep with TUI for browsing results

TLDR

Search for a pattern in the current directory
$ igrep "[pattern]"
Search in a specific directory
$ igrep "[pattern]" [path/to/directory]
Search case-insensitively
$ igrep -i "[pattern]"
Search hidden files
$ igrep --hidden "[pattern]"
Filter by file type
$ igrep -t [rust] "[pattern]"
Open results in a specific editor
$ igrep --editor [nvim] "[pattern]"

SYNOPSIS

igrep [-i] [--hidden] [-t type] [--editor editor] pattern [path]

DESCRIPTION

igrep (Interactive Grep) runs ripgrep in the background and provides a TUI to interactively browse search results. When you select a match, it opens the file at the matching line in your text editor of choice (Vim by default). Supported editors include Vim, Neovim, nano, VS Code, Emacs, Helix, Sublime Text, Micro, and various JetBrains IDEs.The interface allows filtering, sorting, and navigating through results with keyboard shortcuts, making it efficient for exploring large codebases.

INSTALL

sudo apt install openimageio-tools
sudo pacman -S igrep
sudo apk add openimageio-tools
sudo zypper install igrep
brew install igrep
nix profile install nixpkgs#igrep

CAVEATS

Requires ripgrep (rg) as a dependency for the search backend. Editor integration depends on the editor supporting line-number arguments.

HISTORY

igrep was created by konradsz and is written in Rust. It was designed to bridge the gap between grep's search capabilities and editor integration, providing a visual selection layer.

SEE ALSO

grep(1), rg(1), fzf(1)