From e8e28c794bfb12fe1c9562c5bd124688ce45fc8e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 22 Jun 2010 21:56:19 -0400 Subject: Added report query modifiers: for, since, until Now instead of ledger reg expense -p "this month", you can say: ledger reg expense for this month And as a shorthand for "for until this month", you can just say "until this month" or "since this month". --- src/precmd.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/precmd.cc') diff --git a/src/precmd.cc b/src/precmd.cc index d9977ab6..8ca27fd8 100644 --- a/src/precmd.cc +++ b/src/precmd.cc @@ -202,21 +202,19 @@ value_t query_command(call_scope_t& args) query_t query(args.value(), report.what_to_keep(), ! report.HANDLED(collapse)); - if (query.has_predicate(query_t::QUERY_LIMIT)) { + if (query.has_query(query_t::QUERY_LIMIT)) { call_scope_t sub_args(static_cast(args)); - sub_args.push_back - (string_value(query.get_predicate(query_t::QUERY_LIMIT).print_to_str())); + sub_args.push_back(string_value(query.get_query(query_t::QUERY_LIMIT))); parse_command(sub_args); } - if (query.has_predicate(query_t::QUERY_SHOW)) { + if (query.has_query(query_t::QUERY_SHOW)) { out << std::endl << _("====== Display predicate ======") << std::endl << std::endl; call_scope_t disp_sub_args(static_cast(args)); - disp_sub_args.push_back - (string_value(query.get_predicate(query_t::QUERY_SHOW).print_to_str())); + disp_sub_args.push_back(string_value(query.get_query(query_t::QUERY_SHOW))); parse_command(disp_sub_args); } -- cgit v1.2.3