mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
test: add optional argument to sep() helper function
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+9
-1
@@ -143,7 +143,15 @@ log()
|
||||
|
||||
sep()
|
||||
{
|
||||
printf "\e[2m――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\e[0m\n"
|
||||
heading=${1:-}
|
||||
if [ -n "$heading" ]; then
|
||||
num=$((72 - ${#heading} - 1))
|
||||
printf "\e[1m%s " "$heading"
|
||||
printf -- "―%.0s" $(seq 1 $num)
|
||||
printf "\e[0m\n"
|
||||
else
|
||||
printf "\e[1m――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\e[0m\n"
|
||||
fi
|
||||
}
|
||||
|
||||
say()
|
||||
|
||||
Reference in New Issue
Block a user