196 color.configstyles(ui_) |
196 color.configstyles(ui_) |
197 return orig(ui_, opts, cmd, cmdfunc) |
197 return orig(ui_, opts, cmd, cmdfunc) |
198 extensions.wrapfunction(dispatch, '_runcommand', colorcmd) |
198 extensions.wrapfunction(dispatch, '_runcommand', colorcmd) |
199 |
199 |
200 def extsetup(ui): |
200 def extsetup(ui): |
201 commands.globalopts.append( |
201 # change default color config |
202 ('', 'color', 'auto', |
202 for idx, entry in enumerate(commands.globalopts): |
203 # i18n: 'always', 'auto', 'never', and 'debug' are keywords |
203 if entry[1] == 'color': |
204 # and should not be translated |
204 patch = ('auto', entry[3].replace(' (EXPERIMENTAL)', '')) |
205 _("when to colorize (boolean, always, auto, never, or debug)"), |
205 new = entry[:2] + patch + entry[4:] |
206 _('TYPE'))) |
206 commands.globalopts[idx] = new |
|
207 break |
207 |
208 |
208 @command('debugcolor', |
209 @command('debugcolor', |
209 [('', 'style', None, _('show all configured styles'))], |
210 [('', 'style', None, _('show all configured styles'))], |
210 'hg debugcolor') |
211 'hg debugcolor') |
211 def debugcolor(ui, repo, **opts): |
212 def debugcolor(ui, repo, **opts): |