quasilyte / phpgrep

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

do case-insensitive search by default #58

Closed quasilyte closed 3 years ago

quasilyte commented 3 years ago

If case sensitivity should be strict, -case-sensitive flag can be used to match spellings literally.

Note that case insensitive mode only applies to things that are insensitive in PHP as well: function and class names, etc.

Suppose we have this PHP code (test.php):

a::f()
a::F()

New phpgrep behavior:

$ phpgrep test.php 'a::f()'
finds both a::F() and a::f()

$ phpgrep -case-sensitive test.php 'a::f()'
finds only a::f()

Refs #57

Signed-off-by: Iskander Sharipov quasilyte@gmail.com