[lastbash-cvs] lastbash lastbash,1.68,1.69
Status: Beta
Brought to you by:
cstroie
|
From: Costin S. <cs...@us...> - 2006-11-30 21:19:35
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10126 Modified Files: lastbash Log Message: Checjing for a minimum terminal size. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- lastbash 30 Nov 2006 21:12:30 -0000 1.68 +++ lastbash 30 Nov 2006 21:19:32 -0000 1.69 @@ -146,6 +146,16 @@ debug "No missing programs." fi + # Check a minimum terminal size + T_LINES=$(tput lines) + T_COLUMNS=$(tput cols) + if [ "${T_LINES}" -lt 15 ] || [ "${T_COLUMNS}" -lt 60 ] + then + echo "Minimum terminal size is 60x15, your is ${T_COLUMNS}x${T_LINES}" + debug "Terminal size insufficient: ${T_COLUMNS}x${T_LINES}" + exit 1 + fi + # Check the history fields proportions are right if [ "${HISTORY_FIELD_UNITS[0]}" == "0" ] || [ "${HISTORY_FIELD_UNITS[2]}" == "0" ] then @@ -596,7 +606,7 @@ # Find the screen size T_LINES=$(tput lines) T_COLUMNS=$(tput cols) - # FIXME Request a minimal size or exit + # Find the maximum line and column T_LASTLINE=$(( T_LINES - 1 )) T_LASTCOLUMN=$(( T_COLUMNS - 1 )) |