X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Frev_control%2Fversion_control.sh;h=7656dc1003c453617fae7b9f3ae0b326da8d9e1a;hb=5afd78d9aa103f34e3ad40d00935999b59b5f3a1;hp=1d8b56083717c4a0b120cdcbb9a848a2f4ec0039;hpb=8f9a3ac6a1e0968f0d3e2608a5a1e61dc13bfa35;p=feisty_meow.git diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 1d8b5608..7656dc10 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -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" }