Bot releases are visible (Hide)
--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
read
system calls on detecting syntax.Published by github-actions[bot] 6 months ago
-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...
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...
.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)Published by github-actions[bot] 7 months ago
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'
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.Published by github-actions[bot] 10 months ago
regex
crate and changes for ripgrep v14.bat
printer.windows-version
crate on Windows. True color is supported by Windows 10.0.15063 or later.dirs-next
crate with dirs
crate.syntect
crate to v5.1.0.Published by github-actions[bot] about 1 year ago
--generate-completion-script nushell
.codegen-units
to 1 on release build. This made the binary size 1.14x smaller and improved the performance by 1.05x faster.regex
crate (v1.9.1).terminfo
crate on Windows.Published by github-actions[bot] over 1 year ago
bat
from 0.22 to 0.23. This improves performance on macOS when using -p bat
.remove_dir_all
crate to avoid CVE-2022-21658ansi_term
crate with nu-ansi-term
cratePublished by github-actions[bot] over 1 year ago
--glob
was not repeatable--ignore-case
and --smart-case
should override each other--line-regexp
and --word-regexp
should override each otherPublished by github-actions[bot] over 1 year ago
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.bat
dependency from 0.20 to 0.22. This introduces several improvements and fixes which were recently added to bat when using -p bat
.--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
--help
output looking at the terminal width. The output is more compact than v0.2.8.Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] almost 2 years ago
rg --vimgrep
. Note that --vimgrep
flag is not assumed by hgrep. Please use rg -nH
. (#13)--help
output.Published by github-actions[bot] over 2 years ago
x86_64-unknown-linux-musl
release binary now links libc statically (#10)rgb2ansi256
crate with ansi_colors
cratePublished by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
bat
crate dependency to v0.20.0.Published by github-actions[bot] over 2 years ago
bat
v0.19 and clap
v3Published by github-actions[bot] almost 3 years ago
clap
crate was released.--regex-size-limit
option for built-in grep feature.--dfa-size-limit
option for built-in grep feature.Published by github-actions[bot] almost 3 years ago
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
.Published by github-actions[bot] almost 3 years ago
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 specifiedPublished by github-actions[bot] almost 3 years ago
syntect-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.Published by github-actions[bot] almost 3 years ago
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)Published by github-actions[bot] almost 3 years ago
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.