tk list: --type/--priority filters + fail-fast on unknown args#60
Open
ipreuss wants to merge 3 commits intowedow:masterfrom
Open
tk list: --type/--priority filters + fail-fast on unknown args#60ipreuss wants to merge 3 commits intowedow:masterfrom
ipreuss wants to merge 3 commits intowedow:masterfrom
Conversation
Adds `tk update <id> --field=value` for modifying YAML frontmatter fields without opening an editor. Useful for AI agents and scripts. Features: - Update single or multiple fields in one command - JSON array syntax with jq: --tags='["a", "b"]' → tags: [a, b] - Graceful fallback when jq unavailable - Proper error handling for invalid arguments/JSON Also fixes update_yaml_field to work on macOS/BSD by using awk instead of GNU-specific sed syntax for inserting new fields. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
*) catch-all in ticket-ls args loop now exits 2 with a stderr message naming the bad arg, instead of silently ignoring. Closes the silent-ignore UX trap for `ticket ls` described in M3R-eb6t. The `tk edit` reproducer in the same ticket is covered by the follow-up ticket M3R-dssb (out of M3R-dy1f scope). Ticket: M3R-eb6t
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two-commit bundle improving
tk listargument handling.Commit 1 (39af9b7) —
feat(list): add --type and --priority filters with value validation--type=<bug|feature|task|epic|chore>(long) and-t <value>(short).--priority=<0..4>(long) and-p <value>(short).awkpass; pre-validates values with stderr + exit 2 on invalid input.priorityto the awk frontmatter extraction (was previously not parsed).--status/-a/-Tfilters inplugins/ticket-ls.Commit 2 (c51d640) —
fix(list): fail-fast on unknown arguments*) shift ;;) with stderr + exit 2 naming the bad arg.tk ls --typo=fooreturned the full list with no warning.ticket list: <issue>prefix, exit 2).Tests
Full BDD suite: 13 features / 144 scenarios / 950 steps — all passed.
Order rationale
Commit 1 must land before Commit 2: hardening the catch-all before adding the new filter cases would cause `--type=` / `--priority=` / `-t` / `-p` to error on the first commit. With Commit 1 on the branch first, Commit 2 can safely fail-fast on truly unknown args.
Both commits land on the same branch (`ticket/M3R-0uem`) by design — they share the same `case`-statement and are easier to review together.