# 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
local sortfile=$(mktemp /tmp/zz_checkin_sort.XXXXXX)
sort <"$tempfile" >"$sortfile"
- \rm "$tempfile"
echo "$sortfile"
+ \rm "$tempfile"
}
# iterates across a list of directories contained in a file (first parameter).
restore_terminal_title
- rm $tempfile
+ rm "$tempfile"
}