better fix end of line stripping; strip whitespaces

This commit is contained in:
Radovan Garabík 2017-11-04 21:14:07 +01:00
parent c43e6a2ca3
commit a110dd51bd
7 changed files with 10 additions and 10 deletions

View File

@ -16,7 +16,7 @@ colours=red
======
# PORTS
regexp=((?:\d{1,3}\.){3}\d{1,3}):(\d+)
colours=default,blue,bold blue
colours=default,blue,bold blue
======
# Error Line
regexp=^error\s(?:\w+\s)+([a-z\-_0-9]+):(.*)$

View File

@ -1,9 +1,9 @@
#
#
regexp=\b(g?cc|[gc]\+\+|g?as|ld)\b
colours=white bold
count=once
.........
#
#
regexp=^[^:\s]*?:\d+:
colours=bold magenta
.........
@ -11,7 +11,7 @@ regexp=^[^:\s]*?:
colours=cyan
count=once
.........
#
#
regexp=\`[A-Za-z0-9_():&*]+( const)?\'
colours=magenta
.........
@ -28,7 +28,7 @@ regexp=\-o\s[^\s]+
colours=yellow
.........
# warning and error won't work, unless you redirect also
# stderr to grcat
# stderr to grcat
#
# warning
regexp=[Ww]arning[:\b]

View File

@ -36,7 +36,7 @@ colours=red
# "linkdown"
regexp=linkdown
colours=bold red
-
-
# "src"
regexp=src \S+

View File

@ -24,7 +24,7 @@ colours=bold green
=======
# everything in parentheses
regexp=\(.+?\)
colours=green
colours=green
count=more
=======
# channel name

View File

@ -1,5 +1,5 @@
# Intended for colouring LDIF output (from ldap tools)
# comments
# comments
regexp=^#.*
colours=green
count=stop

View File

@ -2,7 +2,7 @@
regexp=(\s|^)\d+([.,]\d+)?\s?([kKMG][bB]|[bB]|[kKMG])(?=[\s,]|$)
colours=yellow
=======
#
#
regexp=<=>
colours=yellow

2
grcat
View File

@ -135,7 +135,7 @@ while not is_last:
continue
if not l[0] in letters:
break
fields = split(l.strip(), "=", 1)
fields = split(l.rstrip('\r\n'), "=", 1)
if len(fields) != 2:
sys.stderr.write('Error in configuration, I expect keyword=value line\n')
sys.stderr.write('But I got instead:\n')