Skip to content

Releases: rhysd/hgrep

v0.3.7

21 Apr 16:45
Compare
Choose a tag to compare
  • Support many text encodings. Previously only UTF-8 was supported. (#21)
    • Add --encoding (-E) command line option to specify file encoding of matched files. For example, the following command searches files encoded in Shift JIS.
      hgrep --encoding sjis pattern path/to/dir
    • Detect file encodings from BOM. hgrep can automatically detect UTF-16LE, UTF-16BE, and UTF-8 if BOM exists in the file.
  • Fix some syntax detection fails when BOM is inserted at the head of file. (#20)
  • Improve performance by removing redundant read system calls on detecting syntax.
  • Improve error messages when failing to read files.

v0.3.6

06 Apr 12:17
Compare
Choose a tag to compare
  • Add -u/--unrestricted flags to built-in ripgrep (ripgrep feature). This flag reduces the level of "smart" filtering by repeated uses (up to 2). A single flag -u is equivalent to --no-ignore. Two flags -uu are equivalent to --no-ignore --hidden. Unlike ripgrep, three flags -uuu are not supported since hgrep doesn't support --binary flag.
    # Same as `hgrep --no-ignore pattern paths...`
    hgrep -u pattern paths...
    # Same as `hgrep --no-ignore --hidden pattern paths...`
    hgrep -uu pattern paths...
  • Allow command line options to override their previous values. For example, hgrep --theme ayu-dark --theme OneHalfDark specifies OneHalfDark theme, which previously caused a command line parse error. This new behavior is useful when you specify a default option in HGREP_DEFAULT_OPTS and want to override the default value in a command line.
    # Set the default theme value
    export HGREP_DEFAULT_OPTS='--theme ayu-dark'
    # v0.3.5 caused an error and v0.3.6 now allows this
    hgrep --theme OneHalfDark pattern paths...
  • A Debian package (.deb file) is now released in the release page. For example the package file for v0.3.6 can be downloaded from this link. The package can be installed via dpkg command and managed by APT package manager. It installs the man page and bash completion file automatically. Please see the document for more details. (#17)
  • Fix redundant imports warning reported from a nightly compiler.

v0.3.5

31 Mar 13:08
Compare
Choose a tag to compare
  • Add HGREP_DEFAULT_OPTS environment variable to set the default command line options. For example, the following configuration enables ayu-dark theme and background colors by default. See the document for more details.
    export HGREP_DEFAULT_OPTS='--theme ayu-dark --background'
  • Detect the terminal color support from TERM environment variable in addition to COLORTERM environment variable. For example, xterm-256color enables 256 colors support. See the document to know the logic of the color support detection.
  • Update the themes bundle to the latest.
  • Update cargo dependencies including syntect v5.2.

v0.3.4

06 Jan 14:12
Compare
Choose a tag to compare
  • 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.

v0.3.3

22 Jul 05:41
Compare
Choose a tag to compare
  • 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.

v0.3.2

31 Mar 12:23
Compare
Choose a tag to compare
  • 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

v0.3.1

31 Jan 11:56
Compare
Choose a tag to compare
  • Fix parsing some command line options
    • Fix --glob was not repeatable
    • Fix --ignore-case and --smart-case should override each other
    • Fix --line-regexp and --word-regexp should override each other

v0.3.0

21 Jan 12:30
Compare
Choose a tag to compare
  • 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.
    hgrep --generate-man-page > /usr/local/share/man/man1/hgrep.1
    man hgrep
  • Add several syntax highlighting for configuration files (Git configs, Fish history, SSH config, Nginx config, ...).
  • Wrap 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 sequence support on Windows.

v0.2.8

10 Jan 15:49
Compare
Choose a tag to compare
  • Fix some command line boolean flags wrongly took an argument. (thanks @Ryooooooga, #15)

v0.2.7

04 Jan 13:13
Compare
Choose a tag to compare
  • 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.