fonctions e*: changer l'affichage en mode NO_COLOR pour afficher les préfixes complets

This commit is contained in:
Jephté Clain 2015-09-10 11:06:00 +04:00
parent 8eaea32094
commit 42aa7eae02
2 changed files with 27 additions and 27 deletions

View File

@ -2997,15 +2997,15 @@ function __eecho() { tooenc "$(__edate)${__tlevel}$(__indent "$1")"; }
function __eecho_() { tooenc_ "$(__edate)${__tlevel}$(__indent "$1")"; } function __eecho_() { tooenc_ "$(__edate)${__tlevel}$(__indent "$1")"; }
function __edebug() { tooenc "$(__edate)${__tlevel}DEBUG $(__indent "$1")"; } function __edebug() { tooenc "$(__edate)${__tlevel}DEBUG $(__indent "$1")"; }
function __estep() { tooenc "$(__edate)${__tlevel}. $(__indent "$1")"; } function __estep() { tooenc "$(__edate)${__tlevel}. $(__indent "$1")"; }
function __estepe() { __estep "$@"; } function __estepe() { tooenc "$(__edate)${__tlevel}.E $(__indent "$1")"; }
function __estepw() { __estep "$@"; } function __estepw() { tooenc "$(__edate)${__tlevel}.W $(__indent "$1")"; }
function __estepn() { __estep "$@"; } function __estepn() { tooenc "$(__edate)${__tlevel}.N $(__indent "$1")"; }
function __estepi() { __estep "$@"; } function __estepi() { tooenc "$(__edate)${__tlevel}.I $(__indent "$1")"; }
function __estep_() { tooenc_ "$(__edate)${__tlevel}. $(__indent "$1")"; } function __estep_() { tooenc_ "$(__edate)${__tlevel}. $(__indent "$1")"; }
function __estepe_() { __estep_ "$@"; } function __estepe_() { tooenc_ "$(__edate)${__tlevel}.E $(__indent "$1")"; }
function __estepw_() { __estep_ "$@"; } function __estepw_() { tooenc_ "$(__edate)${__tlevel}.W $(__indent "$1")"; }
function __estepn_() { __estep_ "$@"; } function __estepn_() { tooenc_ "$(__edate)${__tlevel}.N $(__indent "$1")"; }
function __estepi_() { __estep_ "$@"; } function __estepi_() { tooenc_ "$(__edate)${__tlevel}.I $(__indent "$1")"; }
function __etitle() { tooenc "$(__edate)${__tlevel}=== $(__indent "$1")"; } function __etitle() { tooenc "$(__edate)${__tlevel}=== $(__indent "$1")"; }
function __ebegin() { tooenc_ "$(__edate)${__tlevel}. $(__indent "$1"): "; } function __ebegin() { tooenc_ "$(__edate)${__tlevel}. $(__indent "$1"): "; }
function __edoto() { echo_ "."; } function __edoto() { echo_ "."; }

View File

@ -67,9 +67,9 @@ function __set_no_colors() {
} }
__set_no_colors __set_no_colors
function __eerror() { tooenc "$(__edate)${__tlevel}${COULEUR_ROUGE}E${COULEUR_NORMALE} $(__indent "$1")"; } function __eerror() { local p; [ -z "$NO_COLORS" ] && p="E" || p="ERROR"; tooenc "$(__edate)${__tlevel}${COULEUR_ROUGE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __ewarn() { tooenc "$(__edate)${__tlevel}${COULEUR_JAUNE}W${COULEUR_NORMALE} $(__indent "$1")"; } function __ewarn() { local p; [ -z "$NO_COLORS" ] && p="W" || p="WARNING"; tooenc "$(__edate)${__tlevel}${COULEUR_JAUNE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __enote() { tooenc "$(__edate)${__tlevel}${COULEUR_VERTE}N${COULEUR_NORMALE} $(__indent "$1")"; } function __enote() { local p; [ -z "$NO_COLORS" ] && p="N" || p="NOTE"; tooenc "$(__edate)${__tlevel}${COULEUR_VERTE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __ebanner() { function __ebanner() {
local maxi="${COLUMNS:-80}" local maxi="${COLUMNS:-80}"
local -a lines local -a lines
@ -91,22 +91,22 @@ function __ebanner() {
done done
tooenc "$psfix$COULEUR_NORMALE" tooenc "$psfix$COULEUR_NORMALE"
} }
function __eimportant() { tooenc "$(__edate)${__tlevel}${COULEUR_ROUGE}!${COULEUR_NORMALE} $(__indent "$1")"; } function __eimportant() { local p; [ -z "$NO_COLORS" ] && p="!" || p="IMPORTANT"; tooenc "$(__edate)${__tlevel}${COULEUR_ROUGE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __eattention() { tooenc "$(__edate)${__tlevel}${COULEUR_JAUNE}*${COULEUR_NORMALE} $(__indent "$1")"; } function __eattention() { local p; [ -z "$NO_COLORS" ] && p="*" || p="ATTENTION"; tooenc "$(__edate)${__tlevel}${COULEUR_JAUNE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __einfo() { tooenc "$(__edate)${__tlevel}${COULEUR_BLEUE}I${COULEUR_NORMALE} $(__indent "$1")"; } function __einfo() { local p; [ -z "$NO_COLORS" ] && p="I" || p="INFO"; tooenc "$(__edate)${__tlevel}${COULEUR_BLEUE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __edebug() { tooenc "$(__edate)${__tlevel}${COULEUR_BLANCHE}D${COULEUR_NORMALE} $(__indent "$1")"; } function __edebug() { local p; [ -z "$NO_COLORS" ] && p="D" || p="DEBUG"; tooenc "$(__edate)${__tlevel}${COULEUR_BLANCHE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __estep() { tooenc "$(__edate)${__tlevel}${COULEUR_BLANCHE}.${COULEUR_NORMALE} $(__indent "$1")"; } function __estep() { local p; [ -z "$NO_COLORS" ] && p="." || p="."; tooenc "$(__edate)${__tlevel}${COULEUR_BLANCHE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __estepe() { tooenc "$(__edate)${__tlevel}${COULEUR_ROUGE}.${COULEUR_NORMALE} $(__indent "$1")"; } function __estepe() { local p; [ -z "$NO_COLORS" ] && p="." || p=".E"; tooenc "$(__edate)${__tlevel}${COULEUR_ROUGE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __estepw() { tooenc "$(__edate)${__tlevel}${COULEUR_JAUNE}.${COULEUR_NORMALE} $(__indent "$1")"; } function __estepw() { local p; [ -z "$NO_COLORS" ] && p="." || p=".W"; tooenc "$(__edate)${__tlevel}${COULEUR_JAUNE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __estepn() { tooenc "$(__edate)${__tlevel}${COULEUR_VERTE}.${COULEUR_NORMALE} $(__indent "$1")"; } function __estepn() { local p; [ -z "$NO_COLORS" ] && p="." || p=".N"; tooenc "$(__edate)${__tlevel}${COULEUR_VERTE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __estepi() { tooenc "$(__edate)${__tlevel}${COULEUR_BLEUE}.${COULEUR_NORMALE} $(__indent "$1")"; } function __estepi() { local p; [ -z "$NO_COLORS" ] && p="." || p=".I"; tooenc "$(__edate)${__tlevel}${COULEUR_BLEUE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __estep_() { tooenc_ "$(__edate)${__tlevel}${COULEUR_BLANCHE}.${COULEUR_NORMALE} $(__indent "$1")"; } function __estep_() { local p; [ -z "$NO_COLORS" ] && p="." || p="."; tooenc_ "$(__edate)${__tlevel}${COULEUR_BLANCHE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __estepe_() { tooenc_ "$(__edate)${__tlevel}${COULEUR_ROUGE}.${COULEUR_NORMALE} $(__indent "$1")"; } function __estepe_() { local p; [ -z "$NO_COLORS" ] && p="." || p=".E"; tooenc_ "$(__edate)${__tlevel}${COULEUR_ROUGE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __estepw_() { tooenc_ "$(__edate)${__tlevel}${COULEUR_JAUNE}.${COULEUR_NORMALE} $(__indent "$1")"; } function __estepw_() { local p; [ -z "$NO_COLORS" ] && p="." || p=".W"; tooenc_ "$(__edate)${__tlevel}${COULEUR_JAUNE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __estepn_() { tooenc_ "$(__edate)${__tlevel}${COULEUR_VERTE}.${COULEUR_NORMALE} $(__indent "$1")"; } function __estepn_() { local p; [ -z "$NO_COLORS" ] && p="." || p=".N"; tooenc_ "$(__edate)${__tlevel}${COULEUR_VERTE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __estepi_() { tooenc_ "$(__edate)${__tlevel}${COULEUR_BLEUE}.${COULEUR_NORMALE} $(__indent "$1")"; } function __estepi_() { local p; [ -z "$NO_COLORS" ] && p="." || p=".I"; tooenc_ "$(__edate)${__tlevel}${COULEUR_BLEUE}${p}${COULEUR_NORMALE} $(__indent "$1")"; }
function __etitle() { tooenc "$(__edate)${__tlevel}${COULEUR_BLEUE}T $(get_color _)$(__indent "$1")${COULEUR_NORMALE}"; } function __etitle() { local p; [ -z "$NO_COLORS" ] && p="T" || p="==="; tooenc "$(__edate)${__tlevel}${COULEUR_BLEUE}${p} $(get_color _)$(__indent "$1")${COULEUR_NORMALE}"; }
function __ebegin() { tooenc_ "$(__edate)${__tlevel}${COULEUR_BLANCHE}.${COULEUR_NORMALE} $(__indent "$1"): "; } function __ebegin() { local p; [ -z "$NO_COLORS" ] && p="." || p="."; tooenc_ "$(__edate)${__tlevel}${COULEUR_BLANCHE}${p}${COULEUR_NORMALE} $(__indent "$1"): "; }
function __edoto() { echo_ "."; } function __edoto() { echo_ "."; }
function __edotw() { echo_ "${COULEUR_JAUNE}w${COULEUR_NORMALE}"; } function __edotw() { echo_ "${COULEUR_JAUNE}w${COULEUR_NORMALE}"; }
function __edotx() { echo_ "${COULEUR_ROUGE}x${COULEUR_NORMALE}"; } function __edotx() { echo_ "${COULEUR_ROUGE}x${COULEUR_NORMALE}"; }