我在我的 Arch Linux 上安装了 zsh + zprezto。每次打开控制台时,都会显示一个烦人的警告:
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
按照[已解决] grep:警告:GREP_OPTIONS已弃用中的指示并不能解决问题。我该如何消除这个警告?
我在我的 Arch Linux 上安装了 zsh + zprezto。每次打开控制台时,都会显示一个烦人的警告:
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
按照[已解决] grep:警告:GREP_OPTIONS已弃用中的指示并不能解决问题。我该如何消除这个警告?
只需要使用以下命令取消设置环境变量:
unset GREP_OPTIONS
由于 GREP_OPTIONS
已经被弃用,如果您已经设置了它的值,例如:
export GREP_OPTIONS='--exclude-dir=__pycache__'
将其移动到一个别名中:
alias grep='grep --exclude-dir=__pycache__'
~/.zpreztorc
中导致了烦人的警告消息的显示:zstyle ':prezto:*:*' color 'yes'
我只是将其注释掉了,现在一切都好了。警告消失了。