From: tfheen Date: Thu, 1 Dec 2011 12:28:10 +0000 (+0000) Subject: chpwd_profiles is the future X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85277e82c0f837731d73c157859469884de69464;p=dotfiles chpwd_profiles is the future git-svn-id: file:///svn/tfheen/trunk/dotfiles@1505 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- diff --git a/zshrc b/zshrc index 64c00dd..4e40d01 100644 --- a/zshrc +++ b/zshrc @@ -152,8 +152,30 @@ function chpwd_profiles() { } +zstyle ':chpwd:profiles:'${HOME}'/debian(|/|/*)' profile debian +zstyle ':chpwd:profiles:(|/|*)(varnish|libvmod)*(|/|/*)' profile varnish + +function chpwd_profile_varnish() { + [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1 + print "chpwd(): Switching to profile: $profile" + GIT_AUTHOR_EMAIL=tfheen@varnish-software.com +} + +function chpwd_profile_default() { + [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1 + print "chpwd(): Switching to profile: $profile" + GIT_AUTHOR_EMAIL=tfheen@err.no +} + +function chpwd_profile_debian() { + [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1 + print "chpwd(): Switching to profile: $profile" + GIT_AUTHOR_EMAIL=tfheen@err.no +} + chpwd_functions=( ${chpwd_functions} chpwd_profiles ) +chpwd_profiles fpath=( "$HOME/.zshfunc" "$fpath[@]" ) export FPATH # Only unique entries please.