Skip to content

Conversation

@llambeau
Copy link
Contributor

Goal: Make emb tasks run <TAB> autocomplete with available task names.

This commit adds 4 integration tests that currently fail:

  • emb tasks run → all task IDs
  • emb run → all task IDs (alias)
  • emb tasks run dep → filtered matches
  • emb tasks run test → filtered matches

The tests fail because oclif's autocomplete plugin doesn't support argument completion. Next step: implement custom completion logic.

Implement tab completion for task names in 'emb tasks run' and 'emb run'
commands for both bash and zsh shells.

Changes:
- Add postrun hook to patch oclif-generated completion scripts
- For bash: inject _emb_complete_tasks function that queries task IDs
- For zsh: use compadd instead of _describe to handle colons in task IDs
- Add comprehensive integration tests for both shells
- Tests define emb as a function to work in CI without global install

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@llambeau llambeau force-pushed the improve-autocompletion branch from 69d9821 to 80bec1e Compare January 15, 2026 16:37
@llambeau llambeau merged commit 6c90657 into master Jan 15, 2026
4 checks passed
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.

2 participants