]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/tabs.1
ncurses 5.9 - patch 20110528
[ncurses.git] / man / tabs.1
1 .\"***************************************************************************
2 .\" Copyright (c) 2008-2009,2010 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.8 2010/12/04 18:40:45 tom Exp $
30 .TH @TABS@ 1 ""
31 .ds n 5
32 .SH NAME
33 \fBtabs\fR \- set tabs on a terminal
34 .SH SYNOPSIS
35 \fBtabs\fR [\fB\-v\fR[\fIn\fR]] [\fB\-ahuUV\fR] \fIfile...\fR
36 .br
37 .SH DESCRIPTION
38 .PP
39 The \fBtabs\fP program clears and sets tab-stops on the terminal.
40 This uses the terminfo \fIclear_all_tabs\fP and \fIset_tab\fP capabilities.
41 If either is absent, \fBtabs\fP is unable to clear/set tab-stops.
42 The terminal should be configured to use hard tabs, e.g.,
43 .sp
44 .RS
45 stty tab0
46 .RE
47 .SH OPTIONS
48 .SS General Options
49 .TP 5
50 .BI \-T "name"
51 Tell \fBtabs\fP which terminal type to use.
52 If this option is not given, \fBtabs\fP will use the \fB$TERM\fP
53 environment variable.
54 If that is not set, it will use the \fIansi+tabs\fP entry.
55 .TP 5
56 .B \-d
57 The debugging option shows a ruler line, followed by two data lines.
58 The first data line shows the expected tab-stops marked with asterisks.
59 The second data line shows the actual tab-stops, marked with asterisks.
60 .TP 5
61 .B \-n
62 This option tells \fBtabs\fP to check the options and run any debugging
63 option, but not to modify the terminal settings.
64 .PP
65 The \fBtabs\fP program processes a single list of tab stops.
66 The last option to be processed which defines a list is the one that
67 determines the list to be processed.
68 .SS Implicit Lists
69 Use a single number as an option, e.g., "\fB\-5\fP" to set tabs at the given
70 interval (in this case 1, 6, 11, 16, 21, etc.).  Tabs are repeated up to
71 the right margin of the screen.
72 .PP
73 Use "\fB\-0\fP" to clear all tabs.
74 .PP
75 Use "\fB\-8\fP" to set tabs to the standard interval.
76 .SS Explicit Lists
77 An explicit list can be defined after the options (this does not use a "\-").
78 The values in the list must be in increasing numeric order, and greater than
79 zero.  They are separated by a comma or a blank, for example,
80 .sp
81 .RS
82 tabs 1,6,11,16,21
83 .br
84 tabs 1 6 11 16 21
85 .RE
86 Use a '+' to treat a number as an increment relative to the previous value,
87 e.g.,
88 .sp
89 .RS
90 tabs 1,+5,+5,+5,+5
91 .RE
92 which is equivalent to the 1,6,11,16,21 example.
93 .SS Predefined Tab-Stops
94 X/Open defines several predefined lists of tab stops.
95 .TP 5
96 .B \-a
97 Assembler, IBM S/370, first format
98 .TP 5
99 .B \-a2
100 Assembler, IBM S/370, second format
101 .TP 5
102 .B \-c
103 COBOL, normal format
104 .TP 5
105 .B \-c2
106 COBOL compact format
107 .TP 5
108 .B \-c3
109 COBOL compact format extended
110 .TP 5
111 .B \-f
112 FORTRAN
113 .TP 5
114 .B \-p
115 PL/I
116 .TP 5
117 .B \-s
118 SNOBOL
119 .TP 5
120 .B \-u
121 UNIVAC 1100 Assembler
122 .SH PORTABILITY
123 .PP
124 X/Open describes a \fB+m\fP option, to set a terminal's left-margin.
125 Very few of the entries in the terminal database provide this capability.
126 .PP
127 The \fB\-d\fP (debug) and \fB\-n\fP (no-op) options are extensions not provided
128 by other implementations.
129 .PP
130 Documentation for other implementations states that there is a limit on the
131 number of tab stops.  While some terminals may not accept an arbitrary number
132 of tab stops, this implementation will attempt to set tab stops up to the
133 right margin of the screen, if the given list happens to be that long.
134 .SH SEE ALSO
135 \fB@TSET@\fR(1),
136 \fB@INFOCMP@\fR(1M),
137 \fBcurses\fR(3X),
138 \fBterminfo\fR(\*n).
139 .PP
140 This describes \fBncurses\fR
141 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).