这是在进行 certbot 通配符 ssl 证书申请时候发生的坑。

1
2
3
certbot certonly --nginx --preferred-challenges dns --manual  -d *.maywzh.com --server https://acme-v02.api.letsencrypt.org/directory
zsh: no matches found: *.maywzh.com

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

1
2
3
find . -name *.h

no matches found: *.h

后来查看了一些资料才知道,这是由于 zsh 导致的。

具体原因:

因为 zsh 缺省情况下始终自己解释这个 *.h,而不会传递给 find 来解释。

解决办法:

在~/.zshrc 中加入:

1
setopt no_nomatch

然后运行

1
source ~/.zshrc

然后恢复正常