Handle COLUMNS and/or LINES being unset.
authorIain Patterson <me@iain.cx>
Wed, 26 Sep 2007 08:35:39 +0000 (08:35 +0000)
committerIain Patterson <me@iain.cx>
Wed, 26 Sep 2007 08:35:39 +0000 (08:35 +0000)
git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@71 6be0d1a5-5cfe-0310-89b6-964be062b18b

usize

diff --git a/usize b/usize
index ec2b25d..73b0346 100755 (executable)
--- a/usize
+++ b/usize
@@ -7,8 +7,8 @@
 # Usage: usize <width> [<height>]
 #
 
-width=$COLUMNS
-height=$LINES
+width=${COLUMNS:-80}
+height=${LINES:-24}
 
 case $# in
   0)