mirror of
https://github.com/troglobit/finit.git
synced 2026-12-04 21:58:19 +00:00
test: add optional argument to sep() helper function
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
88ec21e9cc
commit
8b5fa5eeaa
1 file changed
+9
-1
+9
-1
@@ -143,7 +143,15 @@ log()
|
|||||||
|
|
||||||
sep()
|
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()
|
say()
|
||||||
|
|||||||
Reference in new issue
Block a user