]> err.no Git - dotfiles/commitdiff
chpwd_profiles is the future
authortfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Thu, 1 Dec 2011 12:28:10 +0000 (12:28 +0000)
committertfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Thu, 1 Dec 2011 12:28:10 +0000 (12:28 +0000)
git-svn-id: file:///svn/tfheen/trunk/dotfiles@1505 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf

zshrc

diff --git a/zshrc b/zshrc
index 64c00dd23a9beff9b96900a362093a5321f08f7e..4e40d01fb5521ac4b075217bab42518f60a873d5 100644 (file)
--- 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.