← 返回命令列表

Linux command

igrep 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Search for a pattern

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]"

说明

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.

FAQ

What is the igrep command used for?

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.

How do I run a basic igrep example?

Run `igrep "[pattern]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more igrep examples?

This page includes 6 examples for igrep, plus related commands for nearby Linux tasks.