Grep with human-friendly search results
x86_64-unknown-linux-musl
release binary now links libc statically (#10)rgb2ansi256
crate with ansi_colors
cratebat
crate dependency to v0.20.0.bat
v0.19 and clap
v3clap
crate was released.--regex-size-limit
option for built-in grep feature.--dfa-size-limit
option for built-in grep feature.Coldark-Dark
theme. Please find the 'let' matched regions in the following screenshots. The foreground color is easier to see in v0.2.1 than v0.2.0.
v0.2.0 | v0.2.1 |
---|---|
Material
theme. It is a very popular low-contrast color theme. Try it by hgrep --theme Material
.
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.
--max-filesize
option to specify a file size easily.
# Search files whose size is smaller than 10 MiB
hgrep --maxfilesize 10M ...
--invert-match
for invert matching. It shows lines that do not match the given pattern.--one-file-system
. When enabled, the search will not cross file system boundaries relative to where it started from.-.
as alias of long flag --hidden
.--no-unicode
which disables Unicode-aware search.--type-list
. Now types are printed in bold texts which is easier to see.vimrc
for Vim files) and solve some highlighting issues.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.--no-wrap
deprecated flag was not removed at v0.2.0. Use --wrap
instead if you used the flag.--type-list
flag did not print types when a pattern argument is not given.asset-builder
tool directory to assets/builder
.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.
--background
--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.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.
assets
directory.
--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.
hgrep-*-x86_64-unknown-linux-musl.zip
in released assets. Note that this binary is not tested. (#5)ansi_term
crate only when targeting Windows. It reduces number of dependencies when bat-printer
is not enabled.syntect-printer
and bat-printer
are disabled.hgrep
command and versioning of this project in the readme document.ansi
theme was broken. The theme is for old terminals which only supports 16 colors.--first-only
did not work with bat
printer.--background
is specifiedsyntect-printer
and ripgrep
features
--ascii-lines
flag for terminals which does not support rendering unicode characters well. With this flag, unicode characters like '│' or '─' are replaced with ASCII characters '|' or '-'. This feature is only supported by syntect-printer
(use -p syntect
).
--first-only
(-f
) flag to show only the first snippet per file. This is useful when you want to look around the results.syntect-printer
supports text-wrapping. Longer lines than terminal width are now wrapped by default. It can handle wide characters including special emojis with zero-width joiner (U+200D) like 👨👩👧👦
syntect-printer
highlights matched regions in matched lines with a searched text color. Since match positions in matched lines are not included in output from grep -nH
, currently this is only supported by combination of syntect-printer
feature and ripgrep
featuresyntect-printer
now uses light dashed lines for the separator of snippets: ╶╶╶╶╶╶╶╶╶╶╶╶
--wrap MODE
option where MODE
is one of char
or never
(the default value is char
). More modes may be implemented in the future--wrap
option, --no-wrap
flag is now deprecated and will be removed at v0.2.0. Use --wrap never
insteadsyntect-printer
was optimized. It slightly improved performance (around 4% faster in benchmarks)bat-printer
.bat-printer
enables text wrapping by default as bat
command does. --no-wrap
can disable text wrapping.bat-printer
now looks at bat's cache directory when --custom-assets
flag is given. This is useful if you use some custom syntax highlighting or theme. Note that this may not work fine with some versions of bat
command.bat-printer
automatically uses 'ansi' theme for terminals which enable only 16 colors since other themes don't work.--terminal-width
option to give the width of terminal explicitly. This is useful when piping the results to other command like less
.syntect-printer
.terminal_size
crate directly instead of using console
crate. It removes 3 dependencies when bat-printer
feature is not enabled.less
, I recommend to check 'Set default command options' section.syntect-printer
were added.