Renamed the pricesdb command to pricedb

This commit is contained in:
John Wiegley 2009-11-12 01:43:17 -05:00
parent 95cc364961
commit c182b7051b
3 changed files with 8 additions and 8 deletions

View file

@ -698,7 +698,7 @@ option_t<report_t> * report_t::lookup_option(const char * p)
else OPT(plot_total_format_);
else OPT(price);
else OPT(prices_format_);
else OPT(pricesdb_format_);
else OPT(pricedb_format_);
else OPT(print_format_);
else OPT(payee_width_);
else OPT(prepend_format_);
@ -1011,12 +1011,12 @@ expr_t::ptr_op_t report_t::lookup(const symbol_t::kind_t kind,
(new format_posts(*this, report_format(HANDLER(prices_format_)),
maybe_format(HANDLER(prepend_format_))),
*this, "#prices"));
else if (is_eq(p, "pricesdb"))
else if (is_eq(p, "pricedb"))
return expr_t::op_t::wrap_functor
(reporter<post_t, post_handler_ptr, &report_t::commodities_report>
(new format_posts(*this, report_format(HANDLER(pricesdb_format_)),
(new format_posts(*this, report_format(HANDLER(pricedb_format_)),
maybe_format(HANDLER(prepend_format_))),
*this, "#pricesdb"));
*this, "#pricedb"));
break;
case 'r':

View file

@ -272,7 +272,7 @@ public:
HANDLER(prepend_format_).report(out);
HANDLER(price).report(out);
HANDLER(prices_format_).report(out);
HANDLER(pricesdb_format_).report(out);
HANDLER(pricedb_format_).report(out);
HANDLER(print_format_).report(out);
HANDLER(quantity).report(out);
HANDLER(quarterly).report(out);
@ -723,11 +723,11 @@ public:
OPTION__(report_t, prices_format_, CTOR(report_t, prices_format_) {
on(none,
"%-.9(date) %-8(account) %(justify(scrub(display_amount), 12, "
"%(date) %-8(account) %(justify(scrub(display_amount), 12, "
" 2 + 9 + 8 + 12, true, color))\n");
});
OPTION__(report_t, pricesdb_format_, CTOR(report_t, pricesdb_format_) {
OPTION__(report_t, pricedb_format_, CTOR(report_t, pricedb_format_) {
on(none,
"P %(datetime) %(account) %(scrub(display_amount))\n");
});

View file

@ -1,4 +1,4 @@
pricesdb --pricesdb-format='P %(date) %(scrub(display_amount))\n'
pricedb --pricedb-format='P %(date) %(scrub(display_amount))\n'
<<<
P 2009/01/01 13:30:00 AAPL $10.00
P 2009/01/01 14:30:00 AAPL $20.00