Mac下安装HomeBrew和Ag(the silver searcher)
2016-03-23 00:49
1056 查看
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)"[/code]
升级brewbrew update
卸载brew
//
查看已安装包brew listThe 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
卸载agbrew 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
更新于2016.04.08
我的mac使用的bash是zsh,
当用ag时,报错:
zsh:command not found:ag
解决办法:cd ~ ls -a vim .zshrc
.zshrc是zsh shell的配置文件。
我这边是在line58的 PATH加入了我的homebrew/bin的路径
/usr/local/homebrew/bin
重启terminal就ok了。
相关文章推荐
- 什么是Mac OS X?跟Linux有什么区别
- mac下安装mysql(转载)
- mysql 修改编码 Linux/Mac/Unix/通用(杜绝修改后无法启动的情况!)
- [游戏资讯]《极品飞车16:亡命狂飙》配置需求公布
- 配置文件神器 typesafe conf 用法简介
- 配置文件神器 typesafe conf 用法简介
- Linux vs Mac:Linux 比 Mac 好的 7 个原因
- 路由器备份配置
- 路由器的基本配置
- 路由器基础配置及传输协议
- 经典配置 Vlan篇
- 备份线路的配置
- 苹果mac OS X上安装metasploit
- 交换机如何配置 新手配置交换机详细教程
- 如何进行系统配置
- 路由器的配置与调试
- DOS下内存的配置
- IIS配置文件隐患
- Validation of viewstate MAC failed.的解决方法