hightlight the search keywords
This commit is contained in:
1 parent
cdf573a725
commit
761bf2eb2f
1 file changed
+2
@@ -84,6 +84,8 @@ def search(term):
|
||||
match = ''
|
||||
for line in open(cheatsheet[1]):
|
||||
if term in line:
|
||||
if 'CHEATCOLORS' in os.environ:
|
||||
line = line.replace(term, '\033[1;31m' + term + '\033[0m');
|
||||
match += ' ' + line
|
||||
|
||||
if match != '':
|
||||
|
||||
Reference in new issue
Block a user