如何摆脱`grep:warning:grep_选项已被弃用;请使用别名或脚本`?
我的Arch linux上安装了zsh+zprezto。每次打开控制台时,都会显示恼人的警告:如何摆脱`grep:warning:grep_选项已被弃用;请使用别名或脚本`?,grep,zsh,archlinux,prezto,Grep,Zsh,Archlinux,Prezto,我的Arch linux上安装了zsh+zprezto。每次打开控制台时,都会显示恼人的警告: grep: warning: GREP_OPTIONS is deprecated; please use an alias or script zstyle ':prezto:*:*' color 'yes' 按照中的说明操作没有帮助。如何消除此警告?在~/.zpreztorc中的以下设置导致显示恼人的警告消息: grep: warning: GREP_OPTIONS is deprecated
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
zstyle ':prezto:*:*' color 'yes'
按照中的说明操作没有帮助。如何消除此警告?在
~/.zpreztorc
中的以下设置导致显示恼人的警告消息:
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
zstyle ':prezto:*:*' color 'yes'
我只是把它注释掉了,现在没事了。警告消失。只需使用以下命令取消设置环境变量:
unset GREP_OPTIONS
由于
GREP\u OPTIONS
不推荐使用,如果您为其设置了值,例如
export GREP\u OPTIONS='--exclude dir=\uuuuu pycache\uuuuu'
只需将其移动到别名:
alias grep='grep--exclude dir=\uuuu pycache\uuuu'