OSX10 iterm + ohmyzsh 下 npm 后面跟tab会报错。
➜ ~ npm egrep: empty (sub)expression
egrep: empty (sub)expression
egrep: empty (sub)expression
有遇到同样问题的吗?
在~/.zshrc
最后追加
. <(npm completion)
重启iterm,解决。
参考:https://www.npmjs.org/doc/cli/npm-completion.html