diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-08 01:00:16 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-08 01:00:16 -0600 |
commit | 113fb0ee6a520dccdcd18a634f7ee73acd8ee488 (patch) | |
tree | e8038d74b59e2d71cabbfefc3fda5453332a5b77 /src | |
parent | 21e8b7f6f0a182f67899c5cd3689a5e646d8ed4a (diff) | |
download | fork-ledger-113fb0ee6a520dccdcd18a634f7ee73acd8ee488.tar.gz fork-ledger-113fb0ee6a520dccdcd18a634f7ee73acd8ee488.tar.bz2 fork-ledger-113fb0ee6a520dccdcd18a634f7ee73acd8ee488.zip |
Added --historical option
Diffstat (limited to 'src')
-rw-r--r-- | src/report.cc | 3 | ||||
-rw-r--r-- | src/report.h | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/report.cc b/src/report.cc index ba70d1d3..26e6da0c 100644 --- a/src/report.cc +++ b/src/report.cc @@ -924,11 +924,9 @@ option_t<report_t> * report_t::lookup_option(const char * p) case 'G': OPT_CH(gain); break; -#if 0 case 'H': OPT_CH(historical); break; -#endif case 'I': OPT_CH(price); break; @@ -1044,6 +1042,7 @@ option_t<report_t> * report_t::lookup_option(const char * p) break; case 'h': OPT(head_); + else OPT(historical); break; case 'i': OPT(invert); diff --git a/src/report.h b/src/report.h index 515b14c2..d68d1f75 100644 --- a/src/report.h +++ b/src/report.h @@ -645,6 +645,14 @@ public: }); OPTION(report_t, head_); + + OPTION_(report_t, historical, DO() { // -H + parent->HANDLER(amount_) + .set_expr(string("--historical"), + "nail_down(amount_expr, (s,d,t -> market(s,value_date,t)))"); + }); + + OPTION(report_t, inject_); OPTION_(report_t, invert, DO() { |