hatch
hatch copied to clipboard
`hatch test` tab completion
Description
hatch test should support tab-completion for test file paths (and ideally test names).
Today, running hatch test <TAB> (in zsh) completes nothing. It should instead list the available test directories.
$ hatch test <TAB>
src tests
Ideally, we could be able to find test names within the test files as well, though this would be more difficult to implement:
$ hatch test -vv tests/test_foo.py::<TAB>
test_bar
Use case/motivation
It can be tedious to manually type out the path to a test file. I would like tab-completion to help me type it faster.
Related issues
No response
Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [x] I agree to follow the Python Software Foundation's Code of Conduct
Hatch uses click, both click and Pytest already support auto completion. Have you tried ensuring both are setup in your terminal correctly for autocompletion?