mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-03 04:20:01 +02:00
change: add compatibility with python2 & python3.
- add compatibility. - add termcolor.py. - remove aliass(search), just use acs. - detect python.
This commit is contained in:
parent
fd303f9107
commit
dda7a6b25f
3 changed files with 182 additions and 17 deletions
|
|
@ -34,12 +34,12 @@ def pretty_print_group(key, aliases, hightlight=None):
|
|||
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])
|
||||
print (group_hl_formatter(key, hightlight))
|
||||
print ('\n'.join([alias_hl_formatter(alias, hightlight) for alias in aliases]))
|
||||
else:
|
||||
print group_formatter(key)
|
||||
print '\n'.join([alias_formatter(alias) for alias in aliases])
|
||||
print
|
||||
print (group_formatter(key))
|
||||
print ('\n'.join([alias_formatter(alias) for alias in aliases]))
|
||||
print ('')
|
||||
|
||||
def pretty_print(cheatsheet, wfilter):
|
||||
sorted_key = sorted(cheatsheet.keys())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue