]> gitweb.pimeys.fr Git - config-20-100.git/blobdiff - .bashrc
Merge branch 'master' into perso
[config-20-100.git] / .bashrc
diff --git a/.bashrc b/.bashrc
index 3d1c3d27d6f3f2416db77df48fd206b738bf0be0..77178337d2b3d44342af25c276ca9ed42b5288b8 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -45,12 +45,17 @@ fi
 # des infos quand on est dans un dépôt versionné
 
 find_up () {
+    local path normalized_path normalized_ret
     path="$1"
     shift 1
-    while [[ "`readlink -f -- \"$path\"`" != "/" ]];
+    normalized_path=`readlink -f -- "$path"`
+    normalized_ret=$?
+    while [[ "$normalized_path" != "/" ]] && [ $normalized_ret -eq 0 ];
     do
         find "$path"  -maxdepth 1 -mindepth 1 "$@"
         path=${path}/..
+        normalized_path=`readlink -f -- "$path"`
+        normalized_ret=$?
     done
 }
 
@@ -345,5 +350,5 @@ if [ -f ~/.bash_aliases_local ]; then
 fi
 
 # On n'exécute le welcome_message que à ce moment, parce que la customisation
-# local a pu changer des couleurs
+# locale a pu changer des couleurs
 welcome_message