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