quasilyte / phpgrep

Syntax-aware grep for PHP code.
MIT License
236 stars 10 forks source link

Search in files with ctp extension #82

Closed garfildalex6 closed 2 months ago

garfildalex6 commented 3 months ago

Thanks for the work you've done. When I try to search a file with the ctp extension, it doesn't find anything. As soon as I change the file extension to php, the search occurs. The fact is that I have too many such files (this is a requirement of the CakePHP framework) and it is not possible to change the extensions for all files. Please add the ability to search in such files.

quasilyte commented 3 months ago

Please see whether the linked PR solves your issue. Use --php-ext flag to specify the extensions to scan. It's a comma-separated list that is set to php,php5,inc,phtml by default. Try setting it to php,ctp for example.

garfildalex6 commented 3 months ago

Tell me how to download the compiled file for Windows to check?

quasilyte commented 2 months ago

I released a v1.0.1 version with binaries.

If you want to build it from source, you would need Go toolchain on your machine and do:

git clone https://github.com/quasilyte/phpgrep.git
cd phpgrep
go build -o phpgrep.exe ./cmd/phpgrep

Or use a go install command:

go install github.com/quasilyte/phpgrep/cmd/phpgrep
garfildalex6 commented 2 months ago

This is wonderful! Thanks a lot! Everything works as expected!