]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/tabs.1
ncurses 6.1 - patch 20180519
[ncurses.git] / man / tabs.1
1 .\"***************************************************************************
2 .\" Copyright (c) 2008-2017,2018 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.17 2018/05/19 21:07:46 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 .in -4
52 ..
53 .SH NAME
54 \fB@TABS@\fR \- set tabs on a terminal
55 .SH SYNOPSIS
56 \fB@TABS@\fR [\fIoptions\fR]] \fI[tabstop-list]\fR
57 .SH DESCRIPTION
58 .PP
59 The \fB@TABS@\fP program clears and sets tab-stops on the terminal.
60 This uses the terminfo \fIclear_all_tabs\fP and \fIset_tab\fP capabilities.
61 If either is absent, \fB@TABS@\fP is unable to clear/set tab-stops.
62 The terminal should be configured to use hard tabs, e.g.,
63 .NS
64 stty tab0
65 .NE
66 .PP
67 Like \fB@CLEAR@\fR(1), \fB@TABS@\fR writes to the standard output.
68 You can redirect the standard output to a file (which prevents
69 \fB@TABS@\fR from actually changing the tabstops),
70 and later \fBcat\fP the file to the screen, setting tabstops at that point.
71 .SH OPTIONS
72 .SS General Options
73 .TP 5
74 .BI \-T "name"
75 Tell \fB@TABS@\fP which terminal type to use.
76 If this option is not given, \fB@TABS@\fP will use the \fB$TERM\fP
77 environment variable.
78 If that is not set, it will use the \fIansi+tabs\fP entry.
79 .TP 5
80 .B \-d
81 The debugging option shows a ruler line, followed by two data lines.
82 The first data line shows the expected tab-stops marked with asterisks.
83 The second data line shows the actual tab-stops, marked with asterisks.
84 .TP 5
85 .B \-n
86 This option tells \fB@TABS@\fP to check the options and run any debugging
87 option, but not to modify the terminal settings.
88 .TP
89 \fB\-V\fR
90 reports the version of ncurses which was used in this program, and exits.
91 .PP
92 The \fB@TABS@\fP program processes a single list of tab stops.
93 The last option to be processed which defines a list is the one that
94 determines the list to be processed.
95 .SS Implicit Lists
96 Use a single number as an option,
97 e.g., \*(``\fB\-5\fP\*('' to set tabs at the given
98 interval (in this case 1, 6, 11, 16, 21, etc.).
99 Tabs are repeated up to the right margin of the screen.
100 .PP
101 Use \*(``\fB\-0\fP\*('' to clear all tabs.
102 .PP
103 Use \*(``\fB\-8\fP\*('' to set tabs to the standard interval.
104 .SS Explicit Lists
105 An explicit list can be defined after the options
106 (this does not use a \*(``\-\*('').
107 The values in the list must be in increasing numeric order,
108 and greater than zero.
109 They are separated by a comma or a blank, for example,
110 .NS
111 tabs 1,6,11,16,21
112 .br
113 tabs 1 6 11 16 21
114 .NE
115 .PP
116 Use a \*(``+\*('' to treat a number
117 as an increment relative to the previous value,
118 e.g.,
119 .NS
120 tabs 1,+5,+5,+5,+5
121 .NE
122 .PP
123 which is equivalent to the 1,6,11,16,21 example.
124 .SS Predefined Tab-Stops
125 X/Open defines several predefined lists of tab stops.
126 .TP 5
127 .B \-a
128 Assembler, IBM S/370, first format
129 .TP 5
130 .B \-a2
131 Assembler, IBM S/370, second format
132 .TP 5
133 .B \-c
134 COBOL, normal format
135 .TP 5
136 .B \-c2
137 COBOL compact format
138 .TP 5
139 .B \-c3
140 COBOL compact format extended
141 .TP 5
142 .B \-f
143 FORTRAN
144 .TP 5
145 .B \-p
146 PL/I
147 .TP 5
148 .B \-s
149 SNOBOL
150 .TP 5
151 .B \-u
152 UNIVAC 1100 Assembler
153 .SH PORTABILITY
154 .PP
155 \fIIEEE Std 1003.1/The Open Group Base Specifications Issue 7\fP (POSIX.1-2008)
156 describes a \fBtabs\fP utility.
157 However
158 .bP
159 This standard describes a \fB+m\fP option, to set a terminal's left-margin.
160 Very few of the entries in the terminal database provide this capability.
161 .bP
162 There is no counterpart in X/Open Curses Issue 7 for this utility,
163 unlike \fB@TPUT@(1)\fP.
164 .PP
165 The \fB\-d\fP (debug) and \fB\-n\fP (no-op) options are extensions not provided
166 by other implementations.
167 .PP
168 Documentation for other implementations states that there is a limit on the
169 number of tab stops.  While some terminals may not accept an arbitrary number
170 of tab stops, this implementation will attempt to set tab stops up to the
171 right margin of the screen, if the given list happens to be that long.
172 .SH SEE ALSO
173 \fB@TSET@\fR(1),
174 \fB@INFOCMP@\fR(1M),
175 \fBcurses\fR(3X),
176 \fBterminfo\fR(\*n).
177 .PP
178 This describes \fBncurses\fR
179 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).