Skip to content

feat: add -t/--time flag to note - #2

Merged
markspl merged 3 commits into
mainfrom
feat/note-time-flag
Nov 8, 2026
Merged

markspl merged 3 commits into
mainfrom
feat/note-time-flag

Conversation

@markspl

@markspl markspl commented Nov 8, 2026

Copy link
Copy Markdown
Owner

What

tl note now accepts -t / --time, like tl add.

tl note -t 14:30 Decided to postpone
tl note --time 20m Called the client

The value is a clock time (14:30) or how long ago it happened (1h30m, 1h, 15m).

Changes

  • note reuses _get_time_flag and _parse_time_flag from add.
  • _get_time_flag takes a prefix argument, so its error says tl note: or tl add:.
  • note used to reject -t with "flag not allowed". It no longer does.
  • Updated the note line in the README command list and in the tl help output. The time value help now reads "how long ago it happened".

Tests

  • Added note tests for a clock time, a duration, a bad value, a missing value and missing text.
  • Added a test for the tl note prefix in _get_time_flag.
  • Removed test_time_flag_rejected which tested the old behaviour.

@markspl
markspl merged commit 0398284 into main Nov 8, 2026
1 check passed
@markspl
markspl deleted the feat/note-time-flag branch November 8, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant