git grep 或者 ag 進行快速代碼搜索


1.git grep foo 會自動map所有包含foo的文件

2.git grep -n foo  顯示行號

3.git grep --name-only foo 只顯示文件名

4.git grep -c foo 可以查看每個文件里有多個匹配內容

5.the_sliver_searcher 可以替代git grep的查找代碼工具

https://github.com/ggreer/the_silver_searcher

 

5.1 安裝

macOS

brew install the_silver_searcher

 

 

 

5.2 搜索

https://github.com/ggreer/the_silver_searcher

 

5.3 例子 在project目錄下

ag 'dp"'

 


 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM