summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbornet-hl <mbornet.pro@wanadoo.fr>2015-08-08 10:39:26 +0200
committermbornet-hl <mbornet.pro@wanadoo.fr>2015-08-08 10:39:26 +0200
commit2536d28edae02b2e9cbdcd09f989566b94f45ee3 (patch)
treec73064f5704d960242efe55de6954f8430ceedb8
parentfda3101b969a1dd4cdb3aab87b4c8dd3e285197f (diff)
downloadhl-2536d28edae02b2e9cbdcd09f989566b94f45ee3.zip
hl-2536d28edae02b2e9cbdcd09f989566b94f45ee3.tar.gz
hl-2536d28edae02b2e9cbdcd09f989566b94f45ee3.tar.bz2
Added the config file's syntax in the man page
-rw-r--r--man1/hl.166
1 files changed, 64 insertions, 2 deletions
diff --git a/man1/hl.1 b/man1/hl.1
index 23ebafe..177f9b3 100644
--- a/man1/hl.1
+++ b/man1/hl.1
@@ -1,4 +1,4 @@
-.\" @(#) [MB] cr_hl.1 Version 1.4 du 15/07/28 -
+.\" @(#) [MB] cr_hl.1 Version 1.5 du 15/08/08 -
.TH "HL" "1" "July 2015" "" "User Commands"
.SH "NAME"
hl - Colorize strings matching regular expressions
@@ -150,8 +150,70 @@ Colorize the output of the ifconfig command according to the configurations \fBI
.TP
The \fBhl\fP command can use a configuration file named \fB$HOME/.hl.cfg\fP .
+Its recognized syntax is :
+
+- comment lines (beginning with a '#'),
+
+- configuration definition (a name, eventually followed by spaces or tabs, and a ':'),
+
+- configuration options for this configuration (a tab, followed by the options)
+
+- an empty line acts as a separator between configurations
+
+.TP
+Example :
+
+.EX
+#
+# Example of .hl.cfg configuration file
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+
+cal :
+ -e
+ -g '[1-9][0-9][0-9][0-9]'
+ -y 'January|February|March|April|May|June|July|August|September|October|November|December'
+ -c 'Su|Mo|Tu|We|Th|Fr|Sa'
+ -b '[0-9]'
+
+df :
+ -e
+ -r '\<((100|9[5-9])%.*)'
+ -y '\<((8[0-9]|9[0-4])%.*)'
+ -c '\<[0-4][0-9]?%.*'
+ -g '\<[0-9]+%.*'
+ -b '^Filesystem.*'
+
+diff :
+ -e
+ -y '^<.*'
+ -g '^>.*'
+ -c '^([0-9]+(,[0-9]+)?[a-z][0-9]+(,[0-9]+)?)'
+
+hl :
+ -ei
+ -2B '^hl: version.*'
+ -1g 'Usage'
+ -2
+ -R ' +(.*\<red\>....).*reverse video.*'
+ -G ' +(.*\<green\>..).*reverse video.*'
+ -Y ' +(.*\<yellow\>.).*reverse video.*'
+ -B ' +(.*\<blue\>...).*reverse video.*'
+ -M ' +(.*\<magenta\>).*reverse video.*'
+ -C ' +(.*\<cyan\>...).*reverse video.*'
+ -W ' +(.*\<white\>..).*reverse video.*'
+ -w '(\(reverse video\))'
+ -r '.*\<red\>.*'
+ -g '.*\<green\>.*'
+ -y '.*\<yellow\>.*'
+ -b '.*\<blue\>.*'
+ -m '.*\<magenta\>.*'
+ -c '.*\<cyan\>.*'
+ -w '.*\<white\>.*'
+.EE
+
.SH "MAN PAGE VERSION"
-The version of this man page is 1.4.
+The version of this man page is 1.5.
It is compatible with hl version 1.42 and upper.
.SH "AUTHOR"