Skip to content

Add tab completion for CLI commands#519

Merged
bborn merged 3 commits intomainfrom
task/2041-add-tab-completion-for-cli-commands
Mar 22, 2026
Merged

Add tab completion for CLI commands#519
bborn merged 3 commits intomainfrom
task/2041-add-tab-completion-for-cli-commands

Conversation

@bborn
Copy link
Owner

@bborn bborn commented Mar 22, 2026

Summary

  • Adds ty completion [bash|zsh|fish|powershell] command for generating shell completion scripts
  • Adds dynamic completions for task IDs (with status/title), project names, task types, executor names, statuses, and setting keys
  • Wires up ValidArgsFunction on all commands that accept task IDs, project names, type names, or setting keys
  • Registers flag completions for --project, --type, --executor, and --status flags on create, list, and update commands

Test plan

  • All existing tests pass
  • New completion tests pass (6 tests covering command structure, shell output generation, status completions, setting keys, executors, and statuses)
  • go build, go vet clean
  • goimports formatting verified
  • Manual: source <(ty completion zsh) then verify tab completion works for commands, task IDs, flags

🤖 Generated with Claude Code

bborn and others added 3 commits March 18, 2026 10:04
Add `ty completion [bash|zsh|fish|powershell]` command using Cobra's
built-in shell completion support. Includes dynamic completions for:

- Task IDs (with status and title descriptions)
- Project names (for args and --project flag)
- Task statuses (for `status` command and --status flag)
- Task types (for args and --type flag)
- Executor names (for --executor flag)
- Setting keys (for `settings set` command)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Keep both the new serve command from main and the completion command
from this branch.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@bborn bborn merged commit df4f927 into main Mar 22, 2026
3 of 4 checks passed
@bborn bborn mentioned this pull request Mar 22, 2026
1 task
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