From 85277e82c0f837731d73c157859469884de69464 Mon Sep 17 00:00:00 2001 From: tfheen Date: Thu, 1 Dec 2011 12:28:10 +0000 Subject: [PATCH] chpwd_profiles is the future git-svn-id: file:///svn/tfheen/trunk/dotfiles@1505 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- zshrc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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. -- 2.39.5