X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fclear.1.html;h=eb12fa283ece807dc6cd875bfdbc7ee827dc4e7b;hp=a779802c7b467ddd0013b04da7009837d16a0505;hb=f344f8539c1543f8cd65a5bb142dbaf23b9421d2;hpb=1dd25cc0259e0683290fe889707b04979b5fda0a diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html index a779802c..eb12fa28 100644 --- a/doc/html/man/clear.1.html +++ b/doc/html/man/clear.1.html @@ -26,7 +26,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: clear.1,v 1.14 2016/11/19 21:30:46 tom Exp @ + * @Id: clear.1,v 1.16 2016/12/31 16:09:34 tom Exp @ * these would be fallbacks for DS/DE, * but groff changed the meaning of the macros. --> @@ -59,11 +59,19 @@ clear clears your screen if this is possible, including its scrollback buffer (if the extended "E3" capability is defined). clear looks in the environment for the terminal - type and then in the terminfo database to determine how to - clear the screen. + type given by the environment variable TERM, and then in + the terminfo database to determine how to clear the + screen. + + clear writes to the standard output. You can redirect the + standard output to a file (which prevents clear from actu- + ally clearing the screen), and later cat the file to the + screen, clearing it at that point. clear ignores any command-line parameters that may be - present. + present. The analogous "tput clear" has command-line + parameters including -T for overriding the TERM environ- + ment variable.
@@ -73,13 +81,15 @@ AT&T adapted a different BSD program (tset) to make a new command (tput), and used this to replace the clear command with a shell script which calls tput clear, e.g., - /usr/bin/tput ${1:+-T$1} clear 2> /dev/null - exit + + /usr/bin/tput ${1:+-T$1} clear 2> /dev/null + exit In 1989, when Keith Bostic revised the BSD tput command to make it similar to the AT&T tput, he added a shell script for the clear command: - exec tput clear + + exec tput clear The remainder of the script in each case is a copyright notice. @@ -93,10 +103,12 @@ dard control sequence for clearing the screen. Rather than clearing just the visible part of the screen using - printf '\033[2J' + + printf '\033[2J' one could clear the scrollback using - printf '\033[3J' + + printf '\033[3J' This is documented in XTerm Control Sequences as a feature originating with xterm. @@ -135,7 +147,7 @@
tput(1), terminfo(5) - This describes ncurses version 6.0 (patch 20161203). + This describes ncurses version 6.0 (patch 20170114).