Is it possible to git grep for tabs?

前端 未结 3 578
甜味超标
甜味超标 2020-12-14 01:01

This question specifies that -P allows GNU grep to grep for a tab

grep -P \'\\t\' config/file.txt

However, using git gre

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-14 01:21

    I cannot find a regexp notation for a tab that will work, but it will happily search for a literal tab if you can pass one in. In bash, that would be

    git grep $'\t'
    

提交回复
热议问题