mac解决zsh:no matches found问题

在 zsh 下使用 find 命令查找指定目录下所有头文件时出现问题:

1
2
3
find . -name *.list
# 报错
zsh:no matches found

解决办法:
在~/.zshrc中加入

1
setopt no_nomatch

然后让环境变量生效
source ~/.zshrc