mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-13 09:40:42 +01:00
batgrep: Prevent RIPGREP_CONFIG_PATH context from breaking batgrep.
This commit is contained in:
parent
0494e41e66
commit
dc50f28480
@ -216,7 +216,7 @@ main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
while IFS=':' read -r file line column; do
|
while IFS=':' read -r file line column text; do
|
||||||
((FOUND++))
|
((FOUND++))
|
||||||
|
|
||||||
if [[ "$LAST_FILE" != "$file" ]]; then
|
if [[ "$LAST_FILE" != "$file" ]]; then
|
||||||
@ -233,7 +233,7 @@ main() {
|
|||||||
|
|
||||||
LAST_LR+=("--line-range=${line_start}:${line_end}")
|
LAST_LR+=("--line-range=${line_start}:${line_end}")
|
||||||
[[ "$OPT_HIGHLIGHT" = "true" ]] && LAST_LH+=("--highlight-line=${line}")
|
[[ "$OPT_HIGHLIGHT" = "true" ]] && LAST_LH+=("--highlight-line=${line}")
|
||||||
done < <(rg --with-filename --vimgrep "${RG_ARGS[@]}" --sort path "$PATTERN" "${FILES[@]}")
|
done < <(rg --with-filename --vimgrep "${RG_ARGS[@]}" --context=0 --no-context-separator --sort path "$PATTERN" "${FILES[@]}")
|
||||||
do_print
|
do_print
|
||||||
|
|
||||||
# Exit.
|
# Exit.
|
||||||
|
Loading…
Reference in New Issue
Block a user