X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=man%2Fclear.1;h=78001751278a1e3939b78bd03bf6c0344dba5e5d;hb=HEAD;hp=07ddd93befe63dce326af817412423ff5f289e7b;hpb=7e062bb2764a87d98073a90ee65a234a2679f9c1;p=ncurses.git diff --git a/man/clear.1 b/man/clear.1 index 07ddd93b..a1034db7 100644 --- a/man/clear.1 +++ b/man/clear.1 @@ -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,24 +27,27 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: clear.1,v 1.40 2023/10/01 22:12:38 tom Exp $ -.TH @CLEAR@ 1 2023-10-01 "ncurses 6.4" "User commands" -.ie n .ds CW R -.el \{ -.ie \n(.g .ds CW CR -.el .ds CW CW +.\" $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 +.ds ' \(aq .\} -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.ie \n(.g .ds ' \(aq -.el .ds ' ' +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.ie t .ds ' \(aq +.el .ds ' ' +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.ds n 5 +. .SH NAME \fB\%@CLEAR@\fP \- clear the terminal screen @@ -52,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 @@ -75,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). @@ -120,28 +133,29 @@ 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 sequence for clearing the screen. Rather than clearing just the visible part of the screen using -.IP .RS 8 +.PP .EX printf \*'\e033[2J\*' .EE .RE .IP -one could clear the scrollback buffer using -.IP +one could clear the scrollback buffer as well by using .RS 8 +.PP .EX printf \*'\e033[\fB3\fPJ\*' .EE .RE .IP +instead. \*(``XTerm Control Sequences\fP\*('' documents this feature as originating with \fIxterm\fP. .bP @@ -158,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, @@ -166,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)