美文网首页
zsh无法匹配*命令

zsh无法匹配*命令

作者: 自信的末日菇 | 来源:发表于2020-03-23 22:33 被阅读0次

问题

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

解决

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

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

相关文章

网友评论

      本文标题:zsh无法匹配*命令

      本文链接:https://www.haomeiwen.com/subject/cmngyhtx.html