LoginSignup
0
1

More than 5 years have passed since last update.

git grep の代わりに ag を使えるように設定する

Last updated at Posted at 2017-02-20

ag コマンドを使ってみようと思って git grep の代わりに ag で grep できるように設定した

基本
http://moznion.hatenadiary.com/entry/2014/08/14/124358
を参考にさせてもらって一部だけ書き換えた

git config --global alias.ag '!git ls-files | xargs ag --nogroup --color-match=1\;31 --color-path=0\;0 --color-line-number=0\;0 --pager="less -R"'

color code を一部変えたかったので
http://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
を参考に変更した

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1