diff --git a/bin/miaou-bash b/bin/miaou-bash index 2705d62..3a6b7e4 100755 --- a/bin/miaou-bash +++ b/bin/miaou-bash @@ -9,7 +9,7 @@ readonly MIAOU_BASH_ERROR MIAOU_DEBUG # FUNCTIONS 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 @@ -217,7 +217,10 @@ function ansi_block_error { content=$(style_ansi "$1") 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") printf "\r" BLOCK_CONTINUATION_COL=5 style_block "$content$detail$exit_code"