]> 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 76ac1280e460701b98d6737cb7ba0cc7161d6563..409278c8378370500c078d1c8eb69966878f908d 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -47,7 +47,7 @@ fi
 #~# find_up () {
 #~#     path="$1"
 #~#     shift 1
-#~#     while [[ "`readlink -f $path`" != "/" ]];
+#~#     while [[ "`readlink -f -- \"$path\"`" != "/" ]];
 #~#     do
 #~#         find "$path"  -maxdepth 1 -mindepth 1 "$@"
 #~#         path=${path}/..
@@ -103,7 +103,11 @@ fi
 # Rien de spécial n'arrivera si vous n'avez pas le fichier .umaskrc
 function cd {
         builtin cd "$@"
-        [ -f ~/.umaskrc ] &&  umask $(/usr/bin/awk 'BEGIN {pwd=ENVIRON["PWD"]; a=length(pwd); cmax=0} {if($1==pwd) {MASK=$2;exit}; c=length($1); if(c>a) {next}; if(substr(pwd,0,c)==$1 && c > cmax) {cmax=c; MASK=$2}} END {print MASK}' ~/.umaskrc) >/dev/null
+        if [ -f ~/.umaskrc ]; then
+            umask $(/usr/bin/awk 'BEGIN {pwd=ENVIRON["PWD"]; a=length(pwd); cmax=0} {if($1==pwd) {MASK=$2;exit}; c=length($1); if(c>a) {next}; if(substr(pwd,0,c)==$1 && c > cmax) {cmax=c; MASK=$2}} END {print MASK}' ~/.umaskrc) >/dev/null
+        else
+            return 0
+        fi
 }
 
 ### Attention à ce que vous éditez dans cette section ###