textproc/hgrep 0.3.9 NetBSD
Grep with human-friendly search output
- System
- NetBSD
- Repository
- pkgsrc
- Maintainer
- [email protected]
- License
- mit
- Categories
- textproc
- Package size
- 2577.5 KiB, 7019.6 KiB installed
Description
hgrep is a grep tool to search files with given pattern and print the matched code snippets with human-friendly syntax highlighting. In short, it's a fusion of bat and grep or other alternatives like ripgrep.
This is similar to -C option of grep command, but hgrep focuses on human readable outputs. hgrep is useful to survey the matches with contexts around them. When some matches are near enough, hgrep prints the lines within one code snippet. Unlike grep -C, hgrep adopts some heuristics around blank lines to determine efficient number of context lines.
As an optional feature, hgrep has builtin grep implementation thanks to ripgrep as library. It's a subset of rg command. And it's faster when there are so many matches since everything is done in the same process.
In the other systems
| System | Port | Version |
|---|---|---|
| NetBSD | textproc/hgrep | 0.3.9 |
| OpenBSD | textproc/hgrep | 19991004p2 |
Install
Binary package:
pkgin install hgrep
From pkgsrc:
cd /usr/pkgsrc/textproc/hgrep && make install clean
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | Version |
|---|---|
| NetBSD 10.1 x86_64 | 0.3.9 |
| NetBSD 10.1 aarch64 | 0.3.9 |
| SmartOS / illumos x86_64 | 0.3.9 |
| macOS 15 arm64 | 0.3.9 |
Dependencies
No port depends on this one.