zshrc: do not vcs_info in autofs mountpoints
authorStefan Huber <shuber@sthu.org>
Mon, 24 Dec 2012 09:10:03 +0000 (10:10 +0100)
committerStefan Huber <shuber@sthu.org>
Mon, 24 Dec 2012 09:10:03 +0000 (10:10 +0100)
dotfiles/shell/zshrc

index 92d5b02b9a9aa7ae32135fa9c64eeeaaf460920c..9e9b7fa7d94742fa41fb39b47ecfca182cc8886e 100644 (file)
@@ -112,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
 }