Path to this page:
./
textproc/hgrep,
Grep with human-friendly search output
Branch: CURRENT,
Version: 0.3.1,
Package name: hgrep-0.3.1,
Maintainer: pinhgrep 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.
Required to build:[
lang/rust]
Master sites:
Filesize: 929.154 KB
Version history: (Expand)
- (2023-01-31) Updated to version: hgrep-0.3.1
- (2023-01-22) Updated to version: hgrep-0.3.0
- (2022-05-27) Updated to version: hgrep-0.2.6
- (2022-04-24) Updated to version: hgrep-0.2.5
- (2022-04-20) Updated to version: hgrep-0.2.4
- (2022-02-02) Updated to version: hgrep-0.2.3
CVS history: (Expand)
2023-01-22 09:57:08 by pin | Files touched by this commit (3) |  |
Log message:
textproc/hgrep: update to 0.3.0
v0.3.0 - 21 Jan 2023
- Update syntect dependency to v5.0.0. Thanks to lazy loading, this change
makes loading assets at startup about 70% faster. The small benchmark showed
hgrep command was 1.7x faster when searching a small file with -p syntect
compared to v0.2.8.
- Update bat dependency from 0.20 to 0.22. This introduces several improvements
and fixes which were recently added to bat when using -p bat.
- Add --generate-man-page flag to generate a manual page file. Save the output
to your man directory to show the help with man command. If you install
hgrep with Homebrew, it will be automatically generated.
- Add several syntax highlighting for configuration files (Git configs, Fish
history, SSH config, Nginx config, ...).
- Wrapp the --help output looking at the terminal width. The output is more
compact than v0.2.8.
- Improve error handling when failing to enable ANSI color sequences support
on Windows.
v0.2.8 - 10 Jan 2023
- Fix some command line boolean flags wrongly took an argument.
(thanks @Ryooooooga, #15)
v0.2.7 - 04 Jan 2023
- Fix crash when reading from rg --vimgrep. Note that --vimgrep flag is not
assumed by hgrep. Please use rg -nH. (#13)
- Fix errors are not reported when they are caused by the second match or
later.
- Update dependencies to the latest. Especially migrating to clap v4 improved
the --help output.
- Migrate to Rust 2021 edition.
|
2022-09-18 15:37:18 by Havard Eidnes | Files touched by this commit (1) |
Log message:
textproc/hgrep: use mk/atomic64.h.
Also sneak in -latomic via BUILDLINK_TRANSFORM on powerpc platforms,
cannot use LDFLAGS since it's cargo which invokes cc as linker, and
cargo apparently does not respect passed LDFLAGS.
|
2022-05-27 20:21:50 by pin | Files touched by this commit (3) |  |
Log message:
textproc/hgrep: update to 0.2.6
v0.2.6 - 27 May 2022
-x86_64-unknown-linux-musl release binary now links libc statically (#10)
-Replace rgb2ansi256 crate with ansi_colors crate
|
2022-04-23 23:10:39 by pin | Files touched by this commit (2) |  |
Log message:
textproc/hgrep: update to 0.2.5
-Add pre-built binary for AArch64 Linux.
(no other changes)
|
2022-04-18 00:56:22 by pin | Files touched by this commit (3) |  |
Log message:
textproc/hgrep: update to 0.2.4
-Update bat crate dependency to v0.20.0.
-Highlight clang-format configuration file.
|
2022-02-02 15:49:06 by pin | Files touched by this commit (3) |  |
Log message:
textproc/hgrep: update to 0.2.3
-Update dependencies including bat v0.19 and clap v3
-Build binaries with the latest Rust compiler v1.58.1
|
2021-12-12 10:57:46 by Thomas Klausner | Files touched by this commit (3) |  |
Log message:
hgrep: update to 0.2.2.
Fix a build failure since new RC version of clap crate was released.
Fix a dynamic link error of pcre2 library by linking the library
statically. The error could happen when you installed Homebrew to
non-default location on macOS (#6).
Add --regex-size-limit option for built-in grep feature.
Add --dfa-size-limit option for built-in grep feature.
Use Rust compiler v1.57 to build binaries.
|
2021-11-14 10:06:41 by pin | Files touched by this commit (3) |  |
Log message:
textproc/hgrep: update to 0.2.1
-Heuristic algorithm to choose the foreground color of matched regions was
improved. Now hgrep generates multiple candidates for the foreground color,
and chooses one of them looking at the color distances from the background
color.
-Add new Material theme. It is a very popular low-contrast color theme. Try it
by hgrep --theme Matrial.
-Add new Carbonight theme. It is a minimal monotone color theme. Some people
feel that too colorful outputs are hard to see. This color theme might fit to
such people.
-Built-in grep allows K/M/G suffix at --max-filesize option to specify a file
size easily.
-Built-in grep adds new flag --invert-match for invert matching. It shows lines
that do not match the given pattern.
-Built-in grep adds new flag --one-file-system. When enabled, the search will
not cross file system boundaries relative to where it started from.
-Built-in grep adds new short flag-. as alias of long flag --hidden.
-Built-in grep adds new flag --no-unicode which disables Unicode-aware search.
-Built-in grep improves the output from --type-list. Now types are printed in
bold texts which is easier to see.
-Syntax assets were updated to the latest. They improve some syntax highlight
detection (for example, vimrc for Vim files) and solve some highlighting
issues.
-Fix a broken pipe error when hgrep command is piped to a pager command like
less. This happened when less exits earlier than hgrep command, for example,
when you immediately quit a pager by q without scrolling the output to the end.
In the case, hgrep still tried to output the result to stdout even if the pipe
had already been closed and it caused a broken pipe error. In v0.2.1, hgrep
correctly ignores such broken pipe errors.
-Fix --no-wrap deprecated flag was not removed at v0.2.0. Use --wrap instead if
you used the flag.
-Fix checksum of downloaded package via Homebrew on arm64 macOS.
-Fix --type-list flag did not print types when a pattern argument is not given.
-(Dev) Move asset-builder tool directory to assets/builder.
-(Dev) The script to update test snapshots is now 25x faster.
-(Dev) CI job to run clippy and rustfmt is now 6x faster.
|