# | 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 ###
. ~/.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