You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current output of todo list is not column-aligned, making it harder to scan visually — especially when working with long lists or variable-width fields like:
Misaligned fields make it more difficult to quickly compare tasks.
Goal
Make the output easier to read by aligning the key fields: ID, priority, and date/time.
Proposed Solutions
Option 1: Fully automatic alignment
How: Read all rows first to determine the max width of each field before formatting output.
Pros: Cleanest and most flexible — adapts perfectly to the actual data.
Cons: Requires two passes — one to measure, one to render. However, this overhead is negligible in practice, as we're already assuming the data set is small enough to fit in stdout.
Option 2: Field-specific width estimation (no full scan)
How: Avoid reading all lines by estimating widths per field:
ID: Only need the max task ID.
Priority: Assume a max width (e.g. 3 chars: !!!).
Datetime: The width of formatted or humanized datetime can be calculated from the format string.
Pros: Single-pass output, more efficient.
Cons: Slight risk of over/under-aligning in edge cases (e.g. if importance ever exceeds assumed width).
I’m happy to help implement this if there's interest in improving the task list formatting.
The text was updated successfully, but these errors were encountered:
yzx9
linked a pull request
Apr 25, 2025
that will
close
this issue
Problem
The current output of
todo list
is not column-aligned, making it harder to scan visually — especially when working with long lists or variable-width fields like:!
,!!
, etc.)humanize
is enabled)Example (content hidden for clarity):
Misaligned fields make it more difficult to quickly compare tasks.
Goal
Make the output easier to read by aligning the key fields: ID, priority, and date/time.
Proposed Solutions
Option 1: Fully automatic alignment
stdout
.Option 2: Field-specific width estimation (no full scan)
!!!
).I’m happy to help implement this if there's interest in improving the task list formatting.
The text was updated successfully, but these errors were encountered: