simple highlight

This commit is contained in:
Ville Rantanen
2019-11-18 12:59:23 +02:00
parent e2c16ea8d4
commit 1b6248733a

View File

@@ -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
;;