diff options
Diffstat (limited to 'src/report.h')
-rw-r--r-- | src/report.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/report.h b/src/report.h index 02fd2c8d..3afb0107 100644 --- a/src/report.h +++ b/src/report.h @@ -172,6 +172,12 @@ public: return option.str(); } + optional<string> maybe_format(option_t<report_t>& option) { + if (option) + return option.str(); + return none; + } + value_t reload_command(call_scope_t&); value_t echo_command(call_scope_t& scope); @@ -252,6 +258,7 @@ public: HANDLER(period_).report(out); HANDLER(plot_amount_format_).report(out); HANDLER(plot_total_format_).report(out); + HANDLER(prepend_format_).report(out); HANDLER(price).report(out); HANDLER(prices_format_).report(out); HANDLER(pricesdb_format_).report(out); @@ -693,6 +700,8 @@ public: "%(format_date(date, \"%Y-%m-%d\")) %(quantity(scrub(display_total)))\n"); }); + OPTION(report_t, prepend_format_); + OPTION_(report_t, price, DO() { // -I parent->HANDLER(display_amount_) .set_expr(string("--price"), "price(amount_expr)"); |