summaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/main.cc b/main.cc
index 8e827212..f1dbeff4 100644
--- a/main.cc
+++ b/main.cc
@@ -248,13 +248,14 @@ int parse_and_report(int argc, char * argv[], char * envp[])
item_handler<transaction_t> * formatter;
std::list<item_handler<transaction_t> *> formatter_ptrs;
- if (command == "b" || command == "E") {
+ if (command == "b" || command == "E")
formatter = new set_account_value;
- formatter = chain_formatters(command, formatter, formatter_ptrs);
- } else {
+ else if (command == "p")
+ formatter = new format_entries(*out, *format);
+ else
formatter = new format_transactions(*out, *format);
- formatter = chain_formatters(command, formatter, formatter_ptrs);
- }
+
+ formatter = chain_formatters(command, formatter, formatter_ptrs);
if (command == "e")
walk_transactions(new_entry->transactions, *formatter);