X-Git-Url: http://gitweb.pimeys.fr/?a=blobdiff_plain;f=.bashrc;h=225aa9ab826fa93980abc61b4804d8bfc874317c;hb=79abc3e0705b25a24a60d8ddd2070a2d5228711b;hp=c6b727ae154f160eb0eda0e1241b6a54fcd15aad;hpb=6243d890f6518bafc92d0ffe39095892f600ec21;p=config-20-100.git diff --git a/.bashrc b/.bashrc index c6b727a..225aa9a 100644 --- a/.bashrc +++ b/.bashrc @@ -98,11 +98,11 @@ get_vcs_info () { # Rien de spécial n'arrivera si vous n'avez pas le fichier .umaskrc 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 - else - return 0 + 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 } ### Attention à ce que vous éditez dans cette section ### @@ -224,7 +224,7 @@ 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" >" @@ -271,7 +271,6 @@ function welcome_message () ### ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ### ### Attention à ce que vous avez édité dans cette section ### - # +---------------------------------------+ # | Gestion de l'historique des commandes | # +---------------------------------------+ @@ -281,10 +280,10 @@ function welcome_message () export HISTCONTROL=ignoreboth # Nombre de lignes d'historique à garder -export HISTSIZE=5000 +export HISTSIZE= # la même chose dans le fichier d'historique -export HISTFILESIZE=5000 +export HISTFILESIZE= # Mémoriser le timestamp d'exécution de la commande export HISTTIMEFORMAT='%F %T - ' @@ -302,7 +301,7 @@ shopt -s histappend # Pour éviter un troll, aucune ligne de cette section n'est décommentée. # Choisissez la vôtre. -#~# export EDITOR='/usr/bin/nano' +export EDITOR='/usr/bin/nano' #~# export EDITOR='/usr/bin/vim' #~# export EDITOR='/usr/bin/emacs' #~# export EDITOR='/usr/bin/jed'