and interpets it as a wildcard glob that will match a file named
,
$ echo 'Welcome To Here' | tr [:space:] '\t'
zsh: no matches found: [:space:]
,
$ echo 'Welcome To Here' | tr [:space:] '\t'
Welcome To Here
,
,zsh
with the [:space:]
shell option enabled - your setup presumably turns it off somewhere. Just wrap it in quotes to prevent expansion::
s
由于某些原因,在zsh中,我无法使用[:space:]模式来匹配所有的空白字符。p
例如:[:空格:]模式。 a
但是如果我在bash中这样做,就可以正常工作了。c
这会不会是我的 ~.zshrc 有什么问题,还是 zsh 不支持这个?我也在使用 oh my zsh。e
bash
failglob
出于某种原因,在zsh中,我无法使用[:space:]模式来匹配所有的空白字符,例如: $ echo 'Welcome To Here' (欢迎来到这里