summaryrefslogtreecommitdiffstats
path: root/zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'zshrc')
-rw-r--r--zshrc14
1 files changed, 14 insertions, 0 deletions
diff --git a/zshrc b/zshrc
index f5b4db9..469779a 100644
--- a/zshrc
+++ b/zshrc
@@ -108,6 +108,20 @@ vcs_info_wrapper() {
echo "${vcs_info_msg_0_}"
}
+CHPWD_PROFILE='default'
+function chpwd_profiles() {
+ local -x profile
+
+ zstyle -s ":chpwd:profiles:${PWD}" profile profile || profile='default'
+ if (( ${+functions[chpwd_profile_$profile]} )) ; then
+ chpwd_profile_${profile}
+ fi
+
+ CHPWD_PROFILE="${profile}"
+ return 0
+}
+chpwd_functions=( ${chpwd_functions} chpwd_profiles )
+
# update title
function precmd { title "%n@%m %~" }