|
|
@ -9,7 +9,7 @@ readonly MIAOU_BASH_ERROR MIAOU_DEBUG |
|
|
# FUNCTIONS |
|
|
# FUNCTIONS |
|
|
|
|
|
|
|
|
function is_true { |
|
|
function is_true { |
|
|
[[ "${1,,}" =~ ^(true|yes|1)$ ]] #${1,,} => Lowercase all chars |
|
|
|
|
|
|
|
|
[[ "${1,,}" =~ ^true$ ]] #${1,,} => Lowercase all chars |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# overridden function which permits backtracing of original `return` statement |
|
|
# overridden function which permits backtracing of original `return` statement |
|
|
@ -217,7 +217,10 @@ function ansi_block_error { |
|
|
|
|
|
|
|
|
content=$(style_ansi "$1") |
|
|
content=$(style_ansi "$1") |
|
|
content=$(style_padding "$content") |
|
|
content=$(style_padding "$content") |
|
|
detail=$(BG=BLACK FG=WHITE style_padding "$2") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
detail="$2" |
|
|
|
|
|
[[ -n "$detail" ]] && detail=$(BG=BLACK FG=WHITE style_padding "$2") |
|
|
|
|
|
|
|
|
exit_code=$(FG=CYAN style_ansi " $3") |
|
|
exit_code=$(FG=CYAN style_ansi " $3") |
|
|
printf "\r" |
|
|
printf "\r" |
|
|
BLOCK_CONTINUATION_COL=5 style_block "$content$detail$exit_code" |
|
|
BLOCK_CONTINUATION_COL=5 style_block "$content$detail$exit_code" |
|
|
|