# T11: Multi-Constraint Sorting Feature

Add `--sort-by date|amount|id` and `--order asc|desc` to `python3 -m ledger list`. The default is date ascending. For every sort, ties on the primary key break by ascending Unicode code point of `id`; with `--sort-by id --order desc`, the primary sort is id descending. Sorting must run after the existing date filtering and must not change filter results.

Illegal sort fields or directions must be rejected by the CLI as standard argument errors with a non-zero exit status. Keep the existing default list fields, date-filter behavior and public interfaces compatible; update tests and add a short usage note; do not delete or modify existing tests or add runtime dependencies. Run `python3 -m unittest discover -s tests -v` and report the actual result.
