Skip to content

hatch test tab completion #2129

@euclio

Description

@euclio

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions