simple highlight
This commit is contained in:
@@ -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
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user