move the jj_chpwd addition out of the function file into the environment file
authorJoerg Jaspert <joerg@ganneff.de>
Tue, 23 Apr 2013 15:39:51 +0000 (17:39 +0200)
committerJoerg Jaspert <joerg@ganneff.de>
Tue, 23 Apr 2013 15:39:51 +0000 (17:39 +0200)
.zsh/05_Functions.zsh
.zsh/10_Environment.zsh

index 151d53c..94ae850 100644 (file)
@@ -56,14 +56,6 @@ _jj_chpwd()
        fi
 }
 
-if is434 ; then
-    add-zsh-hook chpwd _jj_chpwd
-else
-    function chpwd() {
-        _jj_chpwd
-    }
-fi
-
 # Idea taken from oh-my-zsh, but code is different
 function dirpersistrestore () {
     if [ -f ${DIRSTACKFILE} ]; then
index 3939b41..87599a1 100644 (file)
@@ -2,6 +2,15 @@
 
 export SHELL=$(which zsh)
 
+# Show some git info on cd
+if is434 ; then
+    add-zsh-hook chpwd _jj_chpwd
+else
+    function chpwd() {
+        _jj_chpwd
+    }
+fi
+
 if [ -w $ZDOTDIR ]; then
     mkdir -p ${ZDOTDIR}/var
        HISTFILE=$ZDOTDIR/var/history.$USER.$HOST