Added a --no-color option, to disable --color

This commit is contained in:
John Wiegley 2009-06-22 00:27:00 +01:00
parent 7d5f02f5cc
commit 407d057f4d
2 changed files with 5 additions and 0 deletions

View file

@ -565,6 +565,7 @@ option_t<report_t> * report_t::lookup_option(const char * p)
break;
case 'n':
OPT_CH(collapse);
else OPT(no_color);
else OPT(no_total);
break;
case 'o':

View file

@ -561,6 +561,10 @@ public:
parent->HANDLER(period_).on(string("--monthly"), "monthly");
});
OPTION_(report_t, no_color, DO() {
parent->HANDLER(color).off();
});
OPTION(report_t, no_total);
OPTION__