abstracted get_maxcols as new function
[feisty_meow.git] / scripts / rev_control / version_control.sh
index 08a9a07c1f0880bb33b07e1eb7cac00fd56f8ad8..e36aaf8ab371e04d3279ffee65b2bf1ce092a4f8 100644 (file)
@@ -17,10 +17,8 @@ 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}')
+  cols=$(get_maxcols)
   TO_SPLITTER+=" --maxcol $(($cols - 1))"
 else
   TO_SPLITTER=cat