Use precmd hook for updating OS X proxy icon
Using the chpwd hook function causes some junk to be printed to STDOUT after
returning from a subshell wherein the working directory was changed. In rare
cases, this can cause issues with 3rd party tools. An example is this issue
with the Python virtualenvwrapper tool:
https://bitbucket.org/dhellmann/virtualenvwrapper/issue/216/lsvirtualenv-and-workon-output-broken-in
Diff
1diff --git a/plugins/terminalapp/terminalapp.plugin.zsh b/plugins/terminalapp/terminalapp.plugin.zsh
2index 2249b1e2f1d4485f6c88349636b9e6adda065d2a..6e47ee188db466f713b1203ae4918a8ddd6d8982 100644
3--- a/plugins/terminalapp/terminalapp.plugin.zsh
4+++ b/plugins/terminalapp/terminalapp.plugin.zsh
5@@ -32,7 +32,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
6 # Register the function so it is called whenever the working
7 # directory changes.
8 autoload add-zsh-hook
9- add-zsh-hook chpwd update_terminal_cwd
10+ add-zsh-hook precmd update_terminal_cwd
1112 # Tell the terminal about the initial directory.
13 update_terminal_cwd