]> git.phdru.name Git - dotfiles.git/blobdiff - admin/prog/bash_prompt
bash_prompt: Test if `git` exists
[dotfiles.git] / admin / prog / bash_prompt
index 889b3974b3adc53ec0457ac1dc8db967e38fc321..13d0c2dc599dd78313cfb470cc8eb199da693d72 100644 (file)
@@ -96,7 +96,9 @@ set_prompts() {
 
    OPS1+="${debian_chroot:+($debian_chroot)}"
    OPS1+="\`cgmem_which_prompt\`\u@\${HOSTNAME::5}:\`short_curdir\` "
-   OPS1+="\$(prompt_git)"
+   if test -x /usr/bin/git >/dev/null 2>&1; then
+      OPS1+="\$(prompt_git)"
+   fi
    OPS1+="\\$\$SHLVL "
    export OPS1
 }