vgrep: add page (#8383)

* vgrep: add page

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>

* vgrep: fix token syntax

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>

* vgrep: appease the linter

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
pull/1/head
Muhammad Falak R Wani 2022-08-21 04:04:38 +05:30 committed by GitHub
parent 25a2a44a01
commit f6685e6cb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 0 deletions

33
pages/common/vgrep.md Normal file
View File

@ -0,0 +1,33 @@
# vgrep
> A user friendly pager for grep.
> See also: `ugrep`, `rg`.
> More information: <https://github.com/vrothberg/vgrep>.
- Recursively search the current directory for a pattern and cache it:
`vgrep {{search_pattern}}`
- Display the contents of the cache:
`vgrep`
- Open the "4th" match from the cache in the default editor:
`vgrep --show {{4}}`
- Display a context of "3" lines for each match in the cache:
`vgrep --show=context{{3}}`
- Display the number of matches for each directory in the tree:
`vgrep --show=tree`
- Display the number of matches for each file in the tree:
`vgrep --show=files`
- Start an interactive shell with cached matches:
`vgrep --interactive`