Key ls --uniq on the description alone

The listing keyed on account and description, so a payee seen on two accounts
was two rows. The rule builder groups by description alone and showed one, and
the two lists answer the same question -- what still needs a rule -- so the one
run from the shell overstated the work left and disagreed with the one on
screen.

A rule matches on the description and only optionally narrows to an account, so
one payee is one pattern to write however many accounts it turns up on. The
account column goes with the key; --account is still how the listing is scoped
to one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-15 20:10:57 +02:00
co-authored by Claude Opus 5
parent ebf7770569
commit 5289250400
3 changed files with 50 additions and 41 deletions
+16 -11
View File
@@ -78,26 +78,31 @@ imported — creating an `account.toml` is not enough on its own. Run
`money import` (or press `i` in the TUI) after adding one.
`--uniq` turns `ls` into a list of patterns still to write rather than a list of
rows to read: one line per distinct account and description, since fifty visits
to the same shop are one glob, not fifty lines. Descriptions print exactly as a
glob sees them — upper-cased with whitespace collapsed — so two statements that
worded the same payee differently collapse into the one row they deserve, and a
pattern written from the list matches what the list showed you.
rows to read: one line per distinct description, since fifty visits to the same
shop are one glob, not fifty lines. Descriptions print exactly as a glob sees
them — upper-cased with whitespace collapsed — so two statements that worded the
same payee differently collapse into the one row they deserve, and a pattern
written from the list matches what the list showed you.
```
$ money ls --untagged --uniq
ACCOUNT DESCRIPTION
checking KAUFLAND 4412 SOFIA
checking LIDL SOFIA 4412
savings INTEREST PAID
DESCRIPTION
INTEREST PAID
KAUFLAND 4412 SOFIA
LIDL SOFIA 4412
3 distinct descriptions
```
The account is not part of what makes a row distinct. A rule matches on the
description and only optionally narrows to an account, so one payee seen on two
accounts is still one pattern to write — and it is one row in the rule builder
on `4`, which groups the same way. Pass `--account` to scope the listing
instead.
It composes with the other filters (`--account`, `--month`, `--search`), and
`--limit` caps the rows printed, saying how many it held back. It cannot be
combined with `--wide`: a reported balance belongs to one transaction, and
there is nothing sensible to print for a whole group of them.
combined with `--wide`, whose columns all belong to a single transaction.
### TUI keys