Show More
@@ -540,19 +540,23 b' def extsetup(ui):' | |||
|
540 | 540 | def debugcolor(ui, repo, **opts): |
|
541 | 541 | """show available colors and effects""" |
|
542 | 542 | global _styles |
|
543 | _styles = {} | |
|
544 | for effect in _effects.keys(): | |
|
545 |
_styles |
|
|
546 | if _terminfo_params: | |
|
547 | for k, v in ui.configitems('color'): | |
|
548 | if k.startswith('color.'): | |
|
549 | _styles[k] = k[6:] | |
|
550 |
|
|
|
551 |
_styles[k] = k[ |
|
|
552 | ui.write(('color mode: %s\n') % ui._colormode) | |
|
553 | ui.write(_('available colors:\n')) | |
|
554 | for colorname, label in _styles.items(): | |
|
555 | ui.write(('%s\n') % colorname, label=label) | |
|
543 | oldstyle = _styles | |
|
544 | try: | |
|
545 | _styles = {} | |
|
546 | for effect in _effects.keys(): | |
|
547 | _styles[effect] = effect | |
|
548 | if _terminfo_params: | |
|
549 | for k, v in ui.configitems('color'): | |
|
550 | if k.startswith('color.'): | |
|
551 | _styles[k] = k[6:] | |
|
552 | elif k.startswith('terminfo.'): | |
|
553 | _styles[k] = k[9:] | |
|
554 | ui.write(('color mode: %s\n') % ui._colormode) | |
|
555 | ui.write(_('available colors:\n')) | |
|
556 | for colorname, label in _styles.items(): | |
|
557 | ui.write(('%s\n') % colorname, label=label) | |
|
558 | finally: | |
|
559 | _styles = oldstyle | |
|
556 | 560 | |
|
557 | 561 | if os.name != 'nt': |
|
558 | 562 | w32effects = None |
General Comments 0
You need to be logged in to leave comments.
Login now