zsh 使用命令标志作为目录?

zsh uses command flag as directory?

当我运行:

composer require league/flysystem-aws-s3-v3 ~1.0

我明白了

zsh: no such user or named directory: 1.0

我 99% 确定我遗漏了一些明显的东西,但我并不真正精通这些东西,我发现这很难 Google。

单词 ~foo 扩展为用户 foo 主目录的绝对路径,因此 ~1.0 搜索用户 [=] 的主目录=15=]1.0。如果要避免这种解释,只需引用参数:'~1.0'.