I have this in zshrc on OS X and it works fine from vim for me. Note that I have also applied this [zsh-fix](https://github.com/thoughtbot/laptop/blob/master/mac-components/zsh-fix)