diff options
author | John Wiegley <johnw@newartisans.com> | 2006-02-27 10:05:36 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:26 -0400 |
commit | 30a5d875f008cdb1ae73eab3922eef308ecfcd6c (patch) | |
tree | bd6732c055cd5337777979ddd3f1abaf35511cbb | |
parent | 3ba15e81a40d32c1db2f284d55b39a3f3e0f341f (diff) | |
download | fork-ledger-30a5d875f008cdb1ae73eab3922eef308ecfcd6c.tar.gz fork-ledger-30a5d875f008cdb1ae73eab3922eef308ecfcd6c.tar.bz2 fork-ledger-30a5d875f008cdb1ae73eab3922eef308ecfcd6c.zip |
(config_t::regexps_to_predicate): Don't set the display predicate to
show only matching accounts when the --related flag is in use (which
was effectively masking out the whole point of using --related with
balance reports).
-rw-r--r-- | config.cc | 25 |
1 files changed, 15 insertions, 10 deletions
@@ -130,16 +130,21 @@ config_t::regexps_to_predicate(const std::string& command, } if (i != 1 && command == "b" && account_regexp) { - if (! display_predicate.empty()) - display_predicate += "&"; - else if (! show_empty) - display_predicate += "T&"; - - if (add_predicate == 2) - display_predicate += "//"; - display_predicate += "/(?:"; - display_predicate += regexps[i]; - display_predicate += ")/"; + if (! show_related && ! show_all_related) { + if (! display_predicate.empty()) + display_predicate += "&"; + else if (! show_empty) + display_predicate += "T&"; + + if (add_predicate == 2) + display_predicate += "//"; + display_predicate += "/(?:"; + display_predicate += regexps[i]; + display_predicate += ")/"; + } + else if (! show_empty) { + display_predicate += "T"; + } } if (! account_regexp) |