【发布时间】:2016-09-09 18:01:47
【问题描述】:
以下内容在 bash 中有效,但在 zsh 中无效,我不确定原因:
user@machine:~/some_git_repo$ for i in $(ls ./conf); do git --no-pager grep $i ; done
zsh shell 会为./conf 中的每个文件生成以下结果
fatal: command line, 'some_file_name.xml': Unmatched [ or [^
【问题讨论】:
-
在 bash 中这样做也不安全。