Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 May 1999 18:46:51 -0500
From:      "G. Adam Stanislav" <adam@whizkidtech.net>
To:        Eric Hodel <hodeleri@seattleu.edu>
Cc:        freebsd-newbies@FreeBSD.ORG
Subject:   Re: Newbie tip
Message-ID:  <19990514184651.A16216@whizkidtech.net>
In-Reply-To: <373B9255.71FD0A10@seattleu.edu>; from Eric Hodel on Thu, May 13, 1999 at 08:02:45PM -0700
References:  <3.0.6.32.19990513101133.0095e3e0@mail.bfm.org> <Pine.LNX.4.04.9905131144250.13759-100000@hades.riverstyx.net> <19990513184609.A2831@whizkidtech.net> <373B9255.71FD0A10@seattleu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 13, 1999 at 08:02:45PM -0700, Eric Hodel wrote:
> > I checked this, just to be sure, but the scroll mechanism works even after
> > logging out and switching between consoles. It even remembers the states of
> > CapsLock, NumLock, and ScrollLock for each virtual console, a nice example of
> > fine engineering.
> 
> Some time ago someone asked on questions how to increase the
> scrollback buffer, so you may want to look in the archives to find out
> how to turn it down.  I THINK it was possible anyways...

I don't want to turn it down. I want it available to myself, gone for others.
I have solved the problem by creating an alternative to `clear' named `cls'
(the 's' stands for safe).

I have just submitted it to the ports collection.

It works by running a program called `blanks' which writes 100 blank lines,
thus overwriting the scrollback buffer. After calling blanks, cls just clears
the screen the same way clear does.

If anyone has increased the size of their scrollback buffer, they can edit
the `cls' script and add the number of blank lines they want written.

So, for example, if you want 2000 blank lines written, change "blanks" to
"blanks 2000".

If anyone needs it right now, and does not want to wait till it is committed
to the ports collection, cut out the following script, run it, then do

	cd cls
	make install

Just please respect the license which does not allow the use of cls by the
military, by weapons manufacturers/dealers, and by anyone dealing with mind
altering drugs (except for strict medical purposes).

Anyway, the original hint will then become:

	cls;logout

The script follows after my name,

Adam

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	cls
#	cls/Makefile
#	cls/files
#	cls/files/md5
#	cls/pkg
#	cls/pkg/PLIST
#	cls/pkg/DESCR
#	cls/pkg/COMMENT
#
echo c - cls
mkdir -p cls > /dev/null 2>&1
echo x - cls/Makefile
sed 's/^X//' >cls/Makefile << 'END-of-cls/Makefile'
X# New ports collection makefile for:	cls
X# Version required:			1.0
X# Date created:				14 May 1999
X# Whom:					G. Adam Stanislav <adam@whizkidtech.net>
X#
X# $Id$
X#
X
XDISTNAME=	cls-1.0
XCATEGORIES=	deskutils
XMASTER_SITES=	http://www.whizkidtech.net/fports/
X
XMAINTAINER=	adam@whizkidtech.net
X
XMAN1=		blanks.1 cls.1
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/blanks ${PREFIX}/bin
X	${INSTALL_SCRIPT} ${WRKSRC}/cls ${PREFIX}/bin
X	$(INSTALL_MAN) ${WRKSRC}/blanks.1 ${PREFIX}/man/man1
X	${INSTALL_MAN} ${WRKSRC}/cls.1 ${PREFIX}/man/man1
X
X.include <bsd.port.mk>
END-of-cls/Makefile
echo c - cls/files
mkdir -p cls/files > /dev/null 2>&1
echo x - cls/files/md5
sed 's/^X//' >cls/files/md5 << 'END-of-cls/files/md5'
XMD5 (cls-1.0.tar.gz) = a15b1f7a0cba22cbf9df9ccb7798b6de
END-of-cls/files/md5
echo c - cls/pkg
mkdir -p cls/pkg > /dev/null 2>&1
echo x - cls/pkg/PLIST
sed 's/^X//' >cls/pkg/PLIST << 'END-of-cls/pkg/PLIST'
Xbin/blanks
Xbin/cls
END-of-cls/pkg/PLIST
echo x - cls/pkg/DESCR
sed 's/^X//' >cls/pkg/DESCR << 'END-of-cls/pkg/DESCR'
XThis package contains the `blanks' command which simply prints any number of
Xblank lines to stdout.
X
XIt also contains the `cls' command which clears both the screen and the scroll
Xback video buffer.
X
XIt is a result of a discussion in freebsd-newbies on how to clear the contents
Xof your work area from prying eyes. It allows you to wipe it all out by using
Xthis command sequence to log out:
X
X	cls;logout
X
XThis software must NOT be used by any of the following:
X
X	a. Military forces of any country;
X	b. Manufacturers, distributors, and resellers of weapons;
X	c. Anyone dealing with mind altering drugs of any kind,
X	   except for strictly medicinal purposes.
X
XPlease respect.
X
XG. Adam Stanislav <adam@whizkidtech.net>
END-of-cls/pkg/DESCR
echo x - cls/pkg/COMMENT
sed 's/^X//' >cls/pkg/COMMENT << 'END-of-cls/pkg/COMMENT'
XSafe clear screen - also wipes scrollback video buffer.
END-of-cls/pkg/COMMENT
exit



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990514184651.A16216>