X-Git-Url: http://gitweb.pimeys.fr/?a=blobdiff_plain;f=.bashrc;h=3af7c78456b3f3911a4396644a18130c9808112c;hb=0751455c394512ef60f15e7eff7ad6069e9ad05f;hp=679c3a6e1749ce5697a43d4998fa90af39d647f9;hpb=43e807910d1e37a8baa77eb8676f48447e4155fc;p=config-20-100.git diff --git a/.bashrc b/.bashrc index 679c3a6..3af7c78 100644 --- a/.bashrc +++ b/.bashrc @@ -100,7 +100,7 @@ function cd { builtin cd "$@" ret=$? 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 + 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)==$1 && c > cmax) {cmax=c; MASK=$2}} END {print MASK}' ~/.umaskrc) >/dev/null fi return $ret } @@ -224,13 +224,13 @@ function prompt_command # il faut changer $((31+($?==0)*6)) si vous y tenez vraiment et que vous comprenez ce que vous faites ERR='[ \[\e[1;$((31+($?==0)*6))m\]$?'${line_color_prompt}' ]'$MINUS_CHAR DATE="( ${date_color}\D{%H:%M:%S}${line_color_prompt} )" - PROMPT="${username_color}\u${symbols_color}@${host_color}\h ${symbols_color}\$ ${nocolor_prompt}" + PROMPT="${username_color}\u${symbols_color}@${host_color}\h ${symbols_color}\\\$ ${nocolor_prompt}" PS1=$TITLE${line_color_prompt}$MINUS_CHAR$DATE$MINUS_CHAR$DIR$MINUS_CHAR$VCS_info${line_color_prompt}$POST_DIR$ERR'\n'$PROMPT else DIR="< "$DIR" >" ERR='[ $? ]'$MINUS_CHAR DATE="( \D{%H:%M:%S} )" - PROMPT="\u@\h \$ " + PROMPT="\u@\h \\\$ " PS1=$TITLE$MINUS_CHAR$DATE$MINUS_CHAR$DIR$MINUS_CHAR$VCS_info$POST_DIR$ERR'\n'$PROMPT fi }