xref: /netbsd-src/usr.bin/tabs/tabs.1 (revision b7b7574d3bf8eeb51a1fa3977b59142ec6434a55)
1.\" $NetBSD: tabs.1,v 1.6 2014/03/18 18:20:45 riastradh Exp $
2.\"
3.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Roy Marples.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd April 5, 2012
31.Dt TABS 1
32.Os
33.Sh NAME
34.Nm tabs
35.Nd set terminal tabs
36.Sh SYNOPSIS
37.Nm
38.Op Fl n Ns | Ns Fl a Ns | Ns Fl a2 Ns | Ns Fl c Ns | Ns Fl c2 \
39Ns | Ns Fl c3 Ns | Ns Fl f Ns | Ns Fl p Ns | Ns Fl s Ns | Ns Fl u
40.Op +m Ns Op n
41.Op Fl T Ar type
42.Nm
43.Op Fl T Ar type
44.Op + Ns Op n
45.Ar n1 Ns Op , Ns Ar n2 , Ns Ar ...
46.Sh DESCRIPTION
47The
48.Nm
49utility displays a series of characters that first clears the hardware terminal
50tab settings and then initializes the tab stops at the specified positions
51and optionally adjusts the margin.
52.Pp
53The phrase "tab-stop position N" means that, from the start of a line of
54output, tabbing to position N shall cause the next character output to be in
55the (N+1)th column on that line.
56.Pp
57The following options are supported:
58.Bl -tag -width Fl
59.It Fl Ar n
60Specifies repetitive tab stops separated by a uniform number of columns,
61.Ar n ,
62where
63.Ar n
64is a single digit decimal number.
65The default usage of
66.Nm
67with no arguments is equivalent to
68.Nm
69.Fl 8 .
70When
71.Fl 0
72is used, the tab stops are cleared and no new ones set.
73.It Fl a
74Assembler, applicable to some mainframes.
75Equivalent to
76.Nm
771,10,16,36,72 .
78.It Fl a2
79Assembler, applicable to some mainframes.
80Equivalent to
81.Nm
821,10,16,40,72
83.It Fl c
84.Tn COBOL ,
85normal format.
86Equivalent to
87.Nm
881,8,12,16,20,55
89.It Fl c2
90.Tn COBOL ,
91compact format (columns 1 to 6 omitted).
92Equivalent to
93.Nm
941,6,10,14,49
95.It Fl c3
96.Tn COBOL ,
97compact format (columns 1 to 6 omitted), with more tabs than
98.Fl c2 .
99Equivalent to
100.Nm
1011,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67
102.It Fl f
103.Tn FORTRAN .
104Equivalent to
105.Nm
1061,7,11,15,19,23
107.It Fl p
108.Tn PL/1 .
109Equivalent to
110.Nm
1111,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61
112.It Fl s
113.Tn SNOBOL .
114Equivalent to
115.Nm
1161,10,55
117.It Fl T Ar type
118Indicates the type of terminal.
119.It Fl u
120Assembler, applicable to some mainframes.
121Equivalent to
122.Nm
1231,12,20,44
124.El
125.Sh ENVIRONMENT
126The
127.Ev COLUMNS
128and
129.Ev TERM
130environment variables affect the execution of
131.Nm
132as described in
133.Xr environ 7 .
134.Pp
135The
136.Fl T
137option overrides
138.Ev TERM .
139If neither
140.Ev TERM
141nor the
142.Fl T
143option are present,
144.Nm
145will fail.
146.Sh EXIT STATUS
147.Ex -std
148.Sh SEE ALSO
149.Xr expand 1 ,
150.Xr stty 1 ,
151.Xr tput 1 ,
152.Xr unexpand 1 ,
153.Xr terminfo 5
154.Sh STANDARDS
155The
156.Nm
157utility conforms to
158.St -p1003.1 .
159.Sh HISTORY
160A
161.Nm
162utility first appeared in PWB UNIX.
163This implementation was introduced in
164.Nx 6.0 .
165.Sh AUTHORS
166.An Roy Marples Aq Mt roy@NetBSD.org
167