From: Vincent Le Gallic Date: Thu, 25 Jul 2013 22:34:49 +0000 (+0200) Subject: Affichage du message de début *après* le sourcing du .bashrc.local X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=92d067f3b5328f019d180b4a3797856de453127d;p=config-20-100.git Affichage du message de début *après* le sourcing du .bashrc.local --- diff --git a/.bashrc b/.bashrc index 3b798d3..8d6f548 100644 --- a/.bashrc +++ b/.bashrc @@ -233,26 +233,25 @@ PROMPT_COMMAND=prompt_command # | Messages au début | # +-------------------+ -if [[ $(uname) == Linux && ( $(locale charmap) == UTF-8 && $TERM != screen ) ]]; then - MINUS_CHAR=─ - gen_minus_line - date=$(/bin/date +"%R, %A %d %B %Y") - redate=${date//é/e} - redate=${redate//û/u} - if [ "$color_prompt" = yes ]; then - echo -e "${line_color}┬─${redate//?/─}─┬${MINUS_LINE:${#date}-18}\n\ -│ ${announce_date_color}$date ${line_color}│\n\ -└─${redate//?/─}─┘\e[0m\n" +function welcome_message () +{ + if [[ $(uname) == Linux && ( $(locale charmap) == UTF-8 && $TERM != screen ) ]]; then + MINUS_CHAR=─ + gen_minus_line + date=$(/bin/date +"%R, %A %d %B %Y") + redate=${date//é/e} + redate=${redate//û/u} + if [ "$color_prompt" = yes ]; then + echo -e "${line_color}┬─${redate//?/─}─┬${MINUS_LINE:${#date}-19}\n│ ${announce_date_color}$date ${line_color}│\n└─${redate//?/─}─┘\e[0m\n" + else + echo -e "┬─${redate//?/─}──┬${MINUS_LINE:${#date}-18}\n│ $date │\n└─${redate//?/─}──┘\n" + fi + unset date else - echo -e "┬─${redate//?/─}──┬${MINUS_LINE:${#date}-18}\n\ -│ $date │\n\ -└─${redate//?/─}──┘\n" + MINUS_CHAR=- + gen_minus_line fi - unset date -else - MINUS_CHAR=- - gen_minus_line -fi +} ### ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ### ### Attention à ce que vous avez édité dans cette section ### @@ -307,3 +306,6 @@ if [ -f ~/.bash_aliases_local ]; then . ~/.bash_aliases_local fi +# On n'exécute le welcome_message que à ce moment, parce que la customisation +# local a pu changer des couleurs +welcome_message