summaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-01 03:44:22 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-01 03:44:22 -0400
commitea3b386062e62379c546239f2e95cb1e11c56d23 (patch)
treef200790541093b401b3a40af000a90daff7b6cb5 /main.cc
parent8ed99e621daccdebfe4fd81d9b3744ed1cdb375f (diff)
downloadfork-ledger-ea3b386062e62379c546239f2e95cb1e11c56d23.tar.gz
fork-ledger-ea3b386062e62379c546239f2e95cb1e11c56d23.tar.bz2
fork-ledger-ea3b386062e62379c546239f2e95cb1e11c56d23.zip
Added a new 'format' debugging command, which dissects the formatting
expression in its argument.
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.cc b/main.cc
index 7356a958..da5ec84f 100644
--- a/main.cc
+++ b/main.cc
@@ -217,6 +217,11 @@ static int read_and_report(ledger::report_t& report, int argc, char * argv[],
*out << expr.calc(report).strip_annotations() << std::endl;
return 0;
}
+ else if (verb == "format") {
+ format_t fmt(*arg);
+ fmt.dump(*out);
+ return 0;
+ }
// Parse the initialization file, which can only be textual; then
// parse the journal data.