logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

tput.1p (7098B)


  1. '\" et
  2. .TH TPUT "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. tput
  12. \(em change terminal characteristics
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. tput \fB[\fR-T \fItype\fB] \fIoperand\fR...
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR tput
  21. utility shall display terminal-dependent information. The manner in
  22. which this information is retrieved is unspecified. The information
  23. displayed shall clear the terminal screen, initialize the user's
  24. terminal, or reset the user's terminal, depending on the operand
  25. given. The exact consequences of displaying this information are
  26. unspecified.
  27. .SH OPTIONS
  28. The
  29. .IR tput
  30. utility shall conform to the Base Definitions volume of POSIX.1\(hy2017,
  31. .IR "Section 12.2" ", " "Utility Syntax Guidelines".
  32. .P
  33. The following option shall be supported:
  34. .IP "\fB\-T\ \fItype\fR" 10
  35. Indicate the type of terminal. If this option is not supplied and the
  36. .IR TERM
  37. variable is unset or null, an unspecified default terminal type shall
  38. be used. The setting of
  39. .IR type
  40. shall take precedence over the value in
  41. .IR TERM .
  42. .SH OPERANDS
  43. The following strings shall be supported as operands by the
  44. implementation in the POSIX locale:
  45. .IP "\fBclear\fR" 10
  46. Display the clear-screen sequence.
  47. .IP "\fBinit\fR" 10
  48. Display the sequence that initializes the user's terminal in an
  49. implementation-defined manner.
  50. .IP "\fBreset\fR" 10
  51. Display the sequence that resets the user's terminal in an
  52. implementation-defined manner.
  53. .P
  54. If a terminal does not support any of the operations described by these
  55. operands, this shall not be considered an error condition.
  56. .SH STDIN
  57. Not used.
  58. .SH "INPUT FILES"
  59. None.
  60. .SH "ENVIRONMENT VARIABLES"
  61. The following environment variables shall affect the execution of
  62. .IR tput :
  63. .IP "\fILANG\fP" 10
  64. Provide a default value for the internationalization variables that are
  65. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  66. .IR "Section 8.2" ", " "Internationalization Variables"
  67. for the precedence of internationalization variables used to determine
  68. the values of locale categories.)
  69. .IP "\fILC_ALL\fP" 10
  70. If set to a non-empty string value, override the values of all the
  71. other internationalization variables.
  72. .IP "\fILC_CTYPE\fP" 10
  73. Determine the locale for the interpretation of sequences of bytes of
  74. text data as characters (for example, single-byte as opposed to
  75. multi-byte characters in arguments).
  76. .IP "\fILC_MESSAGES\fP" 10
  77. .br
  78. Determine the locale that should be used to affect the format and
  79. contents of diagnostic messages written to standard error.
  80. .IP "\fINLSPATH\fP" 10
  81. Determine the location of message catalogs for the processing of
  82. .IR LC_MESSAGES .
  83. .IP "\fITERM\fP" 10
  84. Determine the terminal type. If this variable is unset or null, and if
  85. the
  86. .BR \-T
  87. option is not specified, an unspecified default terminal type shall be
  88. used.
  89. .SH "ASYNCHRONOUS EVENTS"
  90. Default.
  91. .SH STDOUT
  92. If standard output is a terminal device, it may be used for writing the
  93. appropriate sequence to clear the screen or reset or initialize the
  94. terminal. If standard output is not a terminal device, undefined
  95. results occur.
  96. .SH STDERR
  97. The standard error shall be used only for diagnostic messages.
  98. .SH "OUTPUT FILES"
  99. None.
  100. .SH "EXTENDED DESCRIPTION"
  101. None.
  102. .SH "EXIT STATUS"
  103. The following exit values shall be returned:
  104. .IP "\00" 6
  105. The requested string was written successfully.
  106. .IP "\01" 6
  107. Unspecified.
  108. .IP "\02" 6
  109. Usage error.
  110. .IP "\03" 6
  111. No information is available about the specified terminal type.
  112. .IP "\04" 6
  113. The specified operand is invalid.
  114. .IP >4 6
  115. An error occurred.
  116. .SH "CONSEQUENCES OF ERRORS"
  117. If one of the operands is not available for the terminal,
  118. .IR tput
  119. continues processing the remaining operands.
  120. .LP
  121. .IR "The following sections are informative."
  122. .SH "APPLICATION USAGE"
  123. The difference between resetting and initializing a terminal is left
  124. unspecified, as they vary greatly based on hardware types. In general,
  125. resetting is a more severe action.
  126. .P
  127. Some terminals use control characters to perform the stated functions,
  128. and on such terminals it might make sense to use
  129. .IR tput
  130. to store the initialization strings in a file or environment variable
  131. for later use. However, because other terminals might rely on system
  132. calls to do this work, the standard output cannot be used in a portable
  133. manner, such as the following non-portable constructs:
  134. .sp
  135. .RS 4
  136. .nf
  137. ClearVar=`tput clear`
  138. tput reset | mailx -s "Wake Up" ddg
  139. .fi
  140. .P
  141. .RE
  142. .SH EXAMPLES
  143. .IP " 1." 4
  144. Initialize the terminal according to the type of terminal in the
  145. environmental variable
  146. .IR TERM .
  147. This command can be included in a
  148. .BR .profile
  149. file.
  150. .RS 4
  151. .sp
  152. .RS 4
  153. .nf
  154. tput init
  155. .fi
  156. .P
  157. .RE
  158. .RE
  159. .IP " 2." 4
  160. Reset a 450 terminal.
  161. .RS 4
  162. .sp
  163. .RS 4
  164. .nf
  165. tput -T 450 reset
  166. .fi
  167. .P
  168. .RE
  169. .RE
  170. .SH RATIONALE
  171. The list of operands was reduced to a minimum for the following
  172. reasons:
  173. .IP " *" 4
  174. The only features chosen were those that were likely to be used by
  175. human users interacting with a terminal.
  176. .IP " *" 4
  177. Specifying the full
  178. .IR terminfo
  179. set was not considered desirable, but the standard developers did not
  180. want to select among operands.
  181. .IP " *" 4
  182. This volume of POSIX.1\(hy2017 does not attempt to provide applications with sophisticated
  183. terminal handling capabilities, as that falls outside of its assigned
  184. scope and intersects with the responsibilities of other standards
  185. bodies.
  186. .P
  187. The difference between resetting and initializing a terminal is left
  188. unspecified as this varies greatly based on hardware types. In
  189. general, resetting is a more severe action.
  190. .P
  191. The exit status of 1 is historically reserved for finding out if a
  192. Boolean operand is not set. Although the operands were reduced to a
  193. minimum, the exit status of 1 should still be reserved for the Boolean
  194. operands, for those sites that wish to support them.
  195. .SH "FUTURE DIRECTIONS"
  196. None.
  197. .SH "SEE ALSO"
  198. .IR "\fIstty\fR\^",
  199. .IR "\fItabs\fR\^"
  200. .P
  201. The Base Definitions volume of POSIX.1\(hy2017,
  202. .IR "Chapter 8" ", " "Environment Variables",
  203. .IR "Section 12.2" ", " "Utility Syntax Guidelines"
  204. .\"
  205. .SH COPYRIGHT
  206. Portions of this text are reprinted and reproduced in electronic form
  207. from IEEE Std 1003.1-2017, Standard for Information Technology
  208. -- Portable Operating System Interface (POSIX), The Open Group Base
  209. Specifications Issue 7, 2018 Edition,
  210. Copyright (C) 2018 by the Institute of
  211. Electrical and Electronics Engineers, Inc and The Open Group.
  212. In the event of any discrepancy between this version and the original IEEE and
  213. The Open Group Standard, the original IEEE and The Open Group Standard
  214. is the referee document. The original Standard can be obtained online at
  215. http://www.opengroup.org/unix/online.html .
  216. .PP
  217. Any typographical or formatting errors that appear
  218. in this page are most likely
  219. to have been introduced during the conversion of the source files to
  220. man page format. To report such errors, see
  221. https://www.kernel.org/doc/man-pages/reporting_bugs.html .