执行 rake 命令时无法理解 zsh 错误
当我执行 %rake College:create[demo]
时,出现以下错误,
zsh: no matches found: college:create[demo]
有人有解决方案吗?
当我执行 rake -T 时,这就是我作为输出行之一得到的结果:
rake college:create[config_name] # create a college profile
所以,它是一个有效的命令,但 zsh 仍然显示错误。
When I execute %rake college:create[demo]
, I get the following error,
zsh: no matches found: college:create[demo]
Anybody has a solution for this?
when I execute rake -T
, this is what I get when as one of the lines of the output:
rake college:create[config_name] # create a college profile
So, it is a valid command, but still zsh shows the error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试使用:
Try with:
您还可以使用 noglob
或仅在 .zshrc 中为其指定别名
You can also use noglob
or just alias it in your .zshrc
zsh
正在尝试将您的命令解释为通配符文件规范。college:create[demo]
将扩展到与以下之一匹配的现有文件列表:此页面显示了
zsh
执行的一些通配符,本例中的具体示例是:您需要对参数进行转义,以便
zsh
不会认为您给了它通配符,例如:zshexpn 的手册页显示了在命令行上完成的所有扩展很棒< /em> 细节。搜索
Filename Generation
以获取xyzzy[demo]
样式生成。zsh
is trying to interpret your command as a wildcard file specication.college:create[demo]
will expand to the list of existing files that match one of:This page shows some of the wildcarding that
zsh
performs, the specific example in this case being:You need to escape the argument so that
zsh
doesn't think you're giving it a wildcard, such as with:The manpage for zshexpn shows all the expansions done on command lines in great detail. Search for
Filename Generation
for thexyzzy[demo]
style generations.如果您通过
bundle exec
或从bin/
dir 使用 rake,请将以下内容添加到您的 .zshrc 文件中:If you are using rake via
bundle exec
or frombin/
dir add this to you .zshrc file: