mirror of
https://github.com/cheat/cheat.git
synced 2024-11-16 00:48:29 +01:00
hightlight the search keywords
This commit is contained in:
parent
cdf573a725
commit
761bf2eb2f
1 changed files with 2 additions and 0 deletions
|
@ -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 != '':
|
||||
|
|
Loading…
Reference in a new issue