.\"***************************************************************************
-.\" Copyright 2018-2022,2023 Thomas E. Dickey *
+.\" Copyright 2018-2023,2024 Thomas E. Dickey *
.\" Copyright 1998-2016,2017 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: clear.1,v 1.41 2023/10/07 21:19:07 tom Exp $
-.TH @CLEAR@ 1 2023-10-07 "ncurses 6.4" "User commands"
+.\" $Id: clear.1,v 1.48 2024/03/16 15:35:01 tom Exp $
+.TH @CLEAR@ 1 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
.el .IP \(bu 2
..
.
-.ds n 5
.SH NAME
\fB\%@CLEAR@\fP \-
clear the terminal screen
.B @CLEAR@
.RB [ \-x ]
.RB [ \-T\ \c
-.IR type ]
+.IR terminal-type ]
.PP
.B "@CLEAR@ \-V"
.SH DESCRIPTION
\fB\%@CLEAR@\fP clears your terminal's screen and its scrollback buffer,
if any.
\fB\%@CLEAR@\fP retrieves the terminal type from the environment
-variable \fBTERM\fP,
+variable \fITERM\fP,
then consults the \fIterminfo\fP terminal capability database entry for
that type to determine how to perform these actions.
.PP
The capabilities to clear the screen and scrollback buffer are named
\*(``clear\*('' and \*(``E3\*('', respectively.
The latter is a \fIuser-defined capability\fP,
-applying an extension mechanism introduced in \fIncurses\fP 5.0 (1999).
+applying an extension mechanism introduced in \fI\%ncurses\fP 5.0
+(1999).
.SH OPTIONS
\fB\%@CLEAR@\fP recognizes the following options.
.TP 9 \" "-T type" + 2n
Normally,
this option is unnecessary,
because the terminal type is inferred from the environment variable
-\fBTERM\fP.
+\fITERM\fP.
If this option is specified,
-\fB\%@CLEAR@\fP ignores the environment variables \fBLINES\fP and
-\fB\%COLUMNS\fP as well.
+\fB\%@CLEAR@\fP ignores the environment variables \fILINES\fP and
+\fI\%COLUMNS\fP as well.
.TP
.B \-V
-reports the version of \fIncurses\fP associated with this program and
+reports the version of \fI\%ncurses\fP associated with this program and
exits with a successful status.
.TP
.B \-x
prevents \fB\%@CLEAR@\fP from attempting to clear the scrollback buffer.
+.SH PORTABILITY
+Neither IEEE Std 1003.1/The Open Group Base Specifications Issue 7
+(POSIX.1-2008) nor X/Open Curses Issue 7 documents \fB\%@CLEAR@\fP.
+.PP
+The latter documents \fBtput\fP,
+which could be used to replace this utility either via a shell script or
+by an alias
+(such as a symbolic link)
+to run \fB\%@TPUT@\fP as \fB\%@CLEAR@\fP.
.SH HISTORY
A \fBclear\fP command using the \fItermcap\fP database and library
appeared in 2BSD (1979).
The remainder of the script in each case is a copyright notice.
.PP
In 1995,
-\fIncurses\fP's \fBclear\fP began by adapting BSD's original \fBclear\fP
-command to use \fIterminfo\fP.
+\fI\%ncurses\fP's \fBclear\fP began by adapting BSD's original
+\fBclear\fP command to use \fIterminfo\fP.
The \fBE3\fP extension came later.
.bP
In June 1999, \fIxterm\fP provided an extension to the standard control
.EE
.RE
.IP
-one could clear the scrollback buffer using
+one could clear the scrollback buffer as well by using
.RS 8
.PP
.EX
.bP
Subsequently,
more terminal developers adopted the feature.
-The next relevant step was to change the \fIncurses\fP \fBclear\fP
+The next relevant step was to change the \fI\%ncurses\fP \fBclear\fP
program in 2013 to incorporate this extension.
.bP
In 2013,
\*(``\fB\%@TPUT@ clear\fP\*(''.
That oversight was addressed in 2016 by reorganizing \fB\%@TPUT@\fP to
share its logic with \fB\%@CLEAR@\fP and \fB\%@TSET@\fP.
-.SH PORTABILITY
-Neither IEEE Std 1003.1/The Open Group Base Specifications Issue 7
-(POSIX.1-2008) nor X/Open Curses Issue 7 documents \fB\%@TSET@\fP or
-\fB\%@RESET@\fP.
-.PP
-The latter documents \fBtput\fP,
-which could be used to replace this utility either via a shell script or
-by an alias
-(such as a symbolic link)
-to run \fB\%@TPUT@\fP as \fB\%@CLEAR@\fP.
.SH SEE ALSO
\fB\%@TPUT@\fP(1),
\fB\%xterm\fP(1),
-\fB\%terminfo\fP(\*n)
+\fB\%terminfo\fP(5)