xref: /freebsd/usr.bin/tabs/tabs.1 (revision cbb3ec25236ba72f91cbdf23f8b78b9d1af0cedf)
1.\" Copyright (c) 2002 Tim J. Robbins.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.Dd September 9, 2021
26.Dt TABS 1
27.Os
28.Sh NAME
29.Nm tabs
30.Nd set terminal tabs
31.Sh SYNOPSIS
32.Nm
33.Op Fl Ar n | Fl a | a2 | c | c2 | c3 | f | p | s | u
34.Op Cm +m Ns Op Ar n
35.Op Fl T Ar type
36.Nm
37.Op Fl T Ar type
38.Op Cm + Ns Op Ar n
39.Ar n1 Ns Op Ns , Ns Ar n2 , Ns ...
40.Sh DESCRIPTION
41The
42.Nm
43utility displays a series of characters that clear the hardware terminal
44tab settings then initialises tab stops at specified positions, and
45optionally adjusts the margin.
46.Pp
47In the first synopsis form, the tab stops set depend on the command line
48options used, and may be one of the predefined formats or at regular
49intervals.
50.Pp
51In the second synopsis form, tab stops are set at positions
52.Ar n1 , n2 ,
53etc.
54If a position is preceded by a
55.Ql + ,
56it is relative to the previous position set.
57No more than 20 positions may be specified.
58.Pp
59If no tab stops are specified, the
60.Dq standard
61.Ux
62tab width of 8 is used.
63.Pp
64The options are as follows:
65.Bl -tag -width indent
66.It Fl Ar n
67Set a tab stop every
68.Ar n
69columns.
70If
71.Ar n
72is 0, the tab stops are cleared but no new ones are set.
73.It Fl a
74Assembler format (columns 1, 10, 16, 36, 72).
75.It Fl a2
76Assembler format (columns 1, 10, 16, 40, 72).
77.It Fl c
78.Tn COBOL
79normal format (columns 1, 8, 12, 16, 20, 55)
80.It Fl c2
81.Tn COBOL
82compact format (columns 1, 6, 10, 14, 49)
83.It Fl c3
84.Tn COBOL
85compact format (columns 1, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46,
8650, 54, 58, 62, 67).
87.It Fl f
88.Tn FORTRAN
89format (columns 1, 7, 11, 15, 19, 23).
90.It Fl p
91.Tn PL/1
92format (columns 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53,
9357, 61).
94.It Fl s
95.Tn SNOBOL
96format (columns 1, 10, 55).
97.It Fl u
98Assembler format (columns 1, 12, 20, 44).
99.It Xo
100.Cm +m Ns Op Ar n ,
101.Cm + Ns Op Ar n
102.Xc
103Set an
104.Ar n
105character left margin, or 10 if
106.Ar n
107is omitted.
108.It Fl T Ar type
109Output escape sequence for the terminal type
110.Ar type .
111.El
112.Sh ENVIRONMENT
113The
114.Ev LANG , LC_ALL , LC_CTYPE
115and
116.Ev TERM
117environment variables affect the execution of
118.Nm
119as described in
120.Xr environ 7 .
121.Pp
122The
123.Fl T
124option overrides the setting of the
125.Ev TERM
126environment variable.
127If neither
128.Ev TERM
129nor the
130.Fl T
131option are present,
132.Nm
133will fail.
134.Sh EXIT STATUS
135.Ex -std
136.Sh SEE ALSO
137.Xr expand 1 ,
138.Xr stty 1 ,
139.Xr tput 1 ,
140.Xr unexpand 1 ,
141.Xr termcap 5
142.Sh STANDARDS
143The
144.Nm
145utility conforms to
146.St -p1003.1-2001 .
147.Sh HISTORY
148.Pa /etc/tabs
149appeared in
150.At v1
151which set tabs every 8 on Teletype model 37 and compatible printing terminals
152when printed.
153A
154.Nm
155utility that worked on many terminals appeared in PWB UNIX.
156This implementation was introduced in
157.Fx 5.0 .
158.Sh BUGS
159The current
160.Xr termcap 5
161database does not define the
162.Ql ML
163(set left soft margin) capability for any terminals.
164