2

我的默认 shell 是 zsh ( /bin/zsh)。当我第一次打开终端会话时,字符的大括号扩展不起作用,而数字扩展工作正常。运行zsh以打开一个新的 shell 解决了这个问题:

$ zsh --version
zsh 5.0.8 (x86_64-apple-darwin14.3.0)
$ echo {0..9}
0 1 2 3 4 5 6 7 8 9
$ echo {a..z}
{a..z} 
$ zsh
$ echo {a..z}
a b c d e f g h i j k l m n o p q r s t u v w x y z
$ zsh --version
zsh 5.0.8 (x86_64-apple-darwin14.3.0)

这发生在终端和 iTerm 中,并且不是由于任何设置.zshrc(在没有该文件的情况下不变)。zsh 版本在这两种情况下都是相同的,并且大于 5.0.7,所以这个相关问题没有解释。我认为它与登录/非登录 shell 之间的区别有某种关系,但我不知道它为什么会这样做。

为什么 zsh 不在这里执行大括号扩展?

4

0 回答 0