diff options
author | thdox <thdox@free.fr> | 2015-02-22 11:44:23 +0100 |
---|---|---|
committer | thdox <thdox@free.fr> | 2016-10-27 22:05:49 +0200 |
commit | 0fce4e831e8d553cfc70bab8edef1862efa086f4 (patch) | |
tree | 07ad25315765e5bb475a68f1fd40c14c3cec5c48 | |
parent | 310370db041349c94e6984cc283be18f5a25a6ca (diff) | |
download | fork-ledger-0fce4e831e8d553cfc70bab8edef1862efa086f4.tar.gz fork-ledger-0fce4e831e8d553cfc70bab8edef1862efa086f4.tar.bz2 fork-ledger-0fce4e831e8d553cfc70bab8edef1862efa086f4.zip |
--force-color does not require anymore --color.
This was reported as Bug #1109
-rw-r--r-- | src/report.cc | 3 | ||||
-rw-r--r-- | test/baseline/opt-color.test | 2 | ||||
-rw-r--r-- | test/regress/727B2DF8.test | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/report.cc b/src/report.cc index 78ccac51..b2162034 100644 --- a/src/report.cc +++ b/src/report.cc @@ -64,6 +64,9 @@ void report_t::normalize_options(const string& verb) if (HANDLED(color) && ! isatty(STDOUT_FILENO)) HANDLER(color).off(); } + else { + HANDLER(color).on("?normalize"); + } if (! HANDLED(force_pager)) { if (HANDLED(pager_) && ! isatty(STDOUT_FILENO)) HANDLER(pager_).off(); diff --git a/test/baseline/opt-color.test b/test/baseline/opt-color.test index a7d702bd..bc4cb48c 100644 --- a/test/baseline/opt-color.test +++ b/test/baseline/opt-color.test @@ -2,7 +2,7 @@ Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00 Income:Dividends:Vanguard:VMMXX $-0.35 -test bal --color --force-color +test bal --force-color 0.350 VMMXX [34mAssets:Investments:Vanguard:VMMXX[0m [31m$-0.35[0m [34mIncome:Dividends:Vanguard:VMMXX[0m -------------------- diff --git a/test/regress/727B2DF8.test b/test/regress/727B2DF8.test index 0c32d660..ad2b903f 100644 --- a/test/regress/727B2DF8.test +++ b/test/regress/727B2DF8.test @@ -43,7 +43,7 @@ N $ Assets:Bank:Checking ; :AnotherTag: -test reg --color --force-color +test reg --force-color 04-May-01 Checking balance [34mAssets:Bank:Checking [0m $1,000.00 $1,000.00 [34mEquit:Opening Balances[0m [31m$-1,000.00[0m 0 04-May-03 Investment balance [34mAssets:Brokerage [0m 50 AAPL 50 AAPL |