Disable vcs_info if the function is not loaded
authorFrank Terbeck <ft@grml.org>
Fri, 22 Jul 2011 11:42:07 +0000 (13:42 +0200)
committerFrank Terbeck <ft@grml.org>
Fri, 22 Jul 2011 11:42:07 +0000 (13:42 +0200)
etc/zsh/zshrc

index a20ad49..b8c950e 100644 (file)
@@ -1305,7 +1305,7 @@ function info_print () {
 is4 && [[ $NOPRECMD -eq 0 ]] && precmd () {
     [[ $NOPRECMD -gt 0 ]] && return 0
     # update VCS information
-    vcs_info
+    (( ${+functions[vcs_info]} )) && vcs_info
 
     if [[ $TERM == screen* ]] ; then
         if [[ -n ${vcs_info_msg_1_} ]] ; then