zsh无法匹配*命令

问题

zsh试图将*通配符展开,在本地未找到对应文件,于是出现“no matches”的错误。

解决

设置nonomatch选项,让zsh匹配失败时不报错并使用原本内容。
具体做法是在~/.zshrc文件里写入setopt nonomatch

vim ~/.zshrc
setopt nonomatch
source ~/.zshrc

你可能感兴趣的:(zsh无法匹配*命令)