小编YOL*_*OLT的帖子

当作为 sh 启动时,Zsh 不执行大括号扩展?

Zsh 不执行大括号扩展,但仅在使用/bin/sh链接调用时才执行。

$ /bin/sh --version
zsh 5.8 (x86_64-apple-darwin20.0)
$ zsh --version
zsh 5.8 (x86_64-apple-darwin20.0)
$ /bin/sh -c "echo {1..3}"
{1..3}
$ zsh -c "echo {1..3}"
1 2 3
Run Code Online (Sandbox Code Playgroud)

这是怎么回事?

shell zsh sh brace-expansion

2
推荐指数
1
解决办法
235
查看次数

标签 统计

brace-expansion ×1

sh ×1

shell ×1

zsh ×1