diff --git a/cmd/cli/main.go b/cmd/cli/main.go index ef4ee7d..00afd6f 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -87,6 +87,10 @@ func Main() { deltas = ana.NewDefaultNormalizer().Normalize(deltas) } + if config.Query.With != "" { + deltas = deltas.Like(ledger.LikeWith(config.Query.With)) + } + switch cmd[:3] { case "bal": balances := deltas.Balances(). diff --git a/cmd/cli/query.go b/cmd/cli/query.go index e8e1a55..f5db8fb 100644 --- a/cmd/cli/query.go +++ b/cmd/cli/query.go @@ -71,10 +71,6 @@ func buildQuery(config Config, args args) (ledger.Like, error) { } } - if config.Query.With != "" { - like = andLike(like, ledger.LikeWith(config.Query.With)) - } - return like, nil }