77 'cyan_background': (46, 49), |
77 'cyan_background': (46, 49), |
78 'white_background': (47, 49), } |
78 'white_background': (47, 49), } |
79 |
79 |
80 def render_effects(text, *effects): |
80 def render_effects(text, *effects): |
81 'Wrap text in commands to turn on each effect.' |
81 'Wrap text in commands to turn on each effect.' |
82 start = [] |
82 start = [ str(_effect_params['none'][0]) ] |
83 stop = [] |
83 stop = [] |
84 for effect in effects: |
84 for effect in effects: |
85 start.append(str(_effect_params[effect][0])) |
85 start.append(str(_effect_params[effect][0])) |
86 stop.append(str(_effect_params[effect][1])) |
86 stop.append(str(_effect_params[effect][1])) |
|
87 stop.append(str(_effect_params['none'][1])) |
87 start = '\033[' + ';'.join(start) + 'm' |
88 start = '\033[' + ';'.join(start) + 'm' |
88 stop = '\033[' + ';'.join(stop) + 'm' |
89 stop = '\033[' + ';'.join(stop) + 'm' |
89 return start + text + stop |
90 return start + text + stop |
90 |
91 |
91 def colorstatus(statusfunc, ui, repo, *pats, **opts): |
92 def colorstatus(statusfunc, ui, repo, *pats, **opts): |