From 1b6248733a1b50b0ee83dd3b760947ad9d15c4af Mon Sep 17 00:00:00 2001 From: Ville Rantanen Date: Mon, 18 Nov 2019 12:59:23 +0200 Subject: [PATCH] simple highlight --- reporting/highbeam | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reporting/highbeam b/reporting/highbeam index 782fe08..b82f4aa 100755 --- a/reporting/highbeam +++ b/reporting/highbeam @@ -28,6 +28,7 @@ Underline: $U Usage: highbeam [-c] [-h] [-f config] -c Be case sensitive -D Print current rules, not the input + -s Simple highlight a string (as argument) -h Help -f Define config file (default ~/.highbeamrc) -r Define rules with a string, replaces the other rules @@ -75,7 +76,7 @@ CONF_FILE=~/.highbeamrc CONF_LINE="" FLAGS="ig" PRINT=0 -while getopts chf:r:D opt +while getopts chf:r:s:D opt do case "$opt" in c) FLAGS="g" @@ -90,6 +91,10 @@ do case "$opt" in r) CONF_LINE=( $( eval echo $OPTARG ) ) ;; + s) + HB_RULES='"'"$OPTARG"'" "$U$Y"' exec "$0" + exit $? + ;; D) PRINT=1 ;;