Mac下安装HomeBrew和Ag(the silver searcher)

HomeBrew

Homebrew(或者MacPorts)类似于Linux平台下的yum和apt-get工具,是优秀的包管理工具。这里我选择了Homebrew。(为什么呢,因为我只需要一个工具就够了O(∩_∩)O~)

关于Homebrew, 戳戳戳这里 http://brew.sh/index_zh-cn.html

安装脚本 (Mac自带Ruby,无需安装)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

升级brew

brew update 

卸载brew
//

查看已安装包

brew list

The Silver Searcher

The Silver Searcher is a tool for searching code. It started off as a clone of Ack, but their feature sets have since diverged slightly. In typical usage, Ag is 5-10x faster than Ack. See the GitHub page for more info.
就是类似Ack(Ruby实现),但是用c实现的,所以更快。
点击这里戳戳戳 http://geoff.greer.fm/ag/

安装 ag(the silver searcher)

brew install the_silver_searcher

卸载ag

brew uninstall the_silver_searcher

如果出现权限问题, 如 cannot write之类 可以:

sudo chown -R David /usr/local

我在安装ag时,出现了 error “/usr/local/bin is not writable”

sudo chown -R David /usr/local/bin
sudo chown -R David /usr/local/share

当 brew install the_silver_searcher Warning: the_silver_searcher-0.31.0 already installed, it’s just not linked
可以:

brew link the_silver_searcher

你可能感兴趣的:(mac,配置)