./textproc/hgrep, Grep with human-friendly search output

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 0.3.4, Package name: hgrep-0.3.4, Maintainer: pin

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.


Required to build:
[lang/rust]

Master sites:

Filesize: 946.924 KB

Version history: (Expand)


CVS history: (Expand)


   2024-01-07 20:44:53 by pin | Files touched by this commit (3) | Package updated
Log message:
textproc/hgrep: update to 0.3.4

v0.3.4 - 06 Jan 2024
 - Update crates related to ripgrep. This contains the big internal change of
   regex crate and changes for ripgrep v14.
 - Update bat to v0.24.
 - Update the assets for syntax highlighting. This adds support for WGSL and
   some other improvements such as more file extensions support.
 - Improve error handling of bat printer.
 - Detect true color support using windows-version crate on Windows. True color
   is supported by Windows 10.0.15063 or later.
 - Update other dependencies to the latest.
    - Replace unmaintained dirs-next crate with dirs crate.
    - Update syntect crate to v5.1.0.
   2023-07-23 21:08:09 by pin | Files touched by this commit (3) | Package updated
Log message:
textproc/hgrep: update to 0.3.3

 - Always enable 24-bit colors on Windows because 24-bit colors support is
   available since Windows 10.0.15063 (released on April 5, 2019).
 - Add the document which explains how hgrep detects terminal color support.
 - Support generating a completion script for Nushell by
   --generate-completion-script nushell.
 - Set codegen-units to 1 on release build. This made the binary size 1.14x
   smaller and improved the performance by 1.05x faster.
 - Update dependencies to the latest versions including large update of regex
   crate (v1.9.1).
 - Do not depend on terminfo crate on Windows.
   2023-05-17 23:41:21 by Thomas Klausner | Files touched by this commit (1)
Log message:
hgrep: use cargo.mk's install
   2023-04-01 17:58:34 by pin | Files touched by this commit (3) | Package updated
Log message:
textproc/hgrep: update to 0.3.2

v0.3.2 - 31 Mar 2023
 - Update bat from 0.22 to 0.23. This improves performance on macOS when
   using -p bat.
 - Add support for Ada syntax highlighting
 - Update dependencies
     - Remove remove_dir_all crate to avoid CVE-2022-21658
     - Replace unmaintained ansi_term crate with nu-ansi-term crate
     - Update clap crates to generate better completion scripts and man page
   2023-01-22 09:57:08 by pin | Files touched by this commit (3) | Package updated
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) | Package updated
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) | Package updated
Log message:
textproc/hgrep: update to 0.2.5

-Add pre-built binary for AArch64 Linux.
(no other changes)