diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-25 01:15:53 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-25 01:15:53 -0400 |
commit | ac8e27a4b85376d94704b6bf8b85e8e82f457f42 (patch) | |
tree | 3379bb6136d71682cb0ec0f70ba72dbceef5b729 | |
parent | 76be84320101d4a931c3b67aaf193b2503e36a71 (diff) | |
download | fork-ledger-ac8e27a4b85376d94704b6bf8b85e8e82f457f42.tar.gz fork-ledger-ac8e27a4b85376d94704b6bf8b85e8e82f457f42.tar.bz2 fork-ledger-ac8e27a4b85376d94704b6bf8b85e8e82f457f42.zip |
Added a new --depth option
-rw-r--r-- | doc/ledger.1 | 3 | ||||
-rw-r--r-- | src/option.h | 2 | ||||
-rw-r--r-- | src/pyinterp.h | 1 | ||||
-rw-r--r-- | src/report.cc | 1 | ||||
-rw-r--r-- | src/report.h | 5 |
5 files changed, 9 insertions, 3 deletions
diff --git a/doc/ledger.1 b/doc/ledger.1 index 290a6b49..f655ef3f 100644 --- a/doc/ledger.1 +++ b/doc/ledger.1 @@ -1,4 +1,4 @@ -.Dd February 24, 2009 +.Dd February 25, 2009 .Dt ledger 1 .Sh NAME .Nm ledger @@ -120,6 +120,7 @@ See \fB\-\-basis\fR. .It Fl \-date-format Ar DATEFMT Pq Fl y .It Fl \-date-width Ar INT .It Fl \-debug Ar STR +.It Fl \-depth Ar INT .It Fl \-deviation Pq Fl D .It Fl \-display Ar EXPR Pq Fl d .It Fl \-display-amount Ar EXPR diff --git a/src/option.h b/src/option.h index 538de60a..01c821d9 100644 --- a/src/option.h +++ b/src/option.h @@ -46,7 +46,7 @@ #ifndef _OPTION_H #define _OPTION_H -#include "scope.h" +#include "interactive.h" namespace ledger { diff --git a/src/pyinterp.h b/src/pyinterp.h index 1b0f4059..a550e5ba 100644 --- a/src/pyinterp.h +++ b/src/pyinterp.h @@ -32,7 +32,6 @@ #ifndef _PYINTERP_H #define _PYINTERP_H -#include "interactive.h" #include "session.h" #if defined(HAVE_BOOST_PYTHON) diff --git a/src/report.cc b/src/report.cc index 90a8399d..af4bff67 100644 --- a/src/report.cc +++ b/src/report.cc @@ -434,6 +434,7 @@ option_t<report_t> * report_t::lookup_option(const char * p) case 'd': OPT(daily); else OPT(date_format_); + else OPT(depth_); else OPT(deviation); else OPT_(display_); else OPT(display_amount_); diff --git a/src/report.h b/src/report.h index a98286a9..5ab29736 100644 --- a/src/report.h +++ b/src/report.h @@ -313,6 +313,11 @@ public: on("%y-%b-%d"); }); + OPTION_(report_t, depth_, DO_(scope) { + interactive_t args(scope, "l"); + parent->HANDLER(limit_).on(string("depth<=") + args.get<string>(0)); + }); + OPTION_(report_t, deviation, DO() { // -D parent->HANDLER(display_total_).set_expr("amount_expr-total_expr/count"); }); |