separator command uses terminal size now
authorChris Koeritz <fred@gruntose.com>
Sun, 17 Oct 2021 07:00:46 +0000 (03:00 -0400)
committerChris Koeritz <fred@gruntose.com>
Sun, 17 Oct 2021 07:00:46 +0000 (03:00 -0400)
if there is no specified size.

scripts/core/functions.sh

index fa5df8630417d3ee51db2f89466c71a4234ac4d5..c1a14c0e83d594258a7f06e12eb6798ad17f8c1e 100644 (file)
@@ -768,11 +768,11 @@ return 0
   {
     count=$1; shift
     if [ -z "$count" ]; then
-      count=79
+      count=$(($COLUMNS - 1))
     fi
     echo
     local i
-    for ((i=0; i < $count - 1; i++)); do
+    for ((i=0; i < $count; i++)); do
       echo -n "="
     done
     echo