diff options
Diffstat (limited to 'plugins/aliases/cheatsheet.py')
-rw-r--r-- | plugins/aliases/cheatsheet.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/aliases/cheatsheet.py b/plugins/aliases/cheatsheet.py index d6d507b92..694afd31c 100644 --- a/plugins/aliases/cheatsheet.py +++ b/plugins/aliases/cheatsheet.py @@ -26,16 +26,16 @@ def cheatsheet(lines): target_aliases.extend(group_list) return cheatsheet -def pretty_print_group(key, aliases, hightlight=None): +def pretty_print_group(key, aliases, highlight=None): if len(aliases) == 0: return group_hl_formatter = lambda g, hl: termcolor.colored(hl, 'yellow').join([termcolor.colored(part, 'red') for part in ('[%s]' % g).split(hl)]) alias_hl_formatter = lambda alias, hl: termcolor.colored(hl, 'yellow').join([termcolor.colored(part, 'green') for part in ('\t%s = %s' % alias[0:2]).split(hl)]) group_formatter = lambda g: termcolor.colored('[%s]' % g, 'red') alias_formatter = lambda alias: termcolor.colored('\t%s = %s' % alias[0:2], 'green') - if hightlight and len(hightlight)>0: - print (group_hl_formatter(key, hightlight)) - print ('\n'.join([alias_hl_formatter(alias, hightlight) for alias in aliases])) + if highlight and len(highlight)>0: + print (group_hl_formatter(key, highlight)) + print ('\n'.join([alias_hl_formatter(alias, highlight) for alias in aliases])) else: print (group_formatter(key)) print ('\n'.join([alias_formatter(alias) for alias in aliases])) |