]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/tabs.1
ncurses 6.1 - patch 20190302
[ncurses.git] / man / tabs.1
1 .\"***************************************************************************
2 .\" Copyright (c) 2008-2018,2019 Free Software Foundation, Inc.              *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: tabs.1,v 1.20 2019/02/16 23:56:38 tom Exp $
30 .TH @TABS@ 1 ""
31 .ds n 5
32 .ie \n(.g .ds `` \(lq
33 .el       .ds `` ``
34 .ie \n(.g .ds '' \(rq
35 .el       .ds '' ''
36 .de bP
37 .ie n  .IP \(bu 4
38 .el    .IP \(bu 2
39 ..
40 .de NS
41 .ie n  .sp
42 .el    .sp .5
43 .ie n  .in +4
44 .el    .in +2
45 .nf
46 .ft C                   \" Courier
47 ..
48 .de NE
49 .fi
50 .ft R
51 .ie n  .in -4
52 .el    .in -2
53 ..
54 .SH NAME
55 \fB@TABS@\fR \- set tabs on a terminal
56 .SH SYNOPSIS
57 \fB@TABS@\fR [\fIoptions\fR]] \fI[tabstop-list]\fR
58 .SH DESCRIPTION
59 .PP
60 The \fB@TABS@\fP program clears and sets tab-stops on the terminal.
61 This uses the terminfo \fIclear_all_tabs\fP and \fIset_tab\fP capabilities.
62 If either is absent, \fB@TABS@\fP is unable to clear/set tab-stops.
63 The terminal should be configured to use hard tabs, e.g.,
64 .NS
65 stty tab0
66 .NE
67 .PP
68 Like \fB@CLEAR@\fR(1), \fB@TABS@\fR writes to the standard output.
69 You can redirect the standard output to a file (which prevents
70 \fB@TABS@\fR from actually changing the tabstops),
71 and later \fBcat\fP the file to the screen, setting tabstops at that point.
72 .PP
73 These are hardware tabs, which cannot be queried rapidly by applications
74 running in the terminal, if at all.
75 Curses and other full-screen applications may use hardware tabs
76 in optimizing their output to the terminal.
77 If the hardware tabstops differ from the information in the terminal
78 database, the result is unpredictable.
79 .SH OPTIONS
80 .SS General Options
81 .TP 5
82 .BI \-T "name"
83 Tell \fB@TABS@\fP which terminal type to use.
84 If this option is not given, \fB@TABS@\fP will use the \fB$TERM\fP
85 environment variable.
86 If that is not set, it will use the \fIansi+tabs\fP entry.
87 .TP 5
88 .B \-d
89 The debugging option shows a ruler line, followed by two data lines.
90 The first data line shows the expected tab-stops marked with asterisks.
91 The second data line shows the actual tab-stops, marked with asterisks.
92 .TP 5
93 .B \-n
94 This option tells \fB@TABS@\fP to check the options and run any debugging
95 option, but not to modify the terminal settings.
96 .TP
97 \fB\-V\fR
98 reports the version of ncurses which was used in this program, and exits.
99 .PP
100 The \fB@TABS@\fP program processes a single list of tab stops.
101 The last option to be processed which defines a list is the one that
102 determines the list to be processed.
103 .SS Implicit Lists
104 Use a single number as an option,
105 e.g., \*(``\fB\-5\fP\*('' to set tabs at the given
106 interval (in this case 1, 6, 11, 16, 21, etc.).
107 Tabs are repeated up to the right margin of the screen.
108 .PP
109 Use \*(``\fB\-0\fP\*('' to clear all tabs.
110 .PP
111 Use \*(``\fB\-8\fP\*('' to set tabs to the standard interval.
112 .SS Explicit Lists
113 An explicit list can be defined after the options
114 (this does not use a \*(``\-\*('').
115 The values in the list must be in increasing numeric order,
116 and greater than zero.
117 They are separated by a comma or a blank, for example,
118 .NS
119 tabs 1,6,11,16,21
120 .br
121 tabs 1 6 11 16 21
122 .NE
123 .PP
124 Use a \*(``+\*('' to treat a number
125 as an increment relative to the previous value,
126 e.g.,
127 .NS
128 tabs 1,+5,+5,+5,+5
129 .NE
130 .PP
131 which is equivalent to the 1,6,11,16,21 example.
132 .SS Predefined Tab-Stops
133 X/Open defines several predefined lists of tab stops.
134 .TP 5
135 .B \-a
136 Assembler, IBM S/370, first format
137 .TP 5
138 .B \-a2
139 Assembler, IBM S/370, second format
140 .TP 5
141 .B \-c
142 COBOL, normal format
143 .TP 5
144 .B \-c2
145 COBOL compact format
146 .TP 5
147 .B \-c3
148 COBOL compact format extended
149 .TP 5
150 .B \-f
151 FORTRAN
152 .TP 5
153 .B \-p
154 PL/I
155 .TP 5
156 .B \-s
157 SNOBOL
158 .TP 5
159 .B \-u
160 UNIVAC 1100 Assembler
161 .SH PORTABILITY
162 .PP
163 \fIIEEE Std 1003.1/The Open Group Base Specifications Issue 7\fP (POSIX.1-2008)
164 describes a \fBtabs\fP utility.
165 However
166 .bP
167 This standard describes a \fB+m\fP option, to set a terminal's left-margin.
168 Very few of the entries in the terminal database provide this capability.
169 .bP
170 There is no counterpart in X/Open Curses Issue 7 for this utility,
171 unlike \fB@TPUT@(1)\fP.
172 .PP
173 The \fB\-d\fP (debug) and \fB\-n\fP (no-op) options are extensions not provided
174 by other implementations.
175 .PP
176 Documentation for other implementations states that there is a limit on the
177 number of tab stops.
178 While some terminals may not accept an arbitrary number
179 of tab stops, this implementation will attempt to set tab stops up to the
180 right margin of the screen, if the given list happens to be that long.
181 .SH SEE ALSO
182 \fB@TSET@\fR(1),
183 \fB@INFOCMP@\fR(1M),
184 \fBcurses\fR(3X),
185 \fBterminfo\fR(\*n).
186 .PP
187 This describes \fBncurses\fR
188 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).