From: Pierre-Elliott Bécue Date: Fri, 20 Feb 2015 20:07:30 +0000 (+0100) Subject: which retourne une erreur si la commande n'existe pas. On l'envoit dans dev/null X-Git-Url: http://gitweb.pimeys.fr/?p=config-20-100.git;a=commitdiff_plain;h=153fa2cd3fbe568efb581809141a2a1ddc14ae0d which retourne une erreur si la commande n'existe pas. On l'envoit dans dev/null --- 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