zshrc: do not vcs_info in autofs mountpoints
[shutils.git] / dotfiles / shell / zshrc
index 877798900e514ab6f400869bdd218fe2256f4f3c..9e9b7fa7d94742fa41fb39b47ecfca182cc8886e 100644 (file)
@@ -25,6 +25,8 @@ eval `dircolors`
 LS_COLORS="${LS_COLORS}*.divx=01;35:"
 zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
 
+TERM=xterm-256color
+
 zstyle ':completion:*' menu select
 zmodload -i zsh/complist
 
@@ -110,7 +112,13 @@ function precmd ()
        if [[ 0 -ne "${exitstatus}" ]] ; then
                PR_STUFF="${PR_RED}RET ${exitstatus}${PR_NO_COLOUR}"
        fi
-       vcs_info
+
+       # autofs always complains not being able to mount .hg/ and the like
+       if [ -r /etc/auto.master ] && grep -qe "^$PWD\s" /etc/auto.master; then
+               vcs_info_msg_0_=""
+       else
+               vcs_info
+       fi
 }