Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonathanpoelen/batrg
Search and highlight files using ripgrep and bat
https://github.com/jonathanpoelen/batrg
bat grep ripgrep syntax-highlighting
Last synced: 7 days ago
JSON representation
Search and highlight files using ripgrep and bat
- Host: GitHub
- URL: https://github.com/jonathanpoelen/batrg
- Owner: jonathanpoelen
- License: mit
- Created: 2020-06-15T22:51:14.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-28T22:24:29.000Z (over 1 year ago)
- Last Synced: 2024-02-13T21:55:45.895Z (9 months ago)
- Topics: bat, grep, ripgrep, syntax-highlighting
- Language: Shell
- Homepage:
- Size: 101 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Batrg
Search and highlight files using ripgrep (rg) and bat.
![Batrg sample](./image.png "Batrg sample")
## Usage
batrg [OPTIONS] PATTERN [PATH ...]
batrg [OPTIONS] [-e PATTERN ...] [-f PATTERNFILE ...] [PATH ...]
command | batrg [OPTIONS] PATTERN## Pattern and PATTERNFILE
See `rg`
## Options
- `--snip` \
\
Show the snip decoration (see `bat --style=...`). \
\
This is automatically disabled when `--context=0` (see `bat`).- `--no-snip` \
\
Disable `--snip`.- `--highlight` \
\
Highlight matching lines. \
\
This is automatically disabled when `--context=0` (see `bat`).- `--no-highlight` \
\
Disable `--highlight`.- `--file-separator=` \
\
Character used by the separation line between 2 files, or string separator.- `--file-separator-wrap` \
\
If a match is found, appends the separator line above the first file and below the last file.- `--no-file-separator-wrap` \
\
Disable `--file-separator-wrap`.- `--paging=` \
\
Specify when to use the pager. To control which pager is used, set the `PAGER` or `BAT_PAGER` environment variables (the latter takes precedence) or use the `--pager` option. To disable the pager permanently, set `--paging=never`. \
\
Possible values: `auto`, `never`, `always`, `one-by-one`.- `--bat-engine=` \
\
Specify command for `bat`. By default use `BATRG_BAT` environment variables or `bat`.- `--rg-engine=` \
\
Specify command for `rg`. By default use `BATRG_RG` environment variables or `rg`.Another options are passed directly to `ripgrep` or `bat`.
## Dependencies
- `zsh`
- `bat`
- `rg`## Installation
Just put `batrg` in a `PATH` folder and `completion/_batrg` in a completion folder.