diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-22 21:56:19 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-22 21:56:19 -0400 |
commit | e8e28c794bfb12fe1c9562c5bd124688ce45fc8e (patch) | |
tree | 3a6dfcaba3fae13dce2286c917aa74969a7d5be9 /src/precmd.cc | |
parent | 0648c2f6dccb5c56e66d50a255177c92e46d5fea (diff) | |
download | fork-ledger-e8e28c794bfb12fe1c9562c5bd124688ce45fc8e.tar.gz fork-ledger-e8e28c794bfb12fe1c9562c5bd124688ce45fc8e.tar.bz2 fork-ledger-e8e28c794bfb12fe1c9562c5bd124688ce45fc8e.zip |
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".
Diffstat (limited to 'src/precmd.cc')
-rw-r--r-- | src/precmd.cc | 10 |
1 files changed, 4 insertions, 6 deletions
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<scope_t&>(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<scope_t&>(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); } |