-
-
Couldn't load subscription status.
- Fork 1.5k
feat(cli): add @bomb.sh/tab completions #8639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be good to add some documentation for this and stick a demo to the PR so others see how it behaves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a slight change required. and then let's make it ready for review.
|
will make this PR ready for preview after the 0.0.5 release of tab which changes the license and reduces the size of the lib by ~ 70% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see what the team thinks about this one!
| .command('[...filters]', undefined, options) | ||
| .action((filters, options) => start('test', filters, options)) | ||
|
|
||
| setupTabCompletions(cli) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it async?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is, but that's intentional here. I wanted to keep createCLI sync while the completions setup async in the background
|
Hey @sheremet-va ! Thanks for yout review! I have addressed the feedback points. providing value completions is entirely customizable. If you would like specific options and flags to have autocompletion values, please let me know which ones need what values and I can add them. The current implementation focuses on the command and option completions more than the values of the options. |
Description
This PR introduces tab completion functionality for the vitest cli, improving developer experience by allowing shell(zsh, powershell, fish, bash) autocompletion for commands, options, values, and flags. With this PR, users can navigate available commands, options and values more efficiently and faster with speeding up workflow.
A small video of how this works:
vitest-compressed.mp4
A small documentation of how CLIs can integrate tab ( in this case, I'm using the CAC adapter )
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.Tests
pnpm test:ci.Documentation
pnpm run docscommand.Changesets
feat:,fix:,perf:,docs:, orchore:.