Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
TPUT(1)			FreeBSD	General	Commands Manual		       TPUT(1)

NAME
     tput, clear -- terminal capability	interface

SYNOPSIS
     tput [-T term] [attribute ...]
     clear

DESCRIPTION
     The tput utility makes terminal-dependent information available to	users
     or	shell applications.

     The clear utility executes	the
	   tput	clear
     command, ignoring any arguments.

     The only option to	tput is:

     -T	 The terminal name as specified	in the termcap(5) database, for	exam-
	 ple, "vt100" or "xterm".  If not specified, tput retrieves the	"TERM"
	 variable from the environment unless that too is not specified, in
	 which case an error message will be sent to standard error and	the
	 error status will be 2.

     The tput utility outputs a	string for each	attribute that is of type
     string; a number for each of type integer.	 Otherwise, tput exits 0 if
     the terminal has the capability and 1 if it does not, without further ac-
     tion.

     If	an attribute is	of type	string,	and takes arguments (e.g. cursor move-
     ment, the termcap "cm" capability)	the arguments are taken	from the com-
     mand line immediately following the attribute.

     The following special attributes are available.  The first	three use the
     capabilities of the specified terminal, and only work if compatible with
     the utility's terminal.

     clear	   Clear the screen (the termcap(5) "cl" capability).

     init	   Initialize the terminal (the	termcap(5) "is"	capability).

     reset	   Reset the terminal (the termcap(5) "rs" capability).

     longname	   Print the descriptive name of the user's terminal type.

ENVIRONMENT
     TERM  The terminal	name, if set and -T is not used.

EXIT STATUS
     The exit status of	tput is	as follows:

     0	     If	the last attribute is of type string or	integer, its value was
	     successfully written to standard output.  If the attribute	is of
	     type boolean, the terminal	does have the attribute.  Otherwise,
	     no	attribute was specified.

     1	     If	the last attribute is of type boolean, this terminal does not
	     have the attribute.

     2	     Usage error.  For example,	see -T description.

     3	     No	information is available about the specified terminal type.

SEE ALSO
     termcap(5), terminfo(5)

STANDARDS
     The tput utility conforms to IEEE Std 1003.1-2001 ("POSIX.1").

HISTORY
     The tput utility appeared in 4.4BSD.

BUGS
     The tput utility cannot really distinguish	between	different types	of at-
     tributes.

     Some termcap entries depend upon having a `%' in them that	is just	a `%'
     and nothing more.	Right now we just warn about them if they do not have
     a valid type declaration.	These warnings are sent	to stderr.

FreeBSD	13.0			 June 15, 2002			  FreeBSD 13.0

NAME | SYNOPSIS | DESCRIPTION | ENVIRONMENT | EXIT STATUS | SEE ALSO | STANDARDS | HISTORY | BUGS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=clear&sektion=1&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help