Commit d12113a9 authored by Johann Visagie's avatar Johann Visagie
Browse files

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
parent 9f5a8951
...@@ -32,7 +32,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then ...@@ -32,7 +32,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
# Register the function so it is called whenever the working # Register the function so it is called whenever the working
# directory changes. # directory changes.
autoload add-zsh-hook 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. # Tell the terminal about the initial directory.
update_terminal_cwd update_terminal_cwd
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment