Files
rdb/man/clear.rdb.man

96 lines
1.6 KiB
Groff

.TH clear.rdb "" "" "/rdb Command"
.PC "Clear the terminal's screen"
.B clear.rdb
.PP
.II "screen^clear"
.II "clear screen"
The command
.B clear.rdb
clears your terminal screen of all characters and leaves the
cursor in the upper left corner.
It is useful for menus and forms that look better on a clear
screen.
.PP
.II termcap
.II TERM
.B clear.rdb
uses the
.B termcap
file of terminal capabilities to find the string of special
characters that are needed to clear your screen.
To work correctly, the
.B TERM
environmental variable must be set correctly to the name of your
terminal as listed in
.BR /etc/termcap .
.PP
The COHERENT command
.B clear.rdb
also clears the screen.
.PP
The
.B /rdb
command
.B termput
can also clear the screen, as follows:
.DM
termput cl
.DE
.\".PP
.\"The difference is that
.\".B termput
.\"uses
.\".BR /etc/termcap ,
.\"whereas
.\".B tput
.\"use the
.\".I terminfo
.\"directory.
.SH Speed
.B clear.rdb
is quite fast, but there is a much faster way.
Set a shell variable
.B CLEAR
to the output of the command
.B clear.rdb
like this:
.DM
export CLEAR=`clear`
.DE
.PP
Then you can use:
.DM
echo "$CLEAR"
.DE
.PP
in your shell programs for a fast clear.
Put it into your
.B .profile
so that it will always be available.
Use quotation marks around the shell variables in case they
have special characters in them.
.SH "See Also"
.B
termput
.R
.br
COHERENT Lexicon:
.B
clear,
export,
\&.profile,
sh,
TERM,
termcap
.R
.SH Notes
This command is named
.B clear.rdb
rather than
.BR clear ,
as in other implementations of
.BR /rdb ,
to avoid clashing with the COHERENT command
.BR clear .
.SO clear