From 153fa2cd3fbe568efb581809141a2a1ddc14ae0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= <becue@crans.org>
Date: Fri, 20 Feb 2015 21:07:30 +0100
Subject: [PATCH] which retourne une erreur si la commande n'existe pas. On
 l'envoit dans dev/null

---
 .bashrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.bashrc b/.bashrc
index 4e594af..c5e7347 100644
--- a/.bashrc
+++ b/.bashrc
@@ -400,7 +400,7 @@ vcs_info(){
         if [[ disabled[${vcss[$i]}] -eq 1 ]]; then
             continue
         fi
-        commands[${vcss[$i]}]=$(which ${vcss[$i]});
+        commands[${vcss[$i]}]=$( (which ${vcss[$i]} 2>/dev/null >&2 && which ${vcss[i]})||echo true);
     done;
 
     found=0
-- 
GitLab