style: better readability

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

View file

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