X-Git-Url: http://gitweb.pimeys.fr/?a=blobdiff_plain;f=.bashrc;h=77178337d2b3d44342af25c276ca9ed42b5288b8;hb=ac79bb2f47a96158ec7d00e18acf6c938f2ab5b3;hp=d89108c3c8b8c6042a8213f5464c1a788ad02864;hpb=59d7e4df6dc413d89346050a0cc8da0ef8cfd16b;p=config-20-100.git diff --git a/.bashrc b/.bashrc index d89108c..7717833 100644 --- 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 } @@ -294,7 +299,6 @@ function welcome_message () ### ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ### ### Attention à ce que vous avez édité dans cette section ### - # +---------------------------------------+ # | Gestion de l'historique des commandes | # +---------------------------------------+ @@ -304,10 +308,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 - ' @@ -325,7 +329,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' @@ -346,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