LoginSignup
44
43

More than 5 years have passed since last update.

ag(The Silver Searcher)をインストール

Posted at

agをインストール

  • homebrew
$ brew install ag
  • ports
$ port install the_silver_searcher
  • Centos6
$ sudo rpm -ivh http://swiftsignal.com/packages/centos/6/x86_64/the-silver-searcher-0.13.1-1.el6.x86_64.rpm
  • Ubuntu 13.04
$ apt-get install software-properties-common # (if required)
$ apt-add-repository ppa:mizuno-as/silversearcher-ag
$ apt-get update
$ apt-get install silversearcher-ag
  • FreeBSD
$ pkg add the_silver_searcher
  • ソースからインストール
$ git clone https://github.com/ggreer/the_silver_searcher
$ cd the_silver_searcher 
$ ./build.sh && install

.agignore で除外設定

これを設定するだけで、お邪魔なやつが引っかからなくなるので設定をオススメします。

検索してほしくない対象を以下のように書いておくと、除外して検索してくれます。

~/.agignore
log
logs
tmp
vendor
.vim/bundle
.vim/dict
.git
lib
libs
jquery-*.js
*.swp
*.sql
*.tags*
*.gemtags*
*.csv
*.tsv
*.tmp*
*.js
*.css
*.old
*.json
*.xml
*.pdf
*.md
*.log
44
43
1

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
44
43