mirror of
https://github.com/garabik/grc.git
synced 2024-11-15 14:48:26 +01:00
ignore configuration sections without regexp
This commit is contained in:
parent
b1863ef01d
commit
71c6c70965
2 changed files with 5 additions and 4 deletions
4
grc
4
grc
|
@ -3,11 +3,11 @@
|
||||||
import os, re, string, sys, getopt, signal
|
import os, re, string, sys, getopt, signal
|
||||||
|
|
||||||
def version():
|
def version():
|
||||||
print ("Generic Colouriser 1.9")
|
print ("Generic Colouriser 1.9.1rc1")
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
def help():
|
def help():
|
||||||
print("""Generic Colouriser 1.9
|
print("""Generic Colouriser 1.9.1rc1
|
||||||
grc [options] command [args]
|
grc [options] command [args]
|
||||||
Options:")
|
Options:")
|
||||||
-e --stderr redirect stderr. If this option is selected,
|
-e --stderr redirect stderr. If this option is selected,
|
||||||
|
|
5
grcat
5
grcat
|
@ -156,8 +156,9 @@ while not is_last:
|
||||||
ll['colours'] = colstrings
|
ll['colours'] = colstrings
|
||||||
|
|
||||||
cs = ll['count']
|
cs = ll['count']
|
||||||
ll['regexp'] = re.compile(ll['regexp']).search
|
if ll.has_key('regexp'):
|
||||||
regexplist.append(ll)
|
ll['regexp'] = re.compile(ll['regexp']).search
|
||||||
|
regexplist.append(ll)
|
||||||
|
|
||||||
prevcolour = colours['default']
|
prevcolour = colours['default']
|
||||||
prevcount = "more"
|
prevcount = "more"
|
||||||
|
|
Loading…
Reference in a new issue