333 lines
7.7 KiB
HTML
333 lines
7.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of tabs</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>tabs</H1>
|
|
Section: User Commands (1)<BR>Updated: <BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
<B>tabs</B> - set tabs on a terminal
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>tabs</B> [<I>options</I>]] <I>[tabstop-list]</I>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
The <B>tabs</B> program clears and sets tab-stops on the terminal.
|
|
This uses the terminfo <I>clear_all_tabs</I> and <I>set_tab</I> capabilities.
|
|
If either is absent, <B>tabs</B> is unable to clear/set tab-stops.
|
|
The terminal should be configured to use hard tabs, e.g.,
|
|
|
|
<BR> .sp
|
|
|
|
<BR> .in +4
|
|
|
|
<PRE>
|
|
stty tab0
|
|
|
|
</PRE>
|
|
|
|
|
|
<BR> .in -4
|
|
|
|
|
|
<P>
|
|
|
|
Like <B><A HREF="/cgi-bin/man/man2html?1+clear">clear</A></B>(1), <B>tabs</B> writes to the standard output.
|
|
You can redirect the standard output to a file (which prevents
|
|
<B>tabs</B> from actually changing the tabstops),
|
|
and later <B>cat</B> the file to the screen, setting tabstops at that point.
|
|
<P>
|
|
|
|
These are hardware tabs, which cannot be queried rapidly by applications
|
|
running in the terminal, if at all.
|
|
Curses and other full-screen applications may use hardware tabs
|
|
in optimizing their output to the terminal.
|
|
If the hardware tabstops differ from the information in the terminal
|
|
database, the result is unpredictable.
|
|
Before running curses programs,
|
|
you should either reset tab-stops to the standard interval
|
|
|
|
<BR> .sp
|
|
|
|
<BR> .in +4
|
|
|
|
<PRE>
|
|
tabs -8
|
|
|
|
</PRE>
|
|
|
|
|
|
<BR> .in -4
|
|
|
|
|
|
<P>
|
|
|
|
or use the <B>reset</B> program,
|
|
since the normal initialization sequences do not ensure that tab-stops
|
|
are reset.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>General Options</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-T</B><I>name</I>
|
|
|
|
<DD>
|
|
Tell <B>tabs</B> which terminal type to use.
|
|
If this option is not given, <B>tabs</B> will use the <B>$TERM</B>
|
|
environment variable.
|
|
If that is not set, it will use the <I>ansi+tabs</I> entry.
|
|
<DT id="2"><B>-d</B>
|
|
|
|
<DD>
|
|
The debugging option shows a ruler line, followed by two data lines.
|
|
The first data line shows the expected tab-stops marked with asterisks.
|
|
The second data line shows the actual tab-stops, marked with asterisks.
|
|
<DT id="3"><B>-n</B>
|
|
|
|
<DD>
|
|
This option tells <B>tabs</B> to check the options and run any debugging
|
|
option, but not to modify the terminal settings.
|
|
<DT id="4"><B>-V</B><DD>
|
|
reports the version of ncurses which was used in this program, and exits.
|
|
</DL>
|
|
<P>
|
|
|
|
The <B>tabs</B> program processes a single list of tab stops.
|
|
The last option to be processed which defines a list is the one that
|
|
determines the list to be processed.
|
|
<A NAME="lbAG"> </A>
|
|
<H3>Implicit Lists</H3>
|
|
|
|
Use a single number as an option,
|
|
e.g., ``<B>-5</B>'' to set tabs at the given
|
|
interval (in this case 1, 6, 11, 16, 21, etc.).
|
|
Tabs are repeated up to the right margin of the screen.
|
|
<P>
|
|
|
|
Use ``<B>-0</B>'' to clear all tabs.
|
|
<P>
|
|
|
|
Use ``<B>-8</B>'' to set tabs to the standard interval.
|
|
<A NAME="lbAH"> </A>
|
|
<H3>Explicit Lists</H3>
|
|
|
|
An explicit list can be defined after the options
|
|
(this does not use a ``-'').
|
|
The values in the list must be in increasing numeric order,
|
|
and greater than zero.
|
|
They are separated by a comma or a blank, for example,
|
|
|
|
<BR> .sp
|
|
|
|
<BR> .in +4
|
|
|
|
<PRE>
|
|
tabs 1,6,11,16,21
|
|
<BR>
|
|
tabs 1 6 11 16 21
|
|
|
|
</PRE>
|
|
|
|
|
|
<BR> .in -4
|
|
|
|
|
|
<P>
|
|
|
|
Use a ``+'' to treat a number
|
|
as an increment relative to the previous value,
|
|
e.g.,
|
|
|
|
<BR> .sp
|
|
|
|
<BR> .in +4
|
|
|
|
<PRE>
|
|
tabs 1,+5,+5,+5,+5
|
|
|
|
</PRE>
|
|
|
|
|
|
<BR> .in -4
|
|
|
|
|
|
<P>
|
|
|
|
which is equivalent to the 1,6,11,16,21 example.
|
|
<A NAME="lbAI"> </A>
|
|
<H3>Predefined Tab-Stops</H3>
|
|
|
|
X/Open defines several predefined lists of tab stops.
|
|
<DL COMPACT>
|
|
<DT id="5"><B>-a</B>
|
|
|
|
<DD>
|
|
Assembler, IBM S/370, first format
|
|
<DT id="6"><B>-a2</B>
|
|
|
|
<DD>
|
|
Assembler, IBM S/370, second format
|
|
<DT id="7"><B>-c</B>
|
|
|
|
<DD>
|
|
COBOL, normal format
|
|
<DT id="8"><B>-c2</B>
|
|
|
|
<DD>
|
|
COBOL compact format
|
|
<DT id="9"><B>-c3</B>
|
|
|
|
<DD>
|
|
COBOL compact format extended
|
|
<DT id="10"><B>-f</B>
|
|
|
|
<DD>
|
|
FORTRAN
|
|
<DT id="11"><B>-p</B>
|
|
|
|
<DD>
|
|
PL/I
|
|
<DT id="12"><B>-s</B>
|
|
|
|
<DD>
|
|
SNOBOL
|
|
<DT id="13"><B>-u</B>
|
|
|
|
<DD>
|
|
UNIVAC 1100 Assembler
|
|
</DL>
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>PORTABILITY</H2>
|
|
|
|
<P>
|
|
|
|
<I>IEEE Std 1003.1/The Open Group Base Specifications Issue 7</I> (POSIX.1-2008)
|
|
describes a <B>tabs</B> utility.
|
|
However
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
This standard describes a <B>+m</B> option, to set a terminal's left-margin.
|
|
Very few of the entries in the terminal database provide the
|
|
<B>smgl</B> (<B>set_left_margin</B>) or
|
|
<B>smglp</B> (<B>set_left_margin_parm</B>)
|
|
capability needed to support the feature.
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
There is no counterpart in X/Open Curses Issue 7 for this utility,
|
|
unlike <B><A HREF="/cgi-bin/man/man2html?1+tput">tput</A>(1)</B>.
|
|
<P>
|
|
|
|
The <B>-d</B> (debug) and <B>-n</B> (no-op) options are extensions not provided
|
|
by other implementations.
|
|
<P>
|
|
|
|
A <B>tabs</B> utility appeared in PWB/Unix 1.0 (1977).
|
|
There was a reduced version of the <B>tabs</B> utility
|
|
in Unix 7th edition and in 3BSD (1979).
|
|
The latter supported a single ``-n'' option
|
|
(to cause the first tab stop to be set on the left margin).
|
|
That option is not documented by POSIX.
|
|
<P>
|
|
|
|
The PWB/Unix <B>tabs</B> utility, which was included in System III (1980),
|
|
used built-in tables rather than the terminal database,
|
|
to support a half-dozen terminal types.
|
|
It also had built-in logic to support the left-margin,
|
|
as well as a feature for copying the tab settings from a file.
|
|
<P>
|
|
|
|
Later versions of Unix, e.g., SVr4,
|
|
added support for the terminal database,
|
|
but kept the tables, as a fallback.
|
|
In an earlier development effort,
|
|
the tab-stop initialization provided by <B>tset</B> (1982)
|
|
and incorporated into <B>tput</B> uses the terminal database,
|
|
<P>
|
|
|
|
POSIX documents no limits on the number of tab stops.
|
|
Documentation for other implementations states that there is a limit on the
|
|
number of tab stops
|
|
(e.g., 20 in PWB/Unix's <B>tabs</B> utility).
|
|
While some terminals may not accept an arbitrary number
|
|
of tab stops, this implementation will attempt to set tab stops up to the
|
|
right margin of the screen, if the given list happens to be that long.
|
|
<P>
|
|
|
|
The <I>Rationale</I> section of the POSIX documentation goes into some
|
|
detail about the ways the committee considered redesigning the
|
|
<B>tabs</B> and <B>tput</B> utilities,
|
|
without proposing an improved solution.
|
|
It comments that
|
|
<DL COMPACT><DT id="14"><DD>
|
|
<P>
|
|
|
|
no known historical version of tabs supports the capability of setting
|
|
arbitrary tab stops.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
However, the <I>Explicit Lists</I> described in this manual page
|
|
were implemented in PWB/Unix.
|
|
Those provide the capability of setting abitrary tab stops.
|
|
<A NAME="lbAK"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+tset">tset</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?1+infocmp">infocmp</A></B>(1),
|
|
<B>ncurses</B>(3NCURSES),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+terminfo">terminfo</A></B>(5).
|
|
<P>
|
|
|
|
This describes <B>ncurses</B>
|
|
version 6.2 (patch 20200212).
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="15"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="16"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="17"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="18"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DL>
|
|
<DT id="19"><A HREF="#lbAF">General Options</A><DD>
|
|
<DT id="20"><A HREF="#lbAG">Implicit Lists</A><DD>
|
|
<DT id="21"><A HREF="#lbAH">Explicit Lists</A><DD>
|
|
<DT id="22"><A HREF="#lbAI">Predefined Tab-Stops</A><DD>
|
|
</DL>
|
|
<DT id="23"><A HREF="#lbAJ">PORTABILITY</A><DD>
|
|
<DT id="24"><A HREF="#lbAK">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:28 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|