]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/clear.1
ncurses 6.5 - patch 20240504
[ncurses.git] / man / clear.1
index 8d5e0e5294bbdec0c694400cf5f4b22f1f1610fa..a1034db7cb1a98ce34fc8a13063fc1e81d4b3e2a 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" 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  *
@@ -27,8 +27,8 @@
 .\" 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
@@ -48,7 +48,6 @@
 .el    .IP \(bu 2
 ..
 .
-.ds n 5
 .SH NAME
 \fB\%@CLEAR@\fP \-
 clear the terminal screen
@@ -56,21 +55,22 @@ 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
@@ -79,17 +79,26 @@ produces instructions suitable for the terminal \fItype\fP.
 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).
@@ -124,8 +133,8 @@ exec tput clear
 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
@@ -138,7 +147,7 @@ printf \*'\e033[2J\*'
 .EE
 .RE
 .IP
-one could clear the scrollback buffer using
+one could clear the scrollback buffer as well by using
 .RS 8
 .PP
 .EX
@@ -163,7 +172,7 @@ motivating the feature.
 .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,
@@ -171,17 +180,7 @@ the \fBE3\fP capability was not exercised by
 \*(``\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)