comby-tools / comby

A code rewrite tool for structural search and replace that supports ~every language.
https://comby.dev
Apache License 2.0
2.4k stars 62 forks source link

request: -config without recursive directory search #353

Closed tekumara closed 1 year ago

tekumara commented 1 year ago

-config triggers a recursive directory search that ignores any provided filenames, eg:

comby -config comby-bump.toml setup.py pyproject.toml
WARNING: Templates specified on the command line AND using -templates. Ignoring match
      and rewrite templates on the command line and only using those in directories.

It would nice to be able to run a template against a specific set of files, eg: in the above example, run comby-bump.toml against setup.py pyproject.toml only

tekumara commented 1 year ago

Ah -f can be used here! I didn't realise it was for more than just extensions. The flag name misled me.

eg:

comby -config comby-bump.toml -f setup.py,pyproject.toml