splitter magic for columns
[feisty_meow.git] / scripts / rev_control / version_control.sh
index 1d8b56083717c4a0b120cdcbb9a848a2f4ec0039..7656dc1003c453617fae7b9f3ae0b326da8d9e1a 100644 (file)
@@ -17,6 +17,11 @@ export MAX_DEPTH=5
 # use our splitter tool for lengthy output if it's available.
 if [ ! -z "$(which splitter)" ]; then
   TO_SPLITTER="$(which splitter)"
+
+#hmmm: another reusable chunk here, getting terminal size.
+  # calculate the number of columsn in the terminal.
+  cols=$(stty size | awk '{print $2}')
+  TO_SPLITTER+=" --maxcol $(($cols - 1))"
 else
   TO_SPLITTER=cat
 fi
@@ -445,7 +450,7 @@ function generate_rev_ctrl_filelist()
   local sortfile=$(mktemp /tmp/zz_checkin_sort.XXXXXX)
   sort <"$tempfile" >"$sortfile"
   echo "$sortfile"
-  \rm "$tempfile" "$sortfile"
+  \rm "$tempfile"
 }
 
 # iterates across a list of directories contained in a file (first parameter).
@@ -480,6 +485,6 @@ function perform_revctrl_action_on_file()
 
   restore_terminal_title
 
-  rm $tempfile
+  rm "$tempfile"
 }