mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-13 17:50:56 +01:00
Add argument forwarding from batgrep to ripgrep
This commit is contained in:
parent
f17681b8b8
commit
18bf6e2c5c
@ -77,6 +77,18 @@ while shiftopt; do
|
|||||||
--no-snip) OPT_SNIP="";;
|
--no-snip) OPT_SNIP="";;
|
||||||
--no-highlight) OPT_HIGHLIGHT=false;;
|
--no-highlight) OPT_HIGHLIGHT=false;;
|
||||||
|
|
||||||
|
# Option Forwarding
|
||||||
|
--rg:*) {
|
||||||
|
if [[ "${OPT:5:1}" = "-" ]]; then
|
||||||
|
RG_ARGS+=("${OPT:5}")
|
||||||
|
else
|
||||||
|
RG_ARGS+=("--${OPT:5}")
|
||||||
|
fi
|
||||||
|
if [[ -n "$OPT_VAL" ]]; then
|
||||||
|
RG_ARGS+=("$OPT_VAL")
|
||||||
|
fi
|
||||||
|
};;
|
||||||
|
|
||||||
# ???
|
# ???
|
||||||
-*) {
|
-*) {
|
||||||
printc "%{RED}%s: unknown option '%s'%{CLEAR}\n" "$PROGRAM" "$OPT" 1>&2
|
printc "%{RED}%s: unknown option '%s'%{CLEAR}\n" "$PROGRAM" "$OPT" 1>&2
|
||||||
|
Loading…
Reference in New Issue
Block a user