最近mac 更新到el capitan 版本,陸陸續續有發現一些小問題,其中一個就是升級了grep ,但是我使用的dotfile YADR 卻沒有更新設定,所以在使用grep 時會出現以下的warning訊息:
mac grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
找了一下YADR 的zsh 是使用prezto 的theme ,而GREP_OPTIONS這個參數是設定在:
zprezto/modules/environment/init.zsh
所以只要到這個檔案,參考patch 把原本的
| if zstyle -t ':prezto:environment:grep' color; then |
| - export GREP_COLOR='37;45' |
| - export GREP_OPTIONS='--color=auto' |
改成
| if zstyle -t ':prezto:module:utility:grep' color; then |
| + export GREP_COLOR='37;45' |
| + alias grep="$aliases[grep] --color=auto" |
打好收工~
YARD 得安裝檔可以參考我的gist - createMacEnv.sh

沒有留言:
張貼留言