style: better readability

This commit is contained in:
Rejman 2024-02-22 00:25:39 -03:00
commit 3889a66a5f

View file

@ -40,15 +40,22 @@ build_message () {
local attention='!' local attention='!'
local scope="($2)" local scope="($2)"
shift 2 shift 2
else elif [[ "$1" =~ (-a|--attention) ]]; then
if [[ "$*" =~ (-s|--scope) ]]; then local attention='!'
local scope="($2)" shift 1
shift 2 elif [[ "$2" =~ (-a|--attention) ]]; then
fi local attention='!'
shift 1
elif [[ "$*" =~ (-a|--attention) ]]; then
local attention='!'
fi
if [[ "$*" =~ (-a|--attention) ]]; then if [[ "$*" =~ (-s|--scope) ]]; then
local attention='!' local scope="($2)"
fi shift 2
elif [[ "$2" =~ (-s|--scope) ]]; then
local scope="($3)"
shift 2
fi fi
local message="'$type'${scope}$attention: $@"; local message="'$type'${scope}$attention: $@";