Skip to content

Can we watch only certain filetypes? #90

Description

@cgebbe

I try to use this as a replacement for pytest-watch, which is not maintained anymore.

This works beautifully:
when-changed -s -r tests/ -c echo "hello"

However, I would like to watch only files with the PY extension like such:
when-changed -s 'tests/**/*.py' -c echo "hello"
which results in the following error using git bash on windows

OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect.

Also, I tried to use
find tests/ -name '*.py' | xargs -I{} when-changed {} -c echo "hello"
, but this doesn't work and I can't even exit from it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions