标题:mac下的zsh不兼容的坑-zsh:no matches found 出处:向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除 时间:Wed, 21 Oct 2020 13:24:16 +0000 作者:jackxiang 地址:http://jackxiang.com/post/10726/ 内容: 背景:自已写了一个简单的命令行打开网页的go程序。运行时传入参数出现: ./chrome http://gitlab.xx.xxxx.xx/irdcops/k8s.xx.xxxx.xx/-/merge_requests/new?merge_request%5Bsource_branch%5D=xiangdong zsh: no matches found: http://gitlab.xx.xxxx.xx/irdcops/k8s.xx.xxxx.xx/-/merge_requests/new?merge_request%5Bsource_branch%5D=xiangdong 搜索了一下,找到出现的原因如下: 在 zsh 下使用 find 命令查找指定目录下所有头文件时出现问题: find . -name *.h 1 no matches found: *.h 后来查看了一些资料才知道,这是由于zsh导致的。 具体原因: 因为zsh缺省情况下始终自己解释这个 *.h,而不会传递给 find 来解释。 解决办法: 在~/.zshrc中加入: setopt no_nomatch, 然后进行source .zshrc命令 解决方法: ~/.zshrc 文件加入: setopt no_nomatch 之后,更新配置 source ~/.zshrc 来自:https://blog.csdn.net/u012675539/article/details/52079013 Generated by Jackxiang's Bo-blog 2.1.1 Release