# lsdir does an ls -la on *only* the directories in the current
# (or 1 requested) directory.  It does *not* list all the contents
# of the directory, as ls -la $1 would do.

ADD=${1-`pwd`}
ls -l $ADD |while LINE=`line`
do
  if test "$LINE" = "$NULL"
  then break
  else
    if [ {`echo $LINE | cut -c1`} = {d} ]
    then echo $LINE
    fi
  fi
done
