Skip to content

Instantly share code, notes, and snippets.

@devth
Forked from wayneeseguin/gist:774785
Created August 18, 2011 04:42
Show Gist options
  • Save devth/1153304 to your computer and use it in GitHub Desktop.
Save devth/1153304 to your computer and use it in GitHub Desktop.
zsh chpwd example
my_chpwd()
{
if [[ -s "$PWD/.set_env" ]] ; then
source "$PWD/.set_env"
echo '(automatically sourced .set_env)'
fi
}
add-zsh-hook chpwd my_chpwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment