]> gitweb.pimeys.fr Git - config-20-100.git/commitdiff
which retourne une erreur si la commande n'existe pas. On l'envoit dans dev/null
authorPierre-Elliott Bécue <becue@crans.org>
Fri, 20 Feb 2015 20:07:30 +0000 (21:07 +0100)
committerPierre-Elliott Bécue <becue@crans.org>
Fri, 20 Feb 2015 20:16:50 +0000 (21:16 +0100)
.bashrc

diff --git a/.bashrc b/.bashrc
index 4e594afa0c1b8e43f16e9f9e3ecdbbe1f3688847..c5e734700f60bcc4542681ea02c9df9489ec6405 100644 (file)
--- 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