shellcheck complains about SC2086 (info): Double quote to prevent
globbing and word splitting.
The variable `_b` contains a digit without spaces (as validated by
`isdigit`) and therefore is safe to quote.
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
_b=$(getarg "$1") || _b=${_b:-"$_default"}
if [ -n "$_b" ]; then
isdigit "$_b" && _b=$((_b)) \
- && [ $_b -ge "$_min" ] && [ $_b -le "$_max" ] && echo $_b && return
+ && [ "$_b" -ge "$_min" ] && [ "$_b" -le "$_max" ] && echo "$_b" && return
fi
echo "$_default"
}