# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 function __esection() { local -a lines local lsep prefix="$(__edate)$(__eindent0)" local length="${COLUMNS:-80}" setx lsep=__complete "$prefix" "$length" - recho "$lsep" [ -n "$*" ] || return 0 length=$((length - 1)) setx -a lines=echo "$1" for line in "${lines[@]}"; do setx line=__complete "$prefix- $line" "$length" recho "$line-" done recho "$lsep" } function __etitle() { local p="TITLE: " i=" " recho "$(__edate)$(__eindent0)${p}$(__eindent "$1" "$i")" } function __edesc() { local p="DESC: " i=" " recho "$(__edate)$(__eindent0)${p}$(__eindent "$1" "$i")" } function __ebanner() { local -a lines local lsep prefix="$(__edate)$(__eindent0)" local length="${COLUMNS:-80}" setx lsep=__complete "$prefix" "$length" = recho "$lsep" length=$((length - 1)) setx -a lines=echo "$1" for line in "" "${lines[@]}" ""; do setx line=__complete "$prefix= $line" "$length" recho "$line=" done recho "$lsep" } function __eimportant() { recho "$(__edate)$(__eindent0)IMPORTANT! $(__eindent "$1" " ")"; } function __eattention() { recho "$(__edate)$(__eindent0)ATTENTION! $(__eindent "$1" " ")"; } function __eerror() { recho "$(__edate)$(__eindent0)ERROR: $(__eindent "$1" " ")"; } function __ewarn() { recho "$(__edate)$(__eindent0)WARNING: $(__eindent "$1" " ")"; } function __enote() { recho "$(__edate)$(__eindent0)NOTE: $(__eindent "$1" " ")"; } function __einfo() { recho "$(__edate)$(__eindent0)INFO: $(__eindent "$1" " ")"; } function __edebug() { recho "$(__edate)$(__eindent0)DEBUG: $(__eindent "$1" " ")"; } function __eecho() { recho "$(__edate)$(__eindent0)$(__eindent "$1")"; } function __eecho_() { recho_ "$(__edate)$(__eindent0)$(__eindent "$1")"; } function __estep() { recho "$(__edate)$(__eindent0). $(__eindent "$1" " ")"; } function __estepe() { recho "$(__edate)$(__eindent0).E $(__eindent "$1" " ")"; } function __estepw() { recho "$(__edate)$(__eindent0).W $(__eindent "$1" " ")"; } function __estepn() { recho "$(__edate)$(__eindent0).N $(__eindent "$1" " ")"; } function __estepi() { recho "$(__edate)$(__eindent0).I $(__eindent "$1" " ")"; } function __estep_() { recho_ "$(__edate)$(__eindent0). $(__eindent "$1" " ")"; } function __estepe_() { recho_ "$(__edate)$(__eindent0).E $(__eindent "$1" " ")"; } function __estepw_() { recho_ "$(__edate)$(__eindent0).W $(__eindent "$1" " ")"; } function __estepn_() { recho_ "$(__edate)$(__eindent0).N $(__eindent "$1" " ")"; } function __estepi_() { recho_ "$(__edate)$(__eindent0).I $(__eindent "$1" " ")"; } function __action() { recho "$(__edate)$(__eindent0)ACTION: $(__eindent "$1" " ")"; } function __asuccess() { recho "$(__edate)$(__eindent0)(OK) $(__eindent "$1" " ")"; } function __afailure() { recho "$(__edate)$(__eindent0)(KO) $(__eindent "$1" " ")"; } function __adone() { recho "$(__edate)$(__eindent0)$(__eindent "$1")"; }