github rhysd/hgrep v0.2.0

latest releases: v0.3.7, v0.3.6, v0.3.5...
2 years ago
  • BREAKING The default printer is now syntect. It has the following benefits. I tested it for several weeks and it seems stable. See the section in README to know the difference between bat printer and syntect printer.
    • Performance is 2x to 4x faster
    • Output layout and highlighting are optimized; line number highlight and matched regions at matched line
    • Support background color with --background
    • Color themes are optimized
  • BREAKING The default value of --min-context was changed from 5 to 3. And the default value of --max-context was changed from 10 to 6. This is because it turned out that the previous default values were too large for surveying the search results.
  • BREAKING Since themes for syntect printer are now managed by ourselves (see below), syntect printer no longer looks at BAT_THEME and BAT_STYLE environment variables. To set the default theme and layout, use shell's command alias. See the document for more details.
  • syntect printer now renders more accurate colors by considering alpha values of colors by blending them with background colors. In v0.1.9, alpha values were simply ignored. For example, gutter color with Nord theme was wrongly very light at v0.1.9.
    • Before (v0.1.9):
      v0.1.9 Nord
    • After (v0.2.0):
      v0.2.0 Nord
  • Manage our own theme set to optimize themes for our use cases. Comparing with bat's theme assets, some themes are removed whose line highlight color and/or searched text color are obscure or hard to see. And some new famous themes are added. The theme assets are managed in assets directory.
    • ayu: Famous vivid color theme
      ayu-dark ayu-mirage ayu-light
      ayu-dark ayu-mirage ayu-light
    • predawn: Famous low-contrast color theme
      predawn
    • cyanide: Famous minimal color theme
      cyanide
  • Output of --list-themes is much improved. It shows sample outputs per theme so that users can know what they look like. Options related to outputs like --background and --no-grid are reflected to the sample outputs. At v0.1.9, only theme names were printed so users needed to try the themes by themselves.
    list themes output example
  • Linux x86_64 musl target was added to pre-built releases. Find hgrep-*-x86_64-unknown-linux-musl.zip in released assets. Note that this binary is not tested. (#5)
  • Depend on ansi_term crate only when targeting Windows. It reduces number of dependencies when bat-printer is not enabled.
  • Improve a compile error when both feature syntect-printer and bat-printer are disabled.
  • Describe the exit status of hgrep command and versioning of this project in the readme document.
  • Fix rendering ansi theme was broken. The theme is for old terminals which only supports 16 colors.
  • Fix --first-only did not work with bat printer.
  • Fix the background color in file header when --background is specified

Don't miss a new hgrep release

NewReleases is sending notifications on new releases.