summaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-23 18:23:31 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-23 18:23:31 -0400
commit73e2abd1b2e2bacbd353999a7b3edd95a04112c4 (patch)
tree4ae4a6a5355913345877b593bcc530f001660b26 /main.cc
parent632a37034a4d3a3cc2ad2bb786709c2497c5c97f (diff)
downloadfork-ledger-73e2abd1b2e2bacbd353999a7b3edd95a04112c4.tar.gz
fork-ledger-73e2abd1b2e2bacbd353999a7b3edd95a04112c4.tar.bz2
fork-ledger-73e2abd1b2e2bacbd353999a7b3edd95a04112c4.zip
a little cleanup; reversed the meaning of -z and -p (to be more mnemonic)
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/main.cc b/main.cc
index 30316bb8..81a5d1e5 100644
--- a/main.cc
+++ b/main.cc
@@ -500,8 +500,9 @@ int main(int argc, char * argv[], char * envp[])
// filter_transactions will only pass through transactions
// matching the `display_predicate'.
- formatter.reset(new filter_transactions(formatter.release(),
- config->display_predicate));
+ if (! config->display_predicate.empty())
+ formatter.reset(new filter_transactions(formatter.release(),
+ config->display_predicate));
// calc_transactions computes the running total. When this
// appears will determine, for example, whether filtered
@@ -560,8 +561,9 @@ int main(int argc, char * argv[], char * envp[])
// This filter_transactions will only pass through transactions
// matching the `predicate'.
- formatter.reset(new filter_transactions(formatter.release(),
- config->predicate));
+ if (! config->predicate.empty())
+ formatter.reset(new filter_transactions(formatter.release(),
+ config->predicate));
// Once the filters are chained, walk `journal's entries and start
// feeding each transaction that matches `predicate' to the chain.