made the loop variable local, since it was hosing external uses of i variable.
[feisty_meow.git] / scripts / core / functions.sh
index 21d9d04716beb91107c1993d33cced0bf29203de..7edaa007b40b16e12b9075f5415a4a3a70bcc383 100644 (file)
@@ -551,6 +551,30 @@ return 0
 
   ##############
 
+  # just shows a separator line for an 80 column console, or uses the first
+  # parameter as the number of columns to expect.
+  function separator()
+  {
+    count=$1; shift
+    if [ -z "$count" ]; then
+      count=79
+    fi
+    echo
+    local i
+    for ((i=0; i < $count - 1; i++)); do
+      echo -n "="
+    done
+    echo
+    echo
+  }
+  # alias for separator.
+  function sep()
+  {
+    separator $*
+  }
+
+  ##############
+
   function function_sentinel() { return 0; }
   
   if [ ! -z "$SHELL_DEBUG" ]; then echo "feisty meow function definitions done."; fi