在macos下面使用iTrem+zsh执行命令时,发现命令不支持通配符或正则字符,比如执行如下命令报错:
cat tr.txt |tr -d [:punct:] zsh: no matches found: [:punct:]
在~/.zshrc中加入
setopt no_nomatch
然后重新打开终端或者只想source ~/.zshrc即可让配置生效,然后再执行命令就没问题了。

在macos下面使用iTrem+zsh执行命令时,发现命令不支持通配符或正则字符,比如执行如下命令报错:
cat tr.txt |tr -d [:punct:] zsh: no matches found: [:punct:]
在~/.zshrc中加入
setopt no_nomatch
然后重新打开终端或者只想source ~/.zshrc即可让配置生效,然后再执行命令就没问题了。