summaryrefslogtreecommitdiff
path: root/plugins/aliases/cheatsheet.py
diff options
context:
space:
mode:
authorJosh Soref <2119212+jsoref@users.noreply.github.com>2021-12-01 06:20:31 -0500
committerGitHub <noreply@github.com>2021-12-01 12:20:31 +0100
commit0e41181d547e2f89ffc503a7afc8b0f3991dd1a8 (patch)
treeefb25d5bca1351819a0bc0993df442bb1c49d4f8 /plugins/aliases/cheatsheet.py
parent1c1d74c5ec49e5ab7e2d664e557c61745d1995e6 (diff)
downloadzsh-0e41181d547e2f89ffc503a7afc8b0f3991dd1a8.tar.gz
zsh-0e41181d547e2f89ffc503a7afc8b0f3991dd1a8.tar.bz2
zsh-0e41181d547e2f89ffc503a7afc8b0f3991dd1a8.zip
chore: fix spelling errors across the project (#10459)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Diffstat (limited to 'plugins/aliases/cheatsheet.py')
-rw-r--r--plugins/aliases/cheatsheet.py8
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]))