]> gitweb.pimeys.fr Git - config-20-100.git/blobdiff - .bashrc
[.ssh] s/loginCr@ns/legallic/ sur ethercalc
[config-20-100.git] / .bashrc
diff --git a/.bashrc b/.bashrc
index 05bb4138c2de435a3ec83f102a2ecb9db7d83e9c..6df39e266815f62d743ef9c9531987bf760fcd60 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
 }
 
@@ -332,6 +337,11 @@ export EDITOR='/usr/bin/nano'
 # Ajouter ~/bin, /sbin et /usr/sbin à son PATH
 PATH=~/bin:$PATH:/sbin:/usr/sbin
 
+
+# +----------+
+# | Sourcing |
+# +----------+
+
 # Chargement des alias
 if [ -f ~/.bash_aliases ]; then
     . ~/.bash_aliases
@@ -344,6 +354,11 @@ if [ -f ~/.bash_aliases_local ]; then
     . ~/.bash_aliases_local
 fi
 
+
+# +-----+
+# | End |
+# +-----+
+
 # On n'exécute le welcome_message que à ce moment, parce que la customisation
 # locale a pu changer des couleurs
 welcome_message