在~/.vimrc中,我定义了以下命令:
command! -nargs=+ Mygrep execute 'grep -I -i -r -n --exclude=*.{py~,pyc} . -e <args>'
例如,如果grep搜索的目录中没有.pyc文件,则打印的唯一消息是:
"zsh:1: no matches found: --exclude=*.py~"
与.py文件中的匹配结果不显示!你知道吗
定义不带exclude选项的命令
(command! -nargs=+ Mygrep execute 'grep -I -i -r -n . -e <args>'
)按预期工作。你知道吗
为什么exclude变量不能正常工作?你知道吗
我找到了一个合适的解决方案:
在我的.vimrc(从同事那里复制)中,我从
zsh
更改为bash
:谢谢你的提示!你知道吗
相关问题 更多 >
编程相关推荐