From d12113a9e89fed866db625f7e110fb62333b2746 Mon Sep 17 00:00:00 2001 From: Johann Visagie Date: Fri, 22 Nov 2013 14:59:04 +0100 Subject: [PATCH] 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 --- plugins/terminalapp/terminalapp.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/terminalapp/terminalapp.plugin.zsh b/plugins/terminalapp/terminalapp.plugin.zsh index 2249b1e2..6e47ee18 100644 --- a/plugins/terminalapp/terminalapp.plugin.zsh +++ b/plugins/terminalapp/terminalapp.plugin.zsh @@ -32,7 +32,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then # Register the function so it is called whenever the working # directory changes. autoload add-zsh-hook - add-zsh-hook chpwd update_terminal_cwd + add-zsh-hook precmd update_terminal_cwd # Tell the terminal about the initial directory. update_terminal_cwd